Forum Jump :

Author Message


Posts: 8
Rank:


Level: Member

Country: us
Location:
Occupation:
Age: 25
In-game name: =UBG= case-1489

 
#1 Posted at 2012-05-29 00:13        
     
What I am needing is this addaction to respawn on the C130
this addAction ["Green on - GO!", "parascript.sqf"];


Author Message


Posts: 1251
Rank:


Level: Member PFS

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

 
#2 Posted at 2012-05-29 02:50        
     
I haven't done any work with MP but you could try something like this

planename setVehicleInit "this addAction ['Green on - GO!', 'parascript.sqf']";

This would probably go in the respawn code and you would have to name the plane.


Advertisement


Author Message


Posts: 8
Rank:


Level: Member

Country: us
Location:
Occupation:
Age: 25
In-game name: =UBG= case-1489

 
#3 Posted at 2012-05-29 03:16        
     
Well the vehicle respawn script that I am using is the Simple Vehicle Respawn and I thank that will not work and plus I wouldn't even know where to put that in the vehicle respawn script that i am using


Author Message


Posts: 1251
Rank:


Level: Member PFS

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

 
#4 Posted at 2012-05-29 12:03        
     
I see, he's included some script to take care of the init anyway you just need to add it to the code calling the respawn script

  veh = [this, 15, 10, 5, TRUE, FALSE, "this addAction ["Green on - GO!", "parascript.sqf"];] execVM "vehicle.sqf"

try placing it in the original planes init, you will need to set the numbers up as you require them, the last part in quotes is the init.

This is what he has written in the notes.

If you you want to set the INIT field of the respawned vehicle, first set all other
values, then set init commands. Those must be inside quotations.
Like this:
veh = [this, 15, 10, 5, TRUE, FALSE, "this setDammage 0.5"] execVM "vehicle.sqf"

Default values of all settings are:
veh = [this, 30, 120, 0, FALSE, FALSE] execVM "vehicle.sqf"


Author Message


Posts: 8
Rank:


Level: Member

Country: us
Location:
Occupation:
Age: 25
In-game name: =UBG= case-1489

 
#5 Posted at 2012-05-30 00:28        
     
I tried it that way and it gave me an error like this ] it said I needed that but I found a way to get it to respawni just needed to just do this
;------------------------------------------------
;By A.Ryan A.K.A. Taco3866521
;
;usage:
;add this to the vehicles init line
;[this, Delay] exec "Vehrespawn.sqs"
;Example:
;
;[this, 20] exec "vehrespawn.sqs"
;------------------------------------------------
_veh=_this select 0
_vehrespawntime=_this select 1
_type=typeOf _veh
_spawnpos= (getpos _veh)
_spawndir=(getdir _veh)
_vehname=vehicleVarName _veh
_begin=true
#start
@ (! alive _veh)
?(_begin2): _veh removeaction act1;
?(_begin): goto "skip"
act1 = _veh addAction ["Green on - GO!", "parascript.sqf"]
#skip
@ (alive player)
~_vehrespawntime
_veh=_type createvehicle _spawnpos
_veh setdir _spawndir
_veh setvehicleVarName _vehname
act1 = _veh addAction ["Green on - GO!", "parascript.sqf"]
_begin2=true
goto "start"
and add DMZ_delete to the vehicle INIT and it works