Jump to content
Sign in to follow this  
1para{god-father}

Script after respawn

Recommended Posts

I am calling a script from the initialisation of a vehicle, but when it is destroyed and respawn I need it to call the script again , how can i do that ?

_null = ch2 addaction ["Load ammobox","attachammo1\attach_ammobox.sqf"];

Share this post


Link to post
Share on other sites

I guess setVehicleInit and processInitCommands would do the trick...

BUT

I'd look for other ways to do it, to avoid the problems of processInitCommands and make it more efficient than one script running per vehicle. Tip: Use initfields for quick tests of concepts, but try to avoid actually using them as best you can.

Share this post


Link to post
Share on other sites

Which machines do you need to run the script? If it's just the one that is running the respawn script (usually best done on the server), then you can just add whatever initialization you want to the respawn script to run right after the vehicle is respawned.

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  

×