OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: JediT1000 on 06 May 2003, 06:36:16

Title: Stupid helicopter and artilery wont play nice :(
Post by: JediT1000 on 06 May 2003, 06:36:16
Hey, im a newb when it comes to editing, but i thought id give it a try and am trying to make a mission that involves 2 mapclick scripts, one being a one click heli transport, the other being a once click artilery script.   however when they are both in a mission u can do one but then after u do that one, u cant do the other one.  any suggestions?  i have a hunch that it is in the scripting for the marker of it in its possition something like "onMapSingleClick {[_pos] exec "airstrike_naplam.sqs"}" is there any way to switch the single to a double? i tried to do it in there but it said unknown operator,  i also tried to get the helicopter script to work with snYpirs support pack and had the same result, so if there are any suggestions all the help is appreciated, feel free to contact me on email IM or here :) and thanks in advance :)

Morgs (Jedi)
Title: Re:Stupid helicopter and artilery wont play nice :(
Post by: nEO iNC on 06 May 2003, 10:18:32
Hi, the "onMapSingleClick" command isn't a one shot deal you can use it again and again.

The way I normally use it is a radio trigger to select the type of action I want the radio command to associated with first, say artillery. Then just open the map and click, that's it.
Obviously you need the sript behind it to do all the hard work, but I guess if you don't have that it's never gonna work.

eg.
Trigger Alpha, Name: (Artillery)

OnAct: onMapSingleClick {[_apos] exec "artillery.sqs"}

or

Trigger Bravo, Name: (Call Helo)

OnAct: onMapSingleClick {[_hpos] exec "movehelo.sqs"}

"Foolish are the people who play twister on the stairs" - Master Yoda
Title: Re:Stupid helicopter and artilery wont play nice :(
Post by: macguba on 06 May 2003, 10:25:35
I don't know how you do it, but I do know that onMapSingleClick supports Alt-click, Shift-click and Ctrl-click (I think) as well as plain click.    So you can make Alt-click mean arty and Ctrl-click mean chopper.    If you can figure out how.

Look at the online command ref, there are a couple of helpful Comments there.
Title: Re:Stupid helicopter and artilery wont play nice :(
Post by: JediT1000 on 06 May 2003, 22:19:28
Yeah, i was thinkin that might work, next thing is trying to FIND that part lol, thanks though macguba, for reassuring that i wasnt completely insane thinking there was a alternative clicking style :)

So if anyone knows how to change the onmapsingleclick part to like say shift click or double click or control click, i would greatly appreciate the help :)

Morgs