Page 15 of 18 FirstFirst ... 51112131415161718 LastLast
Results 141 to 150 of 172

Thread: Simple Vehicle Respawn Script

  1. #141
    Simple Human Respawn Script!!!!
    maybe its work?

  2. #142
    Simple Human Respawn doesn't require a script.

    Just place a marker called respawn_west and put this in your description.ext:
    Code:
    respawn = 3;
    respawnDelay = 10;

  3. #143
    ya i know it.sometime i play arma2: oa demo becas some friends haven't full game.and in demo respawn at base dosen't work so i try to find something like this...
    Last edited by Persian MO; Nov 11 2012 at 09:24.

  4. #144
    Newbie
    Join Date
    Aug 24 2011
    Location
    Carrickfergus, Northern Ireland
    Posts
    2
    I get an error saying can't find "vehicle.sqf"

  5. #145
    First Sergeant Tophe's Avatar
    Join Date
    Jun 4 2004
    Location
    Örebro/Sweden
    Posts
    925
    Author of the Thread
    Quote Originally Posted by NI_Mcknight View Post
    I get an error saying can't find "vehicle.sqf"
    Check your file path. You have either not put the script in the right place or you're pointing to the wrong path.

  6. #146
    Hi, i've been trying to get this working, my problem is a bit tricky so i'll try to be as much accurate as i can.
    I am running this mod: http://www.armaholic.com/page.php?id...ght=AMPHIBIOUS
    Along with ACE, lingor and lingor unit.
    So i set up all the vehicle respawns, i place 4 helos on the landing deck on top, they spawn in the game flawlessly (usually). I take a pilot, get into one UH-1Y and crash it straight in the ocean to see if the respawn script works. The first time it goes flawless, vehicle respawns in the same position, with the same direction, as i want it to. Reapeat the process and while it still respawns in the same position, the direction is set back to 0° as default (while i want it to be 90° to be alligned correctly with the other aircrafts parked). Here's what i put in the vehicle init:

    HTML Code:
    this setpos [getpos this select 0, getpos this select 1, 13]; veh = [this, 15, 120, 0, FALSE, FALSE, "this setpos [getpos this select 0, getpos this select 1, 13]; this setDir 90"] execVM "vehicle.sqf"
    As i said, the first time it works fine, the second time it does not, is it maybe due to the fact that it creates a new vehicle and doesn't keep the old init once it is destroyed again?
    I also thought about the collision model of the ship or something related to the engine. If this could help, i noticed that for an extremely brief time (as in 0.0001s) the vehicle spawns with 90° but then it glitches and gets oriented to 0° and spawns at like 1m above the landing deck. I've been editing for only 3 weeks so i might have missed something.

    EDIT: tried again with setposASL but the problem is still there, vehicle respawns just fine but not in the desired direction.
    Last edited by AlphaSixtyOne; Jul 10 2012 at 14:31.

  7. #147
    First Sergeant Tophe's Avatar
    Join Date
    Jun 4 2004
    Location
    Örebro/Sweden
    Posts
    925
    Author of the Thread
    Quote Originally Posted by AlphaSixtyOne View Post
    Hi, i've been trying to get this working, my problem is a bit tricky so i'll try to be as much accurate as i can.
    I am running this mod: http://www.armaholic.com/page.php?id...ght=AMPHIBIOUS
    Along with ACE, lingor and lingor unit.
    So i set up all the vehicle respawns, i place 4 helos on the landing deck on top, they spawn in the game flawlessly (usually). I take a pilot, get into one UH-1Y and crash it straight in the ocean to see if the respawn script works. The first time it goes flawless, vehicle respawns in the same position, with the same direction, as i want it to. Reapeat the process and while it still respawns in the same position, the direction is set back to 0° as default (while i want it to be 90° to be alligned correctly with the other aircrafts parked). Here's what i put in the vehicle init:

    HTML Code:
    this setpos [getpos this select 0, getpos this select 1, 13]; veh = [this, 15, 120, 0, FALSE, FALSE, "this setpos [getpos this select 0, getpos this select 1, 13]; this setDir 90"] execVM "vehicle.sqf"
    As i said, the first time it works fine, the second time it does not, is it maybe due to the fact that it creates a new vehicle and doesn't keep the old init once it is destroyed again?
    I also thought about the collision model of the ship or something related to the engine. If this could help, i noticed that for an extremely brief time (as in 0.0001s) the vehicle spawns with 90° but then it glitches and gets oriented to 0° and spawns at like 1m above the landing deck. I've been editing for only 3 weeks so i might have missed something.

    EDIT: tried again with setposASL but the problem is still there, vehicle respawns just fine but not in the desired direction.
    Not sure why it does that. Perhaps you should try and put 90° at the default direction for the heli (in the editor). And try putting setDir 90 in the initial init as well.

  8. #148
    love the script Tophe, but havin some trouble with the vehicle respawn location...

    this is the SQF snippet i created that is giving me trouble

    Code:
    hangar_1 = createVehicle ["Land_Mil_hangar_EP1", ([getMarkerPos "xtra_hangar_1" select 0,getMarkerPos "xtra_hangar_1" select 1,0.4]),[],0,"NONE"];
    hangar_1 setDir 150;
    
    a10_one = createVehicle ["A10_US_EP1", ([getMarkerPos "a10_1" select 0,getMarkerPos "a10_1" select 1,0.4]),[],0,"NONE"];
    a10_one setDir 330;
    a10_one setVehicleInit "veh = [this, 10, 10, 0, FALSE, FALSE] execVM ""vehicle.sqf"";";
    "xtra_hangar_1" is a marker on the map where the hangar spawns in.
    "a10_1" is a marker on the map where the A-10 spawns in.

    the problem I'm experiencing is that the A-10 respawns where it crashes instead of respawning in the hanger at marker "a10_1"... i've tried to modify your script but can't quite get it right.

    i'd truly appreciate all help you can provide as concisely as possible- coding is definitely something im not very good at and confuses me greatly at times.

    thanks in advance

  9. #149
    If you have a named vehicle eg. Veh1 and it is destroyed and then respawns, will the new vehicle inherit the given name from the previous one? if not, is there a way to do that?

  10. #150
    Version 1.7 keeps the name, if it had one.

Page 15 of 18 FirstFirst ... 51112131415161718 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •