Snake0391 Posted October 3, 2009 Share Posted October 3, 2009 I'm having trouble getting the KillActor function to work without crashing. I can get it to work in the game using the console, but when I call it in code the game just crashes. My code runs fine without it so I know it's just that piece of code that's making it crash. Here is my code: scn aaBombStrap ref Target ref TargetAquired short FoundEnemy short Exploded float Timer Begin OnAdd Set Target to GetContainer if (Target != Player && Target != 0 && FoundEnemy != 1) Set FoundEnemy to 1 Set TargetAquired to Target endif End Begin GameMode if (FoundEnemy == 1) Set Timer to Timer + GetSecondsPassed if (Timer > 10.00 && Exploded != 1) TargetAquired.PlaceAtMe LibertyPrimeNukeExplosion TargetAquired.KillActor Player 0 0 Set Exploded to 1 endif endif End How do I make it work correctly? I just want to add a crime(the same as killing someone) to the player for using the bomb. Any help would be gladly appreciated. Link to comment Share on other sites More sharing options...
Snake0391 Posted October 4, 2009 Author Share Posted October 4, 2009 another problem, whenever I put a bomb in someone , they explode, but when I strap another bomb into another guy, nothing happens?can someone help me plz. Link to comment Share on other sites More sharing options...
Recommended Posts