I'm having to remember my problem off the top of my head, but my dilemma is basically:
I want it so that when a unit activates an ability, that ability trigger will call another trigger with the unit as a parameter.
That other trigger will be Event - When a unit is within X of Unit. (Which looks something like PLAYERUNITEVENT_ACQUIRED_UNIT_BJ, Unit. Or something)
Then I have AddAction, which takes the unit parameter and sticks it in the action function. This is where I hit the snage I tihnk.
Because it looks something like.
AddAction(trg_Trigger, function trg_Trigger_Actions) it doesn't allow me to put function trg_Trigger_Actions(unit parameter here) because it's a code.
Can anyone help me stick it in?
For clarification the GUI version just looks like
Event - When unit comes into X range of (Unit). And the (Unit) has to be a generated unit, or a variable, I'm trying to put the casting unit in the original trigger that casts Collision (physics ability for my map) into this little slot, and also use the unit in the actions.
Now besides globals, could you guys help me fix this little hiccup with the whole 'not putting parameters in code' thing. I'm still learning jass.
(P.S, PP if you are reading this and your answer in that other thread covered this, sorry but I'm having trouble using the stuff in jasshelper, they don't seem to be doing what they are suposed to be doing at all!)
Huge appreciation to anyone that can help me with this problem, it is all that stands between me and finishing my collision physics system, which will be hugely important for my map.