Jump to content
Sign in to follow this  
RazorFlint

Global Vehicle Initialization

Recommended Posts

Hi,

So I have a cargo script which allows me to load vehicles onto a C130, works brilliantly. Although when the vehicle is destroyed and then respawns the script for loading vehicles no longer works, while the respawn one does.

The scripts I use are:

The init for the empty C130 looks like this:

veh = [this, 240, 120, 0, TRUE] execVM "vehicle.sqf"; veh = [this] execVM "c130cargo.sqf";

I can load vehicles fine when it first spawns, but when it respawns i'm not able to load vehicles again. If someone could point me in the right direction on what do that would be great. Also I was wondering if I can globally enable this on all C130's as well.

Thanks!

Edited by RazorFlint

Share this post


Link to post
Share on other sites

I take it you're using Tophe's Simple Vehicle Respawn?

INIT field:

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.

veh = [this, 15, 10, 5, TRUE, FALSE, "this setDammage 0.5"] execVM "vehicle.sqf"

if you need to use quotations in your init, use double. like this:

veh = [this, 15, 10, 5, TRUE, FALSE, "hey = [this] execVM ""loadout.sqf"""] execVM "vehicle.sqf"

Also, remember that you need to put your init outside the vehicles script as well if you want

it to run initially:

hey = [this] execVM "loadout.sqf"; veh = [this, 15, 10, 5, TRUE, FALSE, "hey = [this] execVM ""loadout.sqf"""] execVM "vehicle.sqf"

Share this post


Link to post
Share on other sites
I take it you're using Tophe's Simple Vehicle Respawn?

Hey, yeah I couldn't attach a link scene as it was my first post. So it would look like this?

hey = [this] execVM "c130cargo.sqf"; veh = [this, 240, 120, 0, TRUE, FALSE, "hey = [this] execVM "c130cargo.sqf""] execVM "vehicle.sqf"

I'm really confused, sorry for so little input, I updated the main post links as well if that helps. :-)

Share this post


Link to post
Share on other sites

You need the extra quotation marks...

hey = [this] execVM "c130cargo.sqf"; veh = [this, 240, 120, 0, TRUE, FALSE, "hey = [this] execVM [color="#FF0000"]"[/color]"c130cargo.sqf"[color="#FF0000"]"[/color]"] execVM "vehicle.sqf"

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  

×