Jump to content

Make scripts only work outdoors


xuntianhnakx

Recommended Posts

Recently I found a vanilla script RadroachLegendaryScript.psc, so I want to ask a simple question, how do I make this script only work outdoors.

The vanilla content:

Scriptname RadroachLegendaryScript extends Actor Const

 

ActorBase Property EncRadRoach Auto Const

Explosion Property DeathExplosion Auto Const

Float Property SpawnDelay Auto Const

 

Event OnDeath(Actor akKiller)

PlaceAtMe(DeathExplosion)

PlaceActorAtMe(EncRadRoach)

utility.wait(SpawnDelay)

PlaceAtMe(DeathExplosion)

PlaceActorAtMe(EncRadRoach)

utility.wait(SpawnDelay)

PlaceAtMe(DeathExplosion)

PlaceActorAtMe(EncRadRoach)

utility.wait(SpawnDelay)

PlaceAtMe(DeathExplosion)

PlaceActorAtMe(EncRadRoach)

utility.wait(SpawnDelay)

PlaceAtMe(DeathExplosion)

PlaceActorAtMe(EncRadRoach)

EndEvent

 

This should be easy, right? So I add:

Event OnDeath(Actor akKiller)

if Subject.IsInInterior == false

PlaceAtMe(DeathExplosion)

PlaceActorAtMe(EncRadRoach)

utility.wait(SpawnDelay)

PlaceAtMe(DeathExplosion)

PlaceActorAtMe(EncRadRoach)

utility.wait(SpawnDelay)

PlaceAtMe(DeathExplosion)

PlaceActorAtMe(EncRadRoach)

utility.wait(SpawnDelay)

PlaceAtMe(DeathExplosion)

PlaceActorAtMe(EncRadRoach)

utility.wait(SpawnDelay)

PlaceAtMe(DeathExplosion)

PlaceActorAtMe(EncRadRoach)

ENDIF

EndEvent

 

But the compilation failed, it says:

variable Subject is undefined

none is not a known user-defined script type

cannot compare a none to a bool (cast missing or types

 

Please help!

Edited by zongmucan
Link to comment
Share on other sites

This should compile:

Scriptname RadroachLegendaryScript extends Actor Const

ActorBase Property EncRadRoach Auto Const
Explosion Property DeathExplosion Auto Const
Float Property SpawnDelay Auto Const

Event OnDeath(Actor akKiller)
	Self.IsInInterior() == False
		PlaceAtMe(DeathExplosion)
		PlaceActorAtMe(EncRadRoach)
		utility.wait(SpawnDelay)
		PlaceAtMe(DeathExplosion)
		PlaceActorAtMe(EncRadRoach)
		utility.wait(SpawnDelay)
		PlaceAtMe(DeathExplosion)
		PlaceActorAtMe(EncRadRoach)
		utility.wait(SpawnDelay)
		PlaceAtMe(DeathExplosion)
		PlaceActorAtMe(EncRadRoach)
		utility.wait(SpawnDelay)
		PlaceAtMe(DeathExplosion)
		PlaceActorAtMe(EncRadRoach)
	EndIf
EndEvent
Link to comment
Share on other sites

  • Recently Browsing   0 members

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