OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: wired on 06 Feb 2004, 22:58:26

Title: On map click or something?
Post by: wired on 06 Feb 2004, 22:58:26
ok heres what i want to do:
I've made a bombing script and i want it so that the player can select on the map (whilst playing  :P) where he wants the atack to take place and i also want it only to be available every 90or so seconds.
I think this is made using the "onmapclick" thing but is there any tutorials on it?
Title: Re:On map click or something?
Post by: macguba on 06 Feb 2004, 22:59:45
Check the online Command reference in the Ed Depot, I think there are some tips or links.

onMapSingleClick
Title: Re:On map click or something?
Post by: Azraell on 08 Feb 2004, 00:26:15
http://www.ofpec.com/yabbse/index.php?board=8;action=display;threadid=15686 (http://www.ofpec.com/yabbse/index.php?board=8;action=display;threadid=15686)


heres a thread that was posted after yours....might help

basiclly youd wanna make a script with everything you want to happen, then in an editor trigger do a time out for 90 seconds and the conditions for which you wnat the trigger to fire under and its activation field put...[] exec "scriptname.sqs". Your script will fire every 90 seconds(ofp seconds).  Something to that effect....do a forum search to of onmapsingleclick.


Onmapsingleclick {"markername" setmarkerpos _pos; go=true}
@go
go=false


Heres a start...this will set the marker of your choice to that mapclick position....(_pos).....@go will hold the script until go=true..which will happen when you click the map. Then go returns to being false.  

Hope this helps a little.