- Joined
- Jul 1, 2008
- Messages
- 46
I am writing a couple functions for combat in my map that are to be executed when a unit is attacked.
1) Do I put these functions in the the top most trigger that says 'Custom Script here'?
2) When I run the syntax checker it says that function b is not found, when function a calls it. Would I need to put function a before b in the code? Or is there a way to let the script know that there will actually be a function b, when a calls it.
3) Bonus question, i'm new to JASS so I was wondering if there's a few other ways to detect if a unit is attacked rather than the way the GUI does it. I am not looking to detect damage, just when someone tries to attack the unit
1) Do I put these functions in the the top most trigger that says 'Custom Script here'?
2) When I run the syntax checker it says that function b is not found, when function a calls it. Would I need to put function a before b in the code? Or is there a way to let the script know that there will actually be a function b, when a calls it.
3) Bonus question, i'm new to JASS so I was wondering if there's a few other ways to detect if a unit is attacked rather than the way the GUI does it. I am not looking to detect damage, just when someone tries to attack the unit