Staredit Network

Staredit Network -> UMS Assistance -> Hyper trigs and random unit spawning
Report, edit, etc...Posted by Staredit.Net Essence on 2005-08-02 at 19:40:11
ranting.gif I've been having a problem fow a while now with making a trigger so that when my unit dies it respawns in a random location. I know how to make them spawn randomly an here is how I do it.


Trigger
Description:
Randomize switches
Players:
¤ Player 1
Conditions:
¤ always
Actions:
¤ Randomize switch spawn1
¤ Randomize switch spawn2
¤ Randomize switch spawn3


I do this to randomize the 3 switches that will decide which out of the six locations my unit may spawn at.

Here is how I make my unit spawn


Trigger
Description:
unit spawn 1
Conditions:
¤ Player commands exactly 0 men
¤ Spawn1 is set
¤ Spawn2 is set
¤ Spawn3 is set
Actions:
¤ Create 1 unit at location SPAWN 1



Trigger
Description:
unit spawn 2
Conditions:
¤ Player commands exactly 0 men
¤ Spawn1 is cleared
¤ Spawn2 is set
¤ Spawn3 is set
Actions:
¤ Create 1 unit at location SPAWN 2



Trigger
Description:
unit spawn 3
Conditions:
¤ Player commands exactly 0 men
¤ Spawn1 is set
¤ Spawn2 is cleared
¤ Spawn3 is set
Actions:
¤ Create 1 unit at location SPAWN 3



Trigger
Description:
unit spawn 4
Conditions:
¤ Player commands exactly 0 men
¤ Spawn1 is set
¤ Spawn2 is set
¤ Spawn3 is cleared
Actions:
¤ Create 1 unit at location SPAWN 4


Ok i think you under stand how those work happy.gif so im not including all the trigs

Now the problem is that when 1 of my units dies it somtimes creates more than 1 unit. Usually around 2 or 3. I think this happens becasue all the triggers accur at the same time. and Yes I tried Hyper Triggers. I also tried putting a 'wait' before randomizing the switches but that didnt work either.

I hope you understand my problem and thankyou for your help. smile.gif
Ohyeah, Special thanks to Oo.Skillz.oO for showing me how to make random trigs biggrin.gif
Report, edit, etc...Posted by pimpinelephant on 2005-08-02 at 19:45:54
i think it has something to do with the condition of Always in the randomization trigger. instead of using Always, try using Player Commands At Most 0 Unit.
Report, edit, etc...Posted by Staredit.Net Essence on 2005-08-02 at 21:06:57
QUOTE(pimpinelephant @ Aug 2 2005, 05:45 PM)
i think it has something to do with the condition of Always in the randomization trigger. instead of using Always, try using Player Commands At Most 0 Unit.
[right][snapback]277139[/snapback][/right]


I am grieved to say ive done that already, but i'll try again just in case.
Thanks for your reply happy.gif .
Report, edit, etc...Posted by (U)Bolt_Head on 2005-08-03 at 08:27:23
Most likely your trigger is fireing for multiple players. But it is kinda hard to tell cause you abreviated the important part leaving it out compleatly.

Make sure in your Bring Condition and you Create Units Action both you use "current player" instead of specifiying a player.

Secondly randomizing 3 switches yeilds 8 results not 6:
Clear Clear Clear
Clear Clear Set
Clear Set Clear
Clear Set Set
Set Clear Clear
Set Clear Set
Set Set Clear
Set Set Set
Report, edit, etc...Posted by Staredit.Net Essence on 2005-08-03 at 12:32:45
QUOTE((U)Bolt_Head @ Aug 3 2005, 06:27 AM)
Most likely your trigger is fireing for multiple players.  But it is kinda hard to tell cause you abreviated the important part leaving it out compleatly.

Make sure in your Bring Condition and you Create Units Action both you use "current player" instead of specifiying a player.

Secondly randomizing 3 switches yeilds 8 results not 6:
Clear Clear Clear
Clear Clear Set
Clear Set Clear
Clear Set Set
Set Clear Clear
Set Clear Set
Set Set Clear
Set Set Set
[right][snapback]277541[/snapback][/right]


I noticed that it gives 8 results but that doesnt really matter, anyway I have it working now smile.gif . what I suggest to anyone doing this is to make your hyper tiggers for the force and not for specific players. Thats about it.. thanks for your reply

wait scratch that still doesnt work lol. sad.gif
Report, edit, etc...Posted by uberfoop on 2005-08-03 at 12:59:41
if its creating more than 1, its firing for several players. common problem. just make sure that there is only 1 player or group that own the trigger. meaning that you cant have moire than 1 of the player boxes checked.
Next Page (1)