Smurf_Impact Posted December 25, 2008 Share Posted December 25, 2008 Hello, I currently have a problem with some new items I am trying to put in-game. When the item triggers, it destroys itself. You guessed it, those are timed mines. The problem is that when I reload a save game, the item stays destroyed/disabled. It there is any known way to fix this bug ? Another problem is that when I reload the saved game and that the explosive is planted (init == 1), it automatically causes the explosion without delay. Here's the script for the item. float timer short init short active short button short reset begin OnEquip if(init == 0 && active == 0) set active to 1 set button to 0 ShowMessage TimedMineMsg DropMe endif end begin OnDrop if(init == 0 && active == 0) set active to 1 set button to 0 ShowMessage TimedMineMsg endif end begin OnGrab if(init == 1) set init to 0 set timer to 0 set active to 0 set reset to 0 endif end begin gamemode if (reset == 1) set active to 0 set init to 0 set timer to 0 set reset to 0 elseif (active == 1) set button to getbuttonpressed ShowMessage CG02DinerDoorMsg if(button == 0) set timer to 5 elseif button == 1 set timer to 10 elseif button == 2 set timer to 20 elseif button == 3 set timer to 40 elseif button == 4 set timer to 60 elseif button == 5 set timer to 90 elseif button == 6 set timer to 120 elseif button == 7 set timer to 180 elseif button == 8 set timer to 0 set active to 0 set init to 0 else set timer to 5 endif set init to 1 set active to 0 elseif (init == 1) if(timer > 0) set timer to timer - getsecondspassed else set reset to 1 placeatme C4Explosion 1, 1, 1 endif endif end The item has 1 health. When it reaches 0, it destroys itself. The explosion basically kills the item. Thanks,Smurf_Impact Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.