Jump to content

Trying to figure out a problem.


NDemarino

Recommended Posts

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 rSelf

Int iSpawned

Int bDoOnce

Float fSpawnTimer

Short randint

 

 

Begin GameMode

set randint to GetRandomPercent

 

 

If (bDoOnce)

Else

Set rSelf to GetSelf

Disable

Set bDoOnce to 1

EndIf

 

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

EndIf

EndIf

 

If (GetDistance Player >= 5500 && GetInSameCell Player == 0 && Player.GetLOS rSelf == 0)

Set iSpawned to 0

EndIf

 

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...