NDemarino Posted June 13, 2010 Share Posted June 13, 2010 Alright, So I'm trying to fix up this mod since I'm part of the team and the creator hasn't responded to anything in the past few days. The problem is, It crashes when you leave the vault, or are outside for more than a few seconds. I'm no script wizard, but I'm pretty sure it has something to do with his zombie spawn scripts. Here they are. ScriptName ZombieSpawnScript Ref rSelfInt iSpawnedInt bDoOnceFloat fSpawnTimerShort randint Begin GameModeset randint to GetRandomPercent If (bDoOnce)Else Set rSelf to GetSelf Disable Set bDoOnce to 1EndIf If (iSpawned)Else If (GetDistance Player <= 5000 && GetDistance Player >= 1000 && GetInSameCell Player == 0 && Player.GetLOS rSelf == 0) If (fSpawnTimer < 1) If randint < 10 PlaceAtMe ZombieMedium ZombieAmount ElseIf randint < 20 PlaceAtMe ZombieReal ZombieAmount ElseIf randint < 30 PlaceAtMe ZombieReaL1 ZombieAmount ElseIf randint < 40 PlaceAtMe ZombieReaL2 ZombieAmount ElseIf randint < 50 PlaceAtMe ZombieReaL3 ZombieAmount ElseIf randint < 60 PlaceAtMe ZombieReaL4 ZombieAmount ElseIf randint < 70 PlaceAtMe ZombieReaL5 ZombieAmount ElseIf randint < 80 PlaceAtMe ZombieReaL6 ZombieAmount ElseIf randint < 90 PlaceAtMe ZombieReaL7 ZombieAmount ElseIf (ZombieDifficulty == 1) PlaceAtMe ZombieMedium ZombieAmount ElseIf (ZombieDifficulty == 2) PlaceAtMe ZombieHard ZombieAmount ElseIf (ZombieDifficulty == 3) PlaceAtMe ZombieInsane ZombieAmount EndIf Set fSpawnTimer to ZombieRespawnTime Set iSpawned to 1 Else Set fSpawnTimer to (fSpawnTimer - GetSecondsPassed) EndIf EndIfEndIf If (GetDistance Player >= 5500 && GetInSameCell Player == 0 && Player.GetLOS rSelf == 0) Set iSpawned to 0EndIf End I can't make heads or tails of it, as I am the quest man, and I just came back to the team. Any Script Wizards out there see anything wrong? Link to comment Share on other sites More sharing options...
Quetzlsacatanango Posted June 13, 2010 Share Posted June 13, 2010 You have a couple of ifs with no "if whats" if you know what I mean. if (bDoOnce)and if (iSpawned) are this way. They should be more like if bDoOnce == 0 dosomething else do what you put up there endif Link to comment Share on other sites More sharing options...
NDemarino Posted June 13, 2010 Author Share Posted June 13, 2010 Thanks bro, I'm gonna try it. Link to comment Share on other sites More sharing options...
NDemarino Posted June 13, 2010 Author Share Posted June 13, 2010 Okay I did it, and it's working properly, but the zombies seem to be lacking their texture and they crash my game when they die. Any ideas on how to fix this? Link to comment Share on other sites More sharing options...
NDemarino Posted June 14, 2010 Author Share Posted June 14, 2010 Nevermind, I fixed it. Turns out I had archive Invalidation off. Thanks for your help. Link to comment Share on other sites More sharing options...
Recommended Posts