Forum Jump :

Author Message


Posts: 50
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2010-09-21 22:36        
     
ok so like im trying to improve the evolution map and im trying to ass a respawn script that i downloaded and i did everything that it said to do but it isnt working so i need help anyone wanna help


Author Message

Dead3yez  

I am evil


Posts: 3113
Rank:


Level: Member

Country: en
Location: North Yorkshire
Occupation: dead3yez
Age: 29
In-game name: dead3yez

 
#2 Posted at 2010-09-21 22:41        
     
You're trying to ass a respawn script? *SCRATCH*

Well, perhaps you could start by explaining what you have done and paste the script here. Also note the changes you have made.


Advertisement


Author Message


Posts: 50
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2010-09-22 22:50        
     
ok well what i have done is added the vehicles i wanted and i downloaded this script (shown at bottom) and i followed everthing it said like put this command in the vehicle init line v = [this, "vehicle name", x] execVM "vrs_move.sqf" i changed the name and changed X to the time i wanted it to respawn so i put 10 so it looks like this for a vehicle v = [this, "alpha1", 10] execVM "vrs_move.sqf" but here is the whole script from the file

Here's the updated alternate vehicle respawn script in which the respawn timer only begins counting down when the crew bail.

Code Sample
/*
VEHICLE RESPAWN SCRIPT SQF

Respawns vehicles when they are destroyed, cannot move or cannot fire

© JUNE 2007 - norrin (norrins_nook@iprimus.com.au), based upon KaRRiLLioN's original vrs.sqf script.

Version: 2.0
******************************************************************************************
***************************
IMPORTANT: ADD A GAMELOGIC NAMED Server to the mission to prevent multispawn

To run this script place the following code in the init line of the vehicle:
v = [this, "vehicle name", x] execVM "vrs_move.sqf"
where x is the time you wish to set for the vehicle dammaged/destroyed respawn delay
Note: the vehicle name must be in quotation marks eg. if vehicle name's Hmm1 it must appear in the init line as "Hmm1",
if you don't want to name your vehicles just put "" in place of the vehicles name

******************************************************************************************
****************************
Start VRS_Move.sqf
*/

private ["_vcl","_respawndelay","_dir","_pos","_type","_run","_delay"];

if (!local Server) exitWith {};

_vcl = _this select 0;
_name_vcl = _this select 1;
_respawndelay = _this select 2;
_dir = Getdir _vcl;
_pos = Getpos _vcl;
_type = typeOf _vcl;

_run = TRUE;
sleep 5;

for [{}, {_run}, {_run}] do
{
while {canMove _vcl || canFire _vcl} do
{
sleep 1;
};
while {!canMove _vcl && count crew _vcl > 0 || !canFire _vcl && count crew _vcl > 0} do
{
sleep 1;
};
_delay = Time + _respawndelay;
while {!canMove _vcl && Time < _delay && count crew _vcl == 0 || !canFire _vcl && Time < _delay && count crew _vcl == 0} do
{
sleep 1;
};
if (!canMove _vcl && Time >= _delay && count crew _vcl == 0 || !canFire _vcl && Time >= _delay && count crew _vcl == 0) then
{
deleteVehicle _vcl;
_vcl = _type createVehicle _pos;
_vcl setVehicleVarName _name_vcl;
_vcl setdir _dir;
sleep 1;
_vcl setvelocity [0,0,0];
_vcl setpos _pos;
sleep 1;
_vcl setvelocity [0,0,0];
sleep 2;
};
};


Author Message

Pirin  



Posts: 1547
Rank:


Level: Member

Country: us
Location: Atlanta, GA
Occupation: IT
Age: 45
In-game name: kylania

 
#4 Posted at 2010-09-23 00:02        
     
The vehicle is named "alpha1" and you've made sure that the script isn't called vrs_move.sqf.txt?


Author Message


Posts: 50
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#5 Posted at 2010-09-23 21:39        
     
yep im sure unless i should put .txt at the end cuz i never did and it doesnt say to in the directions

Added 4 minutes later:

i uploaded the map on a file share website if you want to take a look at it to really get an idea of the problem then ill give you the link in a private msg