Jump to content
Sign in to follow this  
Meatball0311

Can I attach invisible helo pads together??

Recommended Posts

I want to attach some invisible helo pads together. How do I do this?

I have onMapSingleClick "EXLZ setPos _pos; setfire=false"; to place EXLZ at mapclick pos. What I would like to do is have "EXLZ2" also placed 1000 meters to the left of "EXLZ".

I am thinking if I could attach EXLZ2 to EXLZ then they would move together? Any suggesstions?

Share this post


Link to post
Share on other sites

I dont think that attaching command is the good thing in here, i would just getPos the first LZ and than setPos the second while adjusting the postition

Share this post


Link to post
Share on other sites

I am having trouble using that... how would you suggest me using setPos to a position 1000 meters to the left?

can you show me the code?

This is what I got so far and

~0.5

player sideChat "THOR this is Spartan... requesting extraction... stand by for grid. Over.";

setfire=true;

~5

titleText ["Roger, standing by for extraction grid","plain down"];

~2

titleText ["Click on the map to set your Extraction LZ","plain down"];

onMapSingleClick "EXLZ setPos _pos; setfire=false";

@!setfire;

_LZpos = getPos EXLZ;

~0.5

_posX = _LZpos select 0;

_posY = _LZpos select 1;

_posZ = _LZpos select 2;

~0.1

_EXLZ2pos = [_posX - 1000, _posY - 1000, _posZ 0];

EXLZ2 setPos _LZpos; ** the marker and EXLZ2 (invisible helo pad) move to positon EXLZ. How would I get them to move to positon -1000x, -1000y from positon EXLZ?

"EXdirection" setmarkerpos getPos EXLZ;

"EXLZ2marker" setmarkerpos getPos EXLZ2;

Edited by Meatball0311

Share this post


Link to post
Share on other sites

wouldn't you just want that highlighted line to read

EXLZ2 setpos _EXLZ2pos;

? If I'm reading this correctly, _LZpos is never changed by your code, and the _EXLZ2pos variable is the one you have modified to give the position you want.

Share this post


Link to post
Share on other sites

Yes that is what it may seem, but for some reason it does not give it that location?? Am I doing this right isnt -1000x left a thousand meters and -1000y isnt that south a thousand meters?

Share this post


Link to post
Share on other sites

You don't need semi-colons in SQS to end a line.

Needed proper onMapSingleClick syntax.

You need to use more math to get exact directions but x-1000 y-1000 will set it ~1400m to the southwest.

~0.5
player sideChat "THOR this is Spartan... requesting extraction... stand by for grid. Over."
setfire=true
~5
titleText ["Roger, standing by for extraction grid","plain down"]
~2
titleText ["Click on the map to set your Extraction LZ","plain down"]

onMapSingleClick "EXLZ setPos _pos; setfire=false; onMapSingleClick ''; true"
@!setfire

EXLZ2 setPos [((getPos EXLZ) select 0) - 1000),(((getPos EXLZ) select 1) - 1000),((getPos EXLZ) select 2)]

"EXdirection" setmarkerpos getPos EXLZ
"EXLZ2marker" setmarkerpos getPos EXLZ2

Share this post


Link to post
Share on other sites

I have tried it and still no movement....

EXLZ2 setPos [((getPos EXLZ) select 0) - 1000),(((getPos EXLZ) select 1) - 1000),((getPos EXLZ) select 2)]

this looks to be right? but for some reason it is not working. I will post my entire script

~0.5

player sideChat "THOR this is Spartan... requesting extraction... stand by for grid. Over."

setfire=true

~5

titleText ["Roger, standing by for extraction grid","plain down"]

~2

titleText ["Click on the map to set your Extraction LZ","plain down"]

onMapSingleClick "EXLZ setPos _pos; setfire=false; onMapSingleClick ''; true"

@!setfire

I know that something has to go here for helopad EXLZ2 to setPos EXLZ [((getPos EXLZ) select 0) - 1000),(((getPos EXLZ) select 1) - 1000),((getPos EXLZ) select 2)

what am I missing for the code to work?

"EXdirection" setmarkerpos getPos EXLZ

"EXLZ2marker" setmarkerpos getPos EXLZ2

onMapSingleClick "";

titleText ["", "plain down"]

~5

TitleText ["Spartan we copy extract grid... extract inbound. Over","Plain Down"]

