paha989 Posted July 18, 2015 Share Posted July 18, 2015 I am creating a house / testing area, and i need a script where an npc will spawn on X marker when switch is activated. This is what i have currently tried to create AANewSpawn = Xmarker REFAAFiendEnemyMove = npc REF -----------------------------------------------------------------------------------------------------------------------------------------scn AAFiendSpawnScriptbegin OnActivateAANewSpawn.PlaceAtMe AAFiendEnemyMove 2end----------------------------------------------------------------------------------------------------------------------------------------- Link to comment Share on other sites More sharing options...
DaemonGrin Posted July 19, 2015 Share Posted July 19, 2015 If you are just wanting to spawn an enemy when an activator is activated place the enemy into the cell where you want it to spawn. Double click the NPC and check Initially Disabled and give it a ref ID. the script you attach to the activator would be an enable script. scn whateverSCRIPT short DoOnce; if you only want it to happen once Begin OnActivate PlayerIf (DoOnce == 0); hasn't happened yet only if using DoOnceYourRefID.enableEndifSet DoOnce to 1; happened won't do it again only needed if using DoOnceend Hope that helps,Geoff Link to comment Share on other sites More sharing options...
paha989 Posted July 19, 2015 Author Share Posted July 19, 2015 I manage to find this script and it works perfectly. :laugh:Anyway thanks for replying. :smile: scn "Name..."short togglebegin OnActivateif toggle == 0"NPCRef".resurrect"NPCRef".Enable"NPCRef".Moveto "Cap Ref"set toggle to 1else"NPCRef".Disable"NPCRef".Moveto "The other Cap Ref"set toggle to 0endifend Link to comment Share on other sites More sharing options...
Recommended Posts