Jump to content
Sokoloft

[Solved]Virtual Vehicle Spawner Script on the USS Nimitz

Recommended Posts

Following that command that you gave me I made this and put it into a trigger in the on activation field, and you activate it via the radio alpha. Going to load in and see if it works now, as well as I have the Z for height set to sea level I can check in zues to see if it actually spawns it or not at a different height.

"VVS_air_168" setMarkerPos [14572.233, 518.388, 18.5]; //#1 Cat 1
"VVS_air_169" setMarkerPos [14588.308, 532.98, 18.5]; //#2 Cat 2
"VVS_air_170" setMarkerPos [14551.652, 620.876, 18.5]; //#3 Cat 3
"VVS_air_171" setMarkerPos [14551.985, 643.074, 18.5]; //#4 Cat 4
"VVS_air_172" setMarkerPos [14527.607, 677.464, 18.5]; //#5 Heli Elevator 
"VVS_air_173" setMarkerPos [14518.79, 612.731, 18.5];  //#6 vehicle spawn

I used objects initially and just copy pasted their x/y, hopefully this works.

Share this post


Link to post
Share on other sites

u can use this for changing marker position to the desired height:

"VVS_air_173" setMarkerPos ((getMarkerPos "VVS_air_173") vectorAdd [0, 0, 18.5]);

but as I said idk if that will work because the wiki page for setMarkerPos says it handles a 2D position array only. But there is a note which says the opposite thing...

  • Like 1

Share this post


Link to post
Share on other sites

Unfortunately it didn't, it is still spawning vehicles at 0, right above the water. When I activated the trigger there was no black box indicating an error, so it must of done something? Didn't make it repeatable so going to do that to confirm there is no error, as well as I was thinking wile looking at the GUI for attributes in the editor, there are 2 different Z positions, a Z for rotation Z for a position. However it should be indicated correctly because it's setMarkerPos, is the syntax wrong?? I'm understanding it like this:

"VVS_air_173" setMarkerPos [14518.79, 612.731, 18.5];

"markername" commandPos [X, Y, Z];

EDIT:

 

Just saw your post, going to try now.

Share this post


Link to post
Share on other sites

Okay so now how should I have this configured, is it one or the other lines of code, or is it both?

As well as do I need to edit the Two 0 values? Are they X/Y?                                              X    Y

"VVS_air_168" setMarkerPos ((getMarkerPos "VVS_air_168") vectorAdd [0, 0, 18.5]);
"VVS_air_169" setMarkerPos ((getMarkerPos "VVS_air_169") vectorAdd [0, 0, 18.5]);
"VVS_air_170" setMarkerPos ((getMarkerPos "VVS_air_170") vectorAdd [0, 0, 18.5]);
"VVS_air_171" setMarkerPos ((getMarkerPos "VVS_air_171") vectorAdd [0, 0, 18.5]);
"VVS_air_172" setMarkerPos ((getMarkerPos "VVS_air_172") vectorAdd [0, 0, 18.5]);
"VVS_air_173" setMarkerPos ((getMarkerPos "VVS_air_173") vectorAdd [0, 0, 18.5]);

And

"VVS_air_168" setMarkerPos [14572.233, 518.388, 18.5];
"VVS_air_169" setMarkerPos [14588.308, 532.98, 18.5];
"VVS_air_170" setMarkerPos [14551.652, 620.876, 18.5];
"VVS_air_171" setMarkerPos [14551.985, 643.074, 18.5];
"VVS_air_172" setMarkerPos [14527.607, 677.464, 18.5];
"VVS_air_173" setMarkerPos [14518.79, 612.731, 18.5];

In the same trigger, in the on activation box, or in two separate triggers, both triggered via the alpha radio. I'm lost >_< :wacko:

 

EDIT:

Going to add the X/Y to those two zero fields and try that in a trigger

 

EDIT2: So like this??

"VVS_air_168" setMarkerPos ((getMarkerPos "VVS_air_168") vectorAdd [14572.233, 518.388, 18.5]);
"VVS_air_169" setMarkerPos ((getMarkerPos "VVS_air_169") vectorAdd [14588.308, 532.98, 18.5]);
"VVS_air_170" setMarkerPos ((getMarkerPos "VVS_air_170") vectorAdd [14551.652, 620.876, 18.5]);
"VVS_air_171" setMarkerPos ((getMarkerPos "VVS_air_171") vectorAdd [14551.985, 643.074, 18.5]);
"VVS_air_172" setMarkerPos ((getMarkerPos "VVS_air_172") vectorAdd [14527.607, 677.464, 18.5]);
"VVS_air_173" setMarkerPos ((getMarkerPos "VVS_air_173") vectorAdd [14518.79, 612.731, 18.5]);

EDIT3: So that did something, it spawned the vehicle no were near the nimitz, even though it's supposed to be the correct X/Y/Z ugh, getting sick of this, wish it would just work :/

Share this post


Link to post
Share on other sites

Alright, well I tried this:

"VVS_air_168" setMarkerPos ((getMarkerPos "VVS_air_168") vectorAdd [14572.233, 518.388, 18.5]);
"VVS_air_169" setMarkerPos ((getMarkerPos "VVS_air_169") vectorAdd [14588.308, 532.98, 18.5]);
"VVS_air_170" setMarkerPos ((getMarkerPos "VVS_air_170") vectorAdd [14551.652, 620.876, 18.5]);
"VVS_air_171" setMarkerPos ((getMarkerPos "VVS_air_171") vectorAdd [14551.985, 643.074, 18.5]);
"VVS_air_172" setMarkerPos ((getMarkerPos "VVS_air_172") vectorAdd [14527.607, 677.464, 18.5]);
"VVS_air_173" setMarkerPos ((getMarkerPos "VVS_air_173") vectorAdd [14518.79, 612.731, 18.5]);

