HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Call for Help: Trigger Trouble !!

09-27-2003, 11:14 AM#1
ABM
Well here is my problem,
i made a game where a unit "Scarab" can eat another units "Scarab food" both these units are building (but i don't think it really matter).

i click Scarab attack the scarab food and the Scarab food vanish, and the Scarab is upgraded to Scarab2 (a bigger one).

event:
a unit is attacked

condition:
attacking units = Scarab
attacked units = Scarab Food

action:
wait 1.0 sec
replace attacking unit with a Scarab2 using old units life and mana.
remove attacked unit from game


everytihng work great until i realize that if i select two Scarab and i attack a Scarab Food both of the Scarab will be upgraded by eating only one food wich is not what i want....

how to make a trigger that allow only one unit target another at a time, or how to prevent both scarab using the same food...?

i hope some trigger master will look at this thread and help me.
Thanks
09-27-2003, 11:22 AM#2
Saethori
Fix: Put a 'Turn off this trigger' at the beginning of actions (before the wait), and put a 'Turn on this trigger' at the end (after the food is removed). This should prevent the trigger from running again if another scarab eats the food one's eating.

Let me know how it works out.
09-27-2003, 01:04 PM#3
ABM
Great thanks to U Saethoril ,
Ur trigger adding works just perfectly, i would never think of doing that, i even never knew that putting this kind of turn off turn on would help in that way !! So simple and working so well !!

I will give u credit in the new TD i am trying to make...
( Shvegait if U are reading this i am trying to make a TD much better than Ur great Burbenog TD wish me good luck ;) )