Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED] Random Exp with Hyper Triggers
[SOLVED] Random Exp with Hyper Triggers
Jun 19 2011, 5:46 am
By: Son-  

Jun 19 2011, 5:46 am Son- Post #1



ok so im makeing a map where i want the heros to gain exp randomly from enemies i kno i have the triggers right...i had it working except i forgot that hyper triggers mess it up so i added death counts and a main switch and this is wat i have now

Trigger("Player 1"){
Conditions:
Always();

Actions:
Set Deaths("Player 1", "Goliath Turret", Subtract, 1);
Preserve Trigger();


Trigger("Player 1"){
Conditions:
Switch("P1Exp", not set);
Always();

Actions:
Set Switch("P1Exp", set);
Set Switch("P1ExpRandom1", randomize);
Set Switch("P1ExpRandom2", randomize);
Set Switch("P1ExpRandom3", randomize);
Set Deaths("Player 1", "Goliath Turret", Set To, 12);
Preserve Trigger();
Comment("Random1-3")


Trigger("Player 1"){
Conditions:
Switch("P1Exp", set);
Kill("Player 1", "Any unit", Exactly, 1);
Switch("P1ExpRandom1", set);
Switch("P1ExpRandom2", set);
Switch("P1ExpRandom3", set);
Deaths("Player 1", "Goliath Turret", At most, 0);

Actions:
Set Switch("P1Exp", clear);
Set Score("Player 1", Add, 1, Custom);
Display Text Message(Always Display, "+1Exp");
Preserve Trigger();
Comment("Random1-3SSS");

and so forth with all the possible combinations can anyone please help me



None.

Jun 19 2011, 6:02 am Roy Post #2

An artist's depiction of an Extended Unit Death

The way you have it set up, it will wait for a second (12 death counts), and then check if the player has killed at least one unit since the beginning of the map. If the player has killed any unit and all the switches are set, it adds one to the custom score (which I assume is the experience counter).

You shouldn't use "Kill" because there is no way to reset the counter. That is, after you kill one unit, that condition will always be true, and you can't set it back to 0 to make it false again. If possible, try using deaths of the computer player. Otherwise, you'll need to use Kill Score (you can find the kill score values here), which you can subtract using actions.

It looks like you set the death counter up correctly, but I am confused as to why you need it. If you are adding experience when a unit dies, you don't need a counter for it.

I'm not really sure if you're asking for general help with setting up death counters, or if you need help with something specific. I hope this helps, though.




Jun 19 2011, 6:24 am Son- Post #3



Oo thanks man that makes complete sence...and if i do it like that i will have to make a differnt set of triggers with each unit that i have being killed instead of useing any unit or it colide with my deathcounts i alrdy have for that player correct?

and i used death counts on those triggers because hyper trigger made the trigger run threw 12 times so i wanted it to be on the 1 sec so that dosent happen or is the main switch alrdy doing that...idk i thout it wouldnt work without it let me kno if its unessasry

ive been working on this map for two days and ive been at a good pace this is the first problem ive ran into i alrdy got all the ai for the computer worked out to the end just gota add this and player spells and tweak the stats alil and im good to go...i havent made a sc map in years so thanks for your help good to know sen still up n running :D



None.

Jun 19 2011, 6:59 am Roy Post #4

An artist's depiction of an Extended Unit Death

Yes, you would need a trigger for each different unit killed, because they award varying scores. Or, if it doesn't matter what unit is killed, you can just check for "at least 1" and set it back to 0 when applying experience.

The trigger would normally run twelve times per second, but it wouldn't run twelve times. A trigger only executes when all conditions are met. When you set the main switch, the trigger with the condition "P1Exp is Clear" will not run. Therefore, the death counter would only be needed if you were trying to make it so it was impossible to receive more than one set of experience in a second (i.e. if you kill two units within a second, it will only award experience for one kill). If this is not the effect you want, you should probably remove the death counter.




Jun 19 2011, 7:07 am Son- Post #5



hmm i see i see also just remembered theres parts where the computer will be attacking also on your team so that will also interfere with the deaths but i can also do the same thing with the kill score u was talking about correct? ive never used that before



None.

Jun 19 2011, 7:16 am Roy Post #6

An artist's depiction of an Extended Unit Death

If there are other players killing the computer player, you can't keep track of deaths and you'll have to use Kill Score. An example would be:

Trigger
Players
  • Player 1
  • Conditions
  • Switch 1 is Cleared
  • Current Player Kill Score is exactly 100
  • Actions
  • (Actions for killing a marine)
  • Modify Kill Score for Current Player: Set to 0
  • Preserve Trigger


  • This is assuming you don't have a unit that does splash damage / can kill more than one unit at the exact same time owned by the player.




    Jun 19 2011, 7:31 am Son- Post #7



    thanks man u helped alot i got everything working look for my map n a week or so :)



    None.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [09:18 pm]
    Ultraviolet -- 🔪🐈
    [12:34 pm]
    NudeRaider -- curiosity kills the cat!
    [06:18 am]
    Sylph-Of-Space -- No complaints here, i'm just curious!
    [2024-5-18. : 11:05 pm]
    Ultraviolet -- :wob:
    [2024-5-18. : 3:55 pm]
    Zoan -- :wob:
    [2024-5-18. : 10:34 am]
    NudeRaider -- SEN doesn't rely on spammers initiate its sleep cycle. It hat fully automated rest and clean-up phases. Please understand that this is necessary for the smooth operation of the site. Thank you.
    [2024-5-18. : 3:45 am]
    Sylph-Of-Space -- Does the shoutbox get disabled when there's spammers?
    [2024-5-17. : 6:47 am]
    NudeRaider -- lil-Inferno
    lil-Inferno shouted: nah
    strong
    [2024-5-17. : 5:41 am]
    Ultraviolet -- 🤔 so inf is in you?
    [2024-5-17. : 4:57 am]
    O)FaRTy1billion[MM] -- my name is mud
    Please log in to shout.


    Members Online: Moose