GilgameshNoborosuke Posted November 27, 2012 Share Posted November 27, 2012 (edited) Like the title say, here's the script I'm using. scn WZInvanpahNCRSpawnScript int bInitInvanpah int bSpawnInvanpah float TimerInvanpah ref rInvanpahNCR01 ref rInvanpahNCR02 ref rInvanpahNCR03 ref rInvanpahNCR04 ref rInvanpahNCR05 ref rInvanpahNCR06 ref rInvanpahNCR07 ref rInvanpahNCR08 ref rInvanpahNCR09 ref rInvanpahNCR10 ref rInvanpahNCR11 ref rInvanpahNCR12 Begin OnLoad if (bInitInvanpah == 0) set bInitInvanpah to 1 showmessage NCRInvanpahLakeWZMessage endif End Begin GameMode if (bInitInvanpah == 1) set rInvanpahNCR01 to InvanpahDryLakeNCRSpawn001.PlaceAtMe WZNCRMarine 1 set rInvanpahNCR07 to InvanpahDryLakeNCRSpawn001.PlaceAtMe WZNCRMarine 1 set rInvanpahNCR02 to InvanpahDryLakeNCRSpawn002.PlaceAtMe WZNCRPowerArmor 1 set rInvanpahNCR08 to InvanpahDryLakeNCRSpawn002.PlaceAtMe WZNCRMarine 1 set rInvanpahNCR03 to InvanpahDryLakeNCRSpawn003.PlaceAtMe WZNCRTrooper 1 set rInvanpahNCR09 to InvanpahDryLakeNCRSpawn003.PlaceAtMe WZNCRTrooper 1 set rInvanpahNCR04 to InvanpahDryLakeNCRSpawn004.PlaceAtMe WZNCRTrooper 1 set rInvanpahNCR10 to InvanpahDryLakeNCRSpawn004.PlaceAtMe WZNCRTrooper 1 set rInvanpahNCR05 to InvanpahDryLakeNCRSpawn005.PlaceAtMe WZNCRTrooper 1 set rInvanpahNCR06 to InvanpahDryLakeNCRSpawn006.PlaceAtMe WZNCRMarine 1 else if (rInvanpahNCR01.GetDead) set rInvanpahNCR01 to InvanpahDryLakeNCRSpawn001.PlaceAtMe WZNCRMarine 1 endif else if (rInvanpahNCR02.GetDead) set rInvanpahNCR02 to InvanpahDryLakeNCRSpawn002.PlaceAtMe WZNCRPowerArmor 1 endif else if (rInvanpahNCR03.GetDead) set rInvanpahNCR03 to InvanpahDryLakeNCRSpawn003.PlaceAtMe WZNCRTrooper 1 endif else if (rInvanpahNCR04.GetDead) set rInvanpahNCR04 to InvanpahDryLakeNCRSpawn004.PlaceAtMe WZNCRTrooper 1 endif else if (rInvanpahNCR05.GetDead) set rInvanpahNCR05 to InvanpahDryLakeNCRSpawn005.PlaceAtMe WZNCRTrooper 1 endif else if (rInvanpahNCR06.GetDead) set rInvanpahNCR06 to InvanpahDryLakeNCRSpawn006.PlaceAtMe WZNCRMarine 1 endif else if (rInvanpahNCR07.GetDead) set rInvanpahNCR07 to InvanpahDryLakeNCRSpawn001.PlaceAtMe WZNCRMarine 1 endif else if (rInvanpahNCR08.GetDead) set rInvanpahNCR08 to InvanpahDryLakeNCRSpawn002.PlaceAtMe WZNCRMarine 1 endif else if (rInvanpahNCR09.GetDead) set rInvanpahNCR09 to InvanpahDryLakeNCRSpawn003.PlaceAtMe WZNCRTrooper 1 endif else if (rInvanpahNCR10.GetDead) set rInvanpahNCR10 to InvanpahDryLakeNCRSpawn004.PlaceAtMe WZNCRTrooper 1 endif endif End Can anyone help me? The trigger keep spawning my custom NCR and crashed the game in say around 15 seconds. Edited November 27, 2012 by GilgameshNoborosuke Link to comment Share on other sites More sharing options...
Xaranth Posted November 27, 2012 Share Posted November 27, 2012 Switch bInitIvanapah back to zero after your initial spawn group, i.e. Begin GameMode if (bInitInvanpah == 1) set rInvanpahNCR01 to InvanpahDryLakeNCRSpawn001.PlaceAtMe WZNCRMarine 1 set rInvanpahNCR07 to InvanpahDryLakeNCRSpawn001.PlaceAtMe WZNCRMarine 1 set rInvanpahNCR02 to InvanpahDryLakeNCRSpawn002.PlaceAtMe WZNCRPowerArmor 1 set rInvanpahNCR08 to InvanpahDryLakeNCRSpawn002.PlaceAtMe WZNCRMarine 1 set rInvanpahNCR03 to InvanpahDryLakeNCRSpawn003.PlaceAtMe WZNCRTrooper 1 set rInvanpahNCR09 to InvanpahDryLakeNCRSpawn003.PlaceAtMe WZNCRTrooper 1 set rInvanpahNCR04 to InvanpahDryLakeNCRSpawn004.PlaceAtMe WZNCRTrooper 1 set rInvanpahNCR10 to InvanpahDryLakeNCRSpawn004.PlaceAtMe WZNCRTrooper 1 set rInvanpahNCR05 to InvanpahDryLakeNCRSpawn005.PlaceAtMe WZNCRTrooper 1 set rInvanpahNCR06 to InvanpahDryLakeNCRSpawn006.PlaceAtMe WZNCRMarine 1 set bInitInvanpah to 0 else ...etc Without flipping that switch back off, every frame the script is spawning ten more actors, and... Link to comment Share on other sites More sharing options...
GilgameshNoborosuke Posted November 27, 2012 Author Share Posted November 27, 2012 Damn, didn't see that. :wallbash: the slightest little mistake could destroy even the strongest walls.Thanks didn't see that tiny hole. Link to comment Share on other sites More sharing options...
Xaranth Posted November 27, 2012 Share Posted November 27, 2012 Damn, didn't see that. :wallbash: the slightest little mistake could destroy even the strongest walls.Thanks didn't see that tiny hole. That's okay, I spent two hours this morning tracking down a script bug where instead of: Set fDelay to fDelay + GetSecondsPassed I had written: Set fDelay to fDelay ...and then I couldn't figure out why it wasn't working. Link to comment Share on other sites More sharing options...
GilgameshNoborosuke Posted November 28, 2012 Author Share Posted November 28, 2012 Is there any good example of the "GetTimeDead" that I could get?Didn't quiet get with this Geck GetTimeDead. Thanks for the early supports. Link to comment Share on other sites More sharing options...
GilgameshNoborosuke Posted November 28, 2012 Author Share Posted November 28, 2012 Here's the script I used:scn WZonesNPCScript ref MySelf Begin GameMode if (MySelf.GetDead == 0) return elseif (MySelf.GetTimeDead == 1) disable markfordelete showmessage WZCleaningMessage endif End Link to comment Share on other sites More sharing options...
Xaranth Posted November 28, 2012 Share Posted November 28, 2012 (edited) should work, but you need to assign MySelf, thus: Also change the comparison operator to >=, because the chance of the script firing exactly one hour after death is miniscule. scn WZonesNPCScript ref MySelf Begin GameMode Set MySelf to GetSelf if (MySelf.GetDead == 0) return elseif (MySelf.GetTimeDead >= 1) disable markfordelete showmessage WZCleaningMessage endif End Edited November 28, 2012 by Xaranth Link to comment Share on other sites More sharing options...
GilgameshNoborosuke Posted November 28, 2012 Author Share Posted November 28, 2012 Thanks, I'll try it. :thumbsup: Aside my script is there any easier or simpler script to clean dead bodies?I'm trying not to use any NVSE, if there are any. Please let me know. :biggrin: Link to comment Share on other sites More sharing options...
Xaranth Posted November 28, 2012 Share Posted November 28, 2012 Thanks, I'll try it. :thumbsup: Aside my script is there any easier or simpler script to clean dead bodies?I'm trying not to use any NVSE, if there are any. Please let me know. :biggrin: You know, I was wondering the same thing when I was doing a long-term playtest of V 0.6 of my own mod. Then one day I walked into the area where the bodies I wanted to clean were, and said bodies were gone. I think the game cleans corpses on the same schedule as resetting plants, etc. But I don't promise that. Link to comment Share on other sites More sharing options...
GilgameshNoborosuke Posted November 29, 2012 Author Share Posted November 29, 2012 Okay, the script didn't work and somehow it work randomly and very rare like 0.1% of the whole tests. :wacko: The Scripts was meant for my never ending battlefield (For personal use only, until somebody requested it.) I've used many scripts from many mods that spawn NPCs & Creatures like the WARZONES - now with ADJUSTABLE SPAWNS by MyGoodEye, and many others. I've tried to let the game cleans up the bodies it self and pretty much good, bit too long though... :tongue: Currently my PC broke down :wallbash: and I'm using my Sister's laptop to test any possible script to clean the dead bodies after an hour or two. So, expect me to reply a little bit late because I don't have all the time with the Laptop :tongue: . Link to comment Share on other sites More sharing options...
Recommended Posts