HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Again, Trigger is not running!

04-15-2007, 11:27 PM#1
Phish-Paste
Trigger:
Void Activate
Collapse Events
Unit - A unit Learns a skill
Collapse Conditions
(Learned Hero Skill) Equal to Void
Collapse Actions
Set VoidSource = (Learning Hero)
Set VoidPull_Limit[2] = 20
Trigger - Turn on Void Intervals <gen>

Trigger:
Void Intervals
Collapse Events
Time - Every 5.00 seconds of game time
Conditions
Collapse Actions
Set VoidPoints[1] = (Position of VoidSource)
Set VoidPull_Limit[1] = 0
Trigger - Turn on Void <gen>

Trigger:
Void
Collapse Events
Time - Every 0.03 seconds of game time
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
VoidPull_Limit[1] Greater than or equal to VoidPull_Limit[2]
Collapse Then - Actions
Trigger - Turn off (This trigger)
Custom script: call RemoveLocation(udg_VoidPoints[1])
Custom script: call RemoveLocation(udg_VoidPoints[2])
Collapse Else - Actions
Custom script: set bj_wantDestroyGroup=true
Collapse Unit Group - Pick every unit in (Units within (Real((200 x (Level of Void for VoidSource)))) of VoidPoints[1]) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) belongs to an enemy of (Owner of VoidSource)) Equal to True
((Picked unit) is A structure) Equal to False
((Picked unit) is dead) Equal to False
Collapse Then - Actions
Set VoidPoints[2] = (Position of (Picked unit))
Set VoidPull_Limit[1] = (VoidPull_Limit[1] + 1)
Unit - Move (Picked unit) instantly to (VoidPoints[2] offset by 20.00 towards (Facing of (Picked unit)) degrees), facing VoidPoints[1]
Custom script: call RemoveLocation(udg_VoidPoints[2])
Else - Actions
Custom script: call RemoveLocation(udg_VoidPoints[1])

Well this time, the trigger fires off ONCE and doesn't actually pull...Any ideas what's wrong this time? I've checked the conditions, and the requirements, but nothing seems to work.

Also, does anyone know how to get units to be "pulled" without having to face the origin(In GUI)?
04-15-2007, 11:50 PM#2
Mystic Prophet
Hmm, I'd be interested to see how this one turns out. I can't see what's wrong with the trigger either. Try adding in text messages at seperate parts of the trigger to see which parts are running properly.

Oh and I don't know if it's a good idea to have a periodic event that turns on a trigger.
04-16-2007, 12:00 AM#3
Av3n
I want to say something .03 isn't an good value to work with. 0.1 is better. (For perodic timers)

-Av3n
04-16-2007, 12:02 AM#4
Dil999
I usually prefer .5 or .4 whenever doing a periodic event. Its fast enough so that it happens each frame on most computers, and if its a big trigger it doesnt make much lag.
04-16-2007, 12:30 AM#5
Joker
Most computers should be able to take .1 fine.
04-16-2007, 01:09 AM#6
Phish-Paste
Ok, a little more testing reveals that the trigger DOES work. The problem is that the final periodic timer just turns it self off after the first loop.


EDIT: Never mind, the problem was within the 'If' statement. I removed it, now it works fine.
04-16-2007, 01:35 AM#7
Dil999
Gah, i meant .05 and .04, not .5 and .4 -.-
04-16-2007, 03:16 AM#8
Toink
Moving it towards it's facing? So if it faces directly opposite the VoidSource it can get knocked back?

And you do not turn off the Void trigger after the Void Interval, which means it keeps running. So I'm assuming you want a permanent 'black hole' effect that can push units backwards if it's facing the opposite angle.