EZJack 1 Posted February 18, 2012 Good day gentlemen, Here's the skinny... I'm attempting to use Simple Vehicle Respawn Script v1.7 script to re-spawn my VBIED cars in a multiplayer Insurgency 1.50 game. I have them set to names IED1, IED2 & IED3. I'll show example for #3. They are empty no-side cars that are placed for Opfor team to drive, it works perfect the first time for all 3 and explodes when in range of Bluefor like a charm. I use a simple IED script and a simple re-spawn script that supposedly saves the units name and INT line upon respawn. My problem is, once the car re-spawns the trigger will not activate for a second time. Does the trigger need to deactivate upon it's first act to properly act again? If so how would I go about that? Or maybe the trigger can not re-attach? This is all I can think of but I don't know how to rectify it. I must be missing something simple here... Been struggling with this problem for nearly a month now, a bit new to this whole scripting business so I'm hoping for some friendly input. Cheers and I hope someone can help. :) -EZJack Vehicle Properties: Name: IED3 Vehicle Initialization: veh = [this, 120, 0, 0, TRUE, FALSE, "IED3trig attachTo [iED3,[0,0,0]]"] execVM "vehicle.sqf"; IED3trig attachTo [iED3,[0,0,0]] (I have re-spawn set to 120 for testing purposes) Trigger Scripts: Activation: Blufor, Repeatedly, Present Name: IED3trig Condition: this && IsServer On Act: _boom = "ARTY_Sh_122_WP" createVehicle (getpos IED3); _bomb = "Bo_GBU12_LGB" createVehicle (getpos IED3); Share this post Link to post Share on other sites
kylania 546 Posted February 18, 2012 Maybe pull out the vehicle init part and add that separately. Like after you spawn it with the respawn script check if it's IED3 and if so reattach the IED to it? In case the init isn't properly creating the item or something? Share this post Link to post Share on other sites
EZJack 1 Posted February 19, 2012 Maybe pull out the vehicle init part and add that separately. Like after you spawn it with the respawn script check if it's IED3 and if so reattach the IED to it? In case the init isn't properly creating the item or something? i hate to say it but how would i go about that? if this is some script i need to make from scratch i'm up the creek. Trohpe the maker of the respawn script suggested this which is a long the same lines, but i'm just as confused. Just a thought... could the IED3Trig still be attached to the old object when the new is created?Even though the new object will get the same name, it will be another object, since the old is destroyed and deleted. Maybe you need to detach the trigger before attaching it again. Here's an idea. Check the position (getpos) of the trigger after the vehicle has respawned. I don't know what happens to it when the object it was attached to disappears. It might get deleted or get thrown to position 0,0,0. Share this post Link to post Share on other sites
kylania 546 Posted February 19, 2012 The problem is the trigger is following the wreck of the vehicle and remaining there after respawn. If you trigger it, then run over to where it landed you'll trigger it again. The world around we talked about is as follows, find the section of code and add the part in red: if (_hasname) then {_unit setVehicleInit format ["%1 = this; this setVehicleVarName ""%1""",_unitname]; processInitCommands;}; [color="#FF0000"] if (_unit == IED3) then {IED3trig attachTo [iED3,[0,0,0]];}; [/color] _dead = false; The main problem remaining is the bomb crater left over from the first explosion. I've searched and searched and can't find the classnames for those impact craters to delete them, just the big "plane crash" ones which are craterLong. That and the fact that players would probably remember that SUV blowing up before so won't approach it again? :) Share this post Link to post Share on other sites
EZJack 1 Posted February 19, 2012 if (_hasname) then {_unit setVehicleInit format ["%1 = this; this setVehicleVarName ""%1""",_unitname]; processInitCommands;}; [color="#FF0000"] if (_unit == IED3) then {IED3trig attachTo [iED3,[0,0,0]];}; [/color] _dead = false; kylania, i'd like to thank you very much! that input of the red into the re-spawn trick worked perfect! just made it if (_unit == IED1) then {IED1trig attachTo [iED1,[0,0,0]];}; if (_unit == IED2) then {IED2trig attachTo [iED2,[0,0,0]];}; if (_unit == IED3) then {IED3trig attachTo [iED3,[0,0,0]];}; the in-game clean up removes craters, and the bomb cars are three different civilian vehicles that are very common among others spread across the map so it's hard to tell which ones are bombs and which are not. players can park there anywhere they want as ambushes or just drive them at things. hopefully will make the mission much more exciting! thanks again! Share this post Link to post Share on other sites
kylania 546 Posted February 19, 2012 Happy to have helped! Share this post Link to post Share on other sites