Jump to content

Trying to get a script to run on a respawned vehicle.

Recommended Posts

I've been at it all night trying to get a logistical script working on respawned vehicles. The specific mod is IgiLoad v0.9.6 which requires you to put an INIT string in to activate it on that vehicle. Works fine when it first spawns in, after respawn it wont work, even after putting the script in the correct spot:

_m = [this,45,300, 0, FALSE, FALSE,"execVM ""IgiLoad\IgiLoad.sqf"""]

I have tried and tried to get this to work. can anyone shed some light ont his problem for me please?


it seems that the _m string does not like execVM commands.... is there a way around this?

Link to comment
Share on other sites

You have to put a call to the whatever your respawn script is

Eggsample in the Mohawk init using the simple respawn script

null=[this] execVM "IgiLoad\IgiLoad.sqf"; veh = [this, 120, 0, 0, FALSE, FALSE, "null=[this] execVM ""IgiLoad\IgiLoad.sqf"""] execVM "vehicle.sqf";

Check the BI forum topic might have some more info http://forums.bistudio.com/showthread.php?173109-IgiLoad-script-logistical-support/page3

Link to comment
Share on other sites

The script still will not work after respawn. everythign works fine until after it respawns. copy pasted it right from the code you showed.

ive done massive research into this. I a sorta newb at this but i understand how code works. I dont see wh it isnt working as i have done exactly what it asks to do. if there is an alternative way of doing this I would love to know.

Link to comment
Share on other sites

You have to Reference igiload in the vehicle spawn script too

Something like

hey=[this] execvm "igiload\igiload.sqf"; veh=[this,120,0,0,false,false, "hey=[this] execvm ""igiload\igiload.sqf"""] execvm" vehicle.sqf"

Will let the init load first time then call it each respawn play about to find what suits you

Link to comment
Share on other sites

how would i go about putting this in the vehicle respawn script? sorry a little new to this

would i have to add anything to my vehicle.sqm file?

ah i see what you mean... but it still wont work after respawn:(. i really want to get this script to work it would bring so much more to the server...

Link to comment
Share on other sites

Call a function when respawning it, make a sqf and do something like FNC_VEHICLENAME_INIT {

_veh = _this select 0;

"_veh" null = [this] execvm "blabla.sqf";


Then you need to make a .sqf with the function and call the .sqf in the init so the function gets added.

Then you use the function in thr init line when respawning: null = [blabla] call FNC_whatever_init;

Im using another respawnscript for my missions and have edited it so that the functions work. Tho bare in mind this is merely a guide so that you get the general idea, this is a workaround for vehicleSetInit, as bis disabled it.

Link to comment
Share on other sites

i'm to busy right now in RL to really dive into this. the suggestions given previously should be working fine. I think you are just simply making minor mistakes on the code end of it. My suggestion would be to visit the bis forums and ask there if none of these options are working for you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Forum Statistics

    Total Topics
    Total Posts
  • Create New...