HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need help on a trigger/ or triggers.

02-08-2009, 03:22 AM#1
mobofone
Someone help me out on this thing here. i am trying to figure out how to make a trigger that involves setting a timer on a unit (not expiring timer) but a timer that isnt visible on a unit. and when the timer is up it removes the unit and replaces the unit with a better unit (or bigger). Another problem i am having is with mana. when a unit gets a certin amount of mana by killling a unit or just it getting to the max, it does the same as the other trigger replaces it with another unit. But i can not get it to work. Help me out please
02-08-2009, 06:35 PM#2
Anitarf
You could change the unit to a better one by giving it a chaos-morph based ability that morphs it to a better unit; for the timer, us something like TimerUtils. I'm not sure I understand what you want to do with the other trigger though.
02-08-2009, 11:37 PM#3
Pyrogasm
For the 2nd trigger, the best thing you can do is run a periodic timer and check the units' mana:
Trigger:
Collapse Events
Time - Every 0.15 seconds of game-time
Conditions
Collapse Actions
Custom script: set bj_wantDestroyGroup = true
Collapse Unit Group - Pick all units in ((Units in Playable Map Area) matching (Unit-type of (Matching Unit) equal to Footman) and do (Actions)
Collapse Loop - Actions
Collapse If (All conditions are true) then do (Then actions) else do (Else actions)
Collapse If - Conditions
((Mana of (Picked Unit)) greater than or equal to 8.00)
Collapse Then - Actions
Unit - Replace (Picked Unit) with a Knight using (Old unit's relative life and mana)
Else - Actions
02-08-2009, 11:50 PM#4
mobofone
ah thanks, was having a hard ass time finding it out
02-09-2009, 12:05 AM#5
mobofone
oh and also pyrogasm its not matching unit, its picked unit again. Slight error in your code, but other then that works great, thanks again