~0.1

_pilotspawnpos1 = getMarkerPos "pilotspawnpos"

_pilotspawnpos2 = getMarkerPos "pilotspawnpos"

_pilotspawnpos3 = getMarkerPos "pilotspawnpos"

_pilotspawnpos4 = getMarkerPos "pilotspawnpos"

; create pilots

_HeloA = creategroup WEST

_leader = "USMC_Soldier_Pilot" createUnit [_pilotspawnpos1, _HeloA, "leader1=this"]

_p2 = "USMC_Soldier_Pilot" createUnit [_pilotspawnpos2, _HeloA, "P2=this"]

_p3 = "USMC_Soldier_Pilot" createUnit [_pilotspawnpos3, _HeloA, "P3=this"]

_p4 = "USMC_Soldier_Pilot" createUnit [_pilotspawnpos4, _HeloA, "P4=this"]

leader1 setFace "face9"

leader1 setSkill 1

leader1 setDamage 0

leader1 setRank "COLONEL"

leader1 moveInDriver UH1

P2 setFace "face10"

P2 setSkill 1

P2 setDamage 0

P2 moveInDriver UH2

P3 setFace "face11"

P3 setSkill 1

P3 setDamage 0

P3 moveInDriver UH3

P4 setFace "face12"

P4 setSkill 1

P4 setDamage 0

P4 moveInDriver UH4

~1

[leader1,"UH1"] execVM "markerfunction.sqf"

[P2,"UH2"] execVM "markerfunction.sqf"

[P3,"UH3"] execVM "markerfunction.sqf"

[P4,"UH4"] execVM "markerfunction.sqf"

#CHECK

_UH1 = UH1

UH1 setSpeedMode "FULL"

UH1 setBehaviour "COMBAT"

UH1 doMove getPos EXLZ

leader1 doWatch EXLZ

? (UH1 distance EXLZ) < 2500 : goto "UH1"

~5

UH2 setSpeedMode "FULL"

UH2 setBehaviour "COMBAT"

UH2 doMove getPos EXLZ

P2 doWatch EXLZ

? (UH2 distance EXLZ) < 2600 : goto "UH2"

~5

UH3 setSpeedMode "FULL"

UH3 setBehaviour "COMBAT"

UH3 doMove getPos EXLZ

P2 doWatch EXLZ

? (UH3 distance EXLZ) < 2700 : goto "UH3"

~5

UH4 setSpeedMode "FULL"

UH4 setBehaviour "COMBAT"

UH4 doMove getPos EXLZ

P4 doWatch EXLZ

? (UH4 distance EXLZ) < 2800 : goto "UH4"

~1

goto "CHECK"

#UH1

leader1 sideChat "This is Eagle1... 30 seconds"

_UH1 setSpeedMode "LIMITED"

? (UH1 distance EXLZ) < 1000 : goto "UH1K"

~2

goto "UH1"

#UH2

UH2 setSpeedMode "LIMITED"

? (UH2 distance EXLZ) < 1000 : goto "UH2K"

~2

goto "UH2"

#UH3

UH3 setSpeedMode "LIMITED"

? (UH3 distance EXLZ) < 1000 : goto "UH3K"

~2

goto "UH3"

#UH4

UH4 setSpeedMode "LIMITED"

? (UH4 distance EXLZ) < 1000 : goto "UH4K"

~2

goto "UH4"

#UH1K

leader1 sideChat "TEST"

Edited by Meatball0311

Share this post


Link to post
Share on other sites

SQS is apparently dumb, but the following works

~0.5
player sideChat "THOR this is Spartan... requesting extraction... stand by for grid. Over."
setfire=true
~5
titleText ["Roger, standing by for extraction grid","plain down"]
~2
titleText ["Click on the map to set your Extraction LZ","plain down"]

onMapSingleClick "EXLZ setPos _pos; setfire=false; onMapSingleClick ''; true"
@!setfire

_pos = position EXLZ
_posx = (_pos select 0) - 1000 
_posy = (_pos select 1) - 1000
_posz = _pos select 2

EXLZ2 setPos [_posx,_posy,_posz]

"EXdirection" setmarkerpos getPos EXLZ
"EXLZ2marker" setmarkerpos getPos EXLZ2

