OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: wired on 11 Feb 2004, 18:53:47
-
Ok, some of u may hav seen the post i made about the 'onmapclick' thing but i really need help. I've got an explosion script, and i want it to be activated after around 15 secs, where the player has made a marker. i tried to modify snypir's usermarker script from the smoke script he made, or to try and learn how he did it but nothing succeeded. HELP ME PLZ :'(
-
The syntax to define the map click handler should look something like this
onMapSingleClick{"myMarker" setMarkerPos _pos; [_pos,15,...] exec "explosionscript.sqs";true}You can put it into any Init-line or the "init.sqs" script. It defines the code to be executed everytime the player clicks on the map. In the above case, it moves the marker "myMarker" (which you have to place in the editor) to the click position and calls your explosionscript with the click position and the time delay as parameters. As I do not know the explosion script I can only guess what its parameters are. The easiest way to create the time delay is to modify the explosionscript like:
_pos = _this select 0
_delay = _this select 1
;etc... any other parameters
;this causes the script to pause for _delay seconds
~_delay
;continue explosion script
Hope this helps,
Spinor
-
didn't work.......the script gives me an error when i try to camcreate the explosion because it dont recognise the position.
-
Well, I have no idea what the script looks like, hence I was only guessing how it has to be executed. Could you post the script?
-
http://azraell.rendervisions.com/downloads/explosionscript.zip (http://azraell.rendervisions.com/downloads/explosionscript.zip)
Here, download this i made real quick.
Put it in ur user/missions folder with ur other editor missions...
open in ur editor and start it and click on the map and wait 15 seconds.
Study it, learn it, know it ;)
-
Cheers man....thats gr8........it finally works!
WHHAAAAAAAAHOOOOOOOOOO!!!!!! ;D ;D ;D ;D ;D ;D ;D
U've really helped guys, thanx a bunch!
wired