OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Pimmelorus on 05 Apr 2003, 10:11:04
-
In my MP C&H mission I have included a option to call in artillery support by a single clikck on the map. Now I want to define no-fire zones so that artillery cannot be targeted into the spawn areas. Can anyone help me with this? It propably has something to do with setting up a trigger area that can detect the mouse click, but i dont know how.
The SupportPack by SnYpR has this feature in it so I know this is possible, but this pack is far too complex to understand for my noob scripting brains :).
Thnx,
Pimmelorus
-
With OnMapSingleClick command you get the "clicked" positon with [_x,_y] format. Then you just have to:
If _x is bigger or lower than the maximum/minimum acceptable _x value, just return the player a hint saying that the fire area is restricted... and restart the script. ;)
The same is aplied to _y coordinates.