titleText ["", "plain down"]
~5
TitleText ["Spartan we copy extract grid... extract inbound. Over","Plain Down"]
~0.1

Share this post


Link to post
Share on other sites

Thanks a lot!! That helped me out. Actually what I have is 4 helo pads placed on one onMapSingleClick! So I am now moving onto getting my 4 helo's to land in a Y formation..

Working out the landing atm so will update script when I get it complete!

This is what I have so far:

~0.5

player sideChat "THOR this is Spartan... requesting extraction... stand by for grid. Over."

setfire=true

~5

titleText ["Roger, standing by for extraction grid","plain down"]

~2

titleText ["Click on the map to set your Extraction LZ","plain down"]

onMapSingleClick "EXLZ setPos _pos; setfire=false; onMapSingleClick ''; true"

@!setfire

_pos = position EXLZ

_posx = (_pos select 0) - 400

_posy = (_pos select 1) + 300

_posz = _pos select 2

EXLZ2 setPos [_posx,_posy,_posz]

EXLZ3 setPos [_posx + 800,_posy,_posz]

EXLZ4 setPos [_posx + 400,_posy - 700,_posz]

"EXLZmarker" setmarkerpos getPos EXLZ

"EXLZ2marker" setmarkerpos getPos EXLZ2

"EXLZ3marker" setmarkerpos getPos EXLZ3

"EXLZ4marker" setmarkerpos getPos EXLZ4

onMapSingleClick "";

titleText ["", "plain down"]

~3

TitleText ["Spartan we copy extract grid... extract inbound. Over","Plain Down"]

~0.1

_pilotspawnpos1 = getMarkerPos "pilotspawnpos"

_pilotspawnpos2 = getMarkerPos "pilotspawnpos"

_pilotspawnpos3 = getMarkerPos "pilotspawnpos"

_pilotspawnpos4 = getMarkerPos "pilotspawnpos"

; create pilots

_HeloA = creategroup WEST

_leader = "USMC_Soldier_Pilot" createUnit [_pilotspawnpos1, _HeloA, "leader1=this"]

_p2 = "USMC_Soldier_Pilot" createUnit [_pilotspawnpos2, _HeloA, "P2=this"]

_p3 = "USMC_Soldier_Pilot" createUnit [_pilotspawnpos3, _HeloA, "P3=this"]

_p4 = "USMC_Soldier_Pilot" createUnit [_pilotspawnpos4, _HeloA, "P4=this"]

leader1 setFace "face9"

leader1 setSkill 1

leader1 setDamage 0

leader1 setRank "COLONEL"

leader1 moveInDriver UH1

P2 setFace "face10"

P2 setSkill 1

P2 setDamage 0

P2 moveInDriver UH2

P3 setFace "face11"

P3 setSkill 1

P3 setDamage 0

P3 moveInDriver UH3

P4 setFace "face12"

P4 setSkill 1

P4 setDamage 0

P4 moveInDriver UH4

~1

[leader1,"UH1"] execVM "markerfunction.sqf"

[P2,"UH2"] execVM "markerfunction.sqf"

[P3,"UH3"] execVM "markerfunction.sqf"

[P4,"UH4"] execVM "markerfunction.sqf"

#CHECK

UH1 setSpeedMode "FULL"

UH1 setBehaviour "COMBAT"

UH1 doMove getPos EXLZ

~5

UH2 setSpeedMode "FULL"

UH2 setBehaviour "COMBAT"

UH2 doMove getPos EXLZ

~5

UH3 setSpeedMode "FULL"

UH3 setBehaviour "COMBAT"

UH3 doMove getPos EXLZ

~5

UH4 setSpeedMode "FULL"

UH4 setBehaviour "COMBAT"

UH4 doMove getPos EXLZ

~5

? (UH1 distance EXLZ) < 2000 : goto "UH1K"

~1

goto "CHECK"

#UH1K

UH1 setSpeedMode "LIMITED"

UH2 setSpeedMode "LIMITED"

UH3 setSpeedMode "LIMITED"

UH4 setSpeedMode "LIMITED"

leader1 doWatch EXLZ

P2 doWatch EXLZ2

P3 doWatch EXLZ3

P4 doWatch EXLZ4

UH2 doMove getPos EXLZ2

UH3 doMove getPos EXLZ3

UH4 doMove getPos EXLZ4

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×