That didn't work, it had moved the X/Y position out of the zone in one of the corners of the map for whatever reason. The Z doesn't work at all either. Should we go back to our old plan of trying to use a trigger to TP it to a height? Idk what to do..

 

I also tried this:

"VVS_air_168" setMarkerPos ((getMarkerPos "VVS_air_168") vectorAdd [0, 0, 18.5]);
"VVS_air_169" setMarkerPos ((getMarkerPos "VVS_air_169") vectorAdd [0, 0, 18.5]);
"VVS_air_170" setMarkerPos ((getMarkerPos "VVS_air_170") vectorAdd [0, 0, 18.5]);
"VVS_air_171" setMarkerPos ((getMarkerPos "VVS_air_171") vectorAdd [0, 0, 18.5]);
"VVS_air_172" setMarkerPos ((getMarkerPos "VVS_air_172") vectorAdd [0, 0, 18.5]);
"VVS_air_173" setMarkerPos ((getMarkerPos "VVS_air_173") vectorAdd [0, 0, 18.5]);

This doesn't mess up the X/Y, however it doesn't change the Z :/ What am I doing wrong...

Share this post


Link to post
Share on other sites

ur last code snippet is correct. it seems that u cant change the height of the markers. u ve to wait until tomorrow. i ll try to get the condition field of the trigger work.

Share this post


Link to post
Share on other sites

Alright, look forward to hearing from you tomorrow, again, Thank you.

Share this post


Link to post
Share on other sites

condition field:

(({(getPosASL _x) select 2 < 23.42} count thisList > 0) and this)

on activation field:

nul = {_x setPosASL (getPosASL nimitz_pad_1);} count thislist;

both tested and working

  • Like 1

Share this post


Link to post
Share on other sites

This is awesome, thank you so much!

condition field:

(({(getPosASL _x) select 2 < 23.42} count thisList > 0) and this)

on activation field:

nul = {_x setPosASL (getPosASL nimitz_pad_1);} count thislist;

both tested and working

 

Worked no problem, edited the pads and works like a charm. Now all I got to do is tie up some loose ends and it's ready for my friends Dedi, Thanks again!

 

EDIT:

 

Btw, were do I edit the tread to put [solved] in front of the name >_<

  • Like 1

Share this post


Link to post
Share on other sites

Btw, were do I edit the tread to put [solved] in front of the name >_<

edit ur first post, then press the button for advanced editor (or something like that). after that u can edit the topic name.

  • Like 1

Share this post


Link to post
Share on other sites

edit ur first post, then press the button for advanced editor (or something like that). after that u can edit the topic name.

 

Awesome, thanks for all your help man, really appreciate it, wouldn't of been able to do it the way I wanted to if you didn't help. So thanks a lot! Once I upload my mission via steam workshop I'll link it to you via a private message.

  • Like 1

Share this post


Link to post
Share on other sites

Awesome, thanks for all your help man, really appreciate it, wouldn't of been able to do it the way I wanted to if you didn't help. So thanks a lot! Once I upload my mission via steam workshop I'll link it to you via a private message.

I thank u for helping me to understand some things better by helping u with ur problem :-)

Its not neccessary that u pm me that link because I m not really playing arma, I m just scripting...

  • Like 1

Share this post


Link to post
Share on other sites

Hey, I got one more question. I got everything setup, and it's working pretty good. I got some VR blocks under the water to use as a pedestal for the vehicles to sit on when they're spawned in. However the trigger won't teleport some vehicles for whatever reason. Like the AH64D Apache or the Harrier. Not sure why, but they just sit on the pedestal. Would the < 23.42 be affecting why, because different heli's/jets are different heights, so some just aren't getting picked up?

(({(getPosASL _x) select 2 < 23.42} count thisList > 0) and this)

In one of your older post's I had remembered you saying that the 23.42 was the height at which the trigger would scan for a vehicle, let me know. I mostly got it working, just not sure why it wont TP things sometimes. It sometimes works and then it sometimes doesn't, you have to re-call in the vehicle. Even though there is one sitting on the 10x10 VR block.

 

EDIT:

 

I fixed it, the problem was that the triggers weren't close enough to them on the Z axis. Works beautifully, again thanks! However I still am kinda curious what the 23.42 stands for? The Nimitz deck height? I would imagine that would be determined by the object dictated in the on activation snippet.

Share this post


Link to post
Share on other sites

I think the 23.42 was just a random number offered by sarogahtyp. But the meaning of that is to exclude planes/choppers that happen to fly over the area at the exact moment. Its around 5m above the nimitz deck (18+5 = 23). Happy to see you got it solved.

  • Like 2

Share this post


Link to post
Share on other sites

I think the 23.42 was just a random number offered by sarogahtyp. But the meaning of that is to exclude planes/choppers that happen to fly over the area at the exact moment. Its around 5m above the nimitz deck (18+5 = 23). Happy to see you got it solved.

 

that exactly is the sense of it. 18 (nimitz height) + 5 (treshhold) = 23  and the 42 ... thats not random ... 42 is the solution for just everything ;-)

Share this post


Link to post
Share on other sites

Hello guys, I hope someone reads this soon. 

Getting to the point, I want to do the exact same thing on a LHD.

I have tried following your steps but I don´t really have make it work. 

My idea is to make the light vehicles spawn on the mid deck, the heavy and boats on the bottom deck and air transport on the flight deck. 

Could someone help me?

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

×