xuntianhnakx Posted January 14, 2023 Share Posted January 14, 2023 (edited) 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 ConstExplosion Property DeathExplosion Auto ConstFloat 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) ENDIFEndEvent But the compilation failed, it says: variable Subject is undefinednone is not a known user-defined script typecannot compare a none to a bool (cast missing or types Please help! Edited January 14, 2023 by zongmucan Link to comment Share on other sites More sharing options...
LarannKiar Posted January 14, 2023 Share Posted January 14, 2023 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 More sharing options...
xuntianhnakx Posted January 14, 2023 Author Share Posted January 14, 2023 Hey it worked! Big thanks! Link to comment Share on other sites More sharing options...
Recommended Posts