Jump to content
Sign in to follow this  
gilbert21vb

Vehicle change side

Recommended Posts

***SOLUTION FOUND! SEE LAST POST!***

Backstory:

Im making a 3-team Tank duel.

The only way to do make the teams even is to give them all the same tanks. (namely the M1)

Now i need to make the (team designated) M1's spawn in the teams own spawn area, West, East and guerilla.

So far, all the M1's spawn in the west spawn area even though ive designated sides in the mission.sqm

Quote[/b] ]            class Item5

           {

                 position[]={14237.989258,22.937897,16200.874023};

                 azimut=-46.170502;

                 id=11;

                 side="EAST";

                 vehicle="M1Abrams";

                 skill=0.600000;

                 text="m1_o2";

           };

Someone enlighten me, please  icon_rolleyes.gif

Share this post


Link to post
Share on other sites

You could use the RACS M1 addon. And set "Independant" side as enemy to USA?

Share this post


Link to post
Share on other sites

I'm not looking to install addons to resolve the problem.

That would only bring a new set of problems.

and before someone says that i can use the command:

vehicle1 side = "east"

the command cant be used like that and is of no use to me.

Share this post


Link to post
Share on other sites

how are you respawning vehicles? with karrilions vrs script? or are you using the in-built respawnVehicle command?

which ever you are using, probably a good way is to have ALL the M1A1's spawn at some 'out-of-the-way-spot' on the map.

then depending on the vehicleVarName of the abrams setdir and then setpos them to some specific point at each base.

Share this post


Link to post
Share on other sites

Im using the ingame respawn thingy

ive decided to go with the respawn in a far-away place and move the vehicles to the team base markers..

now, ive tried the setPos command a couple of times and i just cant seem to get it right.

what is the simplest working setPos command to move a vehicle from the respawn pos to the marker pos?

im a dork at theese commands, so i need the command-for-dummies version of the answer tounge2.gif

Share this post


Link to post
Share on other sites

place a gamelogic at the place you want to move it to:

tankname setpos (getpos markername)

Share this post


Link to post
Share on other sites

that worked...  now all i need is a trigger that detects when an empty vehicle spawns..

disregard...

im done. thanx for the assistance

Share this post


Link to post
Share on other sites
that worked... now all i need is a trigger that detects when an empty vehicle spawns..

but of course biggrin_o.gif

why do you need a trigger to detect the respawn? Surely if it's respawning, its a script doing the work, thus you just edit that script to include what you wanted the trigger to do at respawn.

(I'm basing this on older knowledge mind - respawning vehicles still requires a script yes?)

Share this post


Link to post
Share on other sites

negative, vehicles can respawn just like players, using a respawn_vehicle_west marker.. and a init.sqf file

Share this post


Link to post
Share on other sites

aah, buggery, not so simple then (obviously)

respawn and MP scripting isn't exactly my forte, nor can I realistically think of a method of checking for spawned vehicles on the fly - if it's an inbuilt script with Arma, it makes it harder as we can't just reverse engineer it and see if we can add variables/names etc to the spawned vehicles...

I'm sure there's a way, but I just don't know this area so well. It'll probably be dead simple too whistle.gif

(well, actually, a very very long winded way would be to do a count of all vehicles on the map, then when that number decreases through one being killed, the count can then wait for it to increase again, thus it knows a vehicle has been spawned. Then you can apply a name to that vehicle, conditions, check if its empty, etc - but this is stupidly long winded and tedious, and there has to be an easy method)

Share this post


Link to post
Share on other sites

i made a trigger to detect when the vehicle died, then added a countdown corresponding to the respawn delay...

worked like a charm...

keep it simple biggrin_o.gif  .. oh, and i hate scripting..  crazy_o.gif

Here's a backbrief

*Place a marker called  "Respawn_vehicle_west" in a desolate area.

*Add "respawnVehicleDelay=xx" to description.ext

*Add "vehicle1 respawnVehicle [xx];" to init.sqf.   (xx = same as above)

*Place Gamelogic where you want the vehicle moved to.

*Make trigger "!alive vehicle1" with countdown xx (same as respawn delay+1) with the action: "vehicle1 setPos (getPos gamelogic)"

Hope this can assist others with same dilemma as me :-)  (being n00b, that is)

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  

×