BulletSix Posted November 10, 2010 Share Posted November 10, 2010 Hiya :) here`s what came to my mind: I want to have a button on one point in the room, that spawns an NPC in another point of the room. That NPC has to stand there and do nothing, just being an human target vor VATS and "first person".Creating the NPC per se won`t be a problem, methinks, but i want it to spawn/de-spawn (either the NPC or his remains) on the press of a button. So how could a script look like that spawns/de-spawns an object (e.g. glass flask for target practice) and/or an NPC or creature? thanks in advance :) Link to comment Share on other sites More sharing options...
Seox Posted November 10, 2010 Share Posted November 10, 2010 I too am curious as to how this could be done, but for a different purpose. I'm wanting to make a training room, and set it so that activating a terminal would spawn a bunch of enemies, and opening the door and going through to leave despawns them. I'd imagine this would involve scripting, as I see nowhere else the ability to make things like conditional switches or etc. Any ideas? Link to comment Share on other sites More sharing options...
Aragron Posted November 10, 2010 Share Posted November 10, 2010 The easiest way is to make the NPC a persistent reference and two other items too,like 2 bottle cap, and put the cap where you want the NPC to spawn,and the other where you want him to be while not "used".Then on the activator ...use a OnActivate Begin, an use a "short once" to control if the NPC is there or not.When you want the NPC to appear,use resurrect on him,then enable him and finally use [moveto "Persistent Ref Cap" x y z] (you may need to adjust these 3) to put him in place.To de-spawn, disable him then move him to the other "Persistent Ref Cap"...something like that: Scriptname "Name..." short toggle begin OnActivate if toggle == 0 "NPCRef".resurrect "NPCRef".Enable "NPCRef".Moveto "Cap Ref" set toggle to 1 else "NPCRef".Disable "NPCRef".Moveto "The other Cap Ref" set toggle to 0 endif end Link to comment Share on other sites More sharing options...
Seox Posted November 10, 2010 Share Posted November 10, 2010 I have absolutely no scripting experience...would I save this as a script in the GECK, then make, say, the terminal (when an option is selected) run this script after substituting the refids? I have no clue :\ Link to comment Share on other sites More sharing options...
Aragron Posted November 10, 2010 Share Posted November 10, 2010 Basically this...if you want to spawn lots of creatures,for every creature,copy the script part "NPCRef".resurrect"NPCRef".Enable"NPCRef".Moveto "Cap Ref" and "NPCRef".Disable"NPCRef".Moveto "The other Cap Ref"then you need to create more persistent refs so they don't spawn all in one place and Crash... One position for every creature.Read some tuturials and you will understand better. Link to comment Share on other sites More sharing options...
BulletSix Posted November 10, 2010 Author Share Posted November 10, 2010 Thanks Aragron, this was exactly the answer i was hoping for :) Another question: would this in principle work with lightsources, too? Edit: Name corrected :)seems Lord of the Rings is somewhat hardwired to my brain :laugh: Link to comment Share on other sites More sharing options...
Aragron Posted November 10, 2010 Share Posted November 10, 2010 I tested light sources once,if i remember right it works but you need to refresh the game screen to work,or the lighteffect stays there... I tested only in the TES Oblivion,a light that follow the player,without refreshing the light don't follow/vanish.PS: It is Aragron :laugh: Edited: if you just want a light switch,there is a video here...http://www.thenexusforums.com/index.php?/topic/256565-scripter-wanted/ Link to comment Share on other sites More sharing options...
WuphonsReach Posted November 11, 2010 Share Posted November 11, 2010 The place in Fallout 3 that comes to mind is the Alien Mothership Zeta, there's a place in there with an activator item that spawns NPCs (or Brahmin). Link to comment Share on other sites More sharing options...
BulletSix Posted November 11, 2010 Author Share Posted November 11, 2010 hmm ... i`ll may have to play Zeta sometime *g* anyhow, i got it to work (after i nav-meshed the rooms *g*), now only the switch doesn`t visually change. It does what it should, spawn, de-spawn but it doesn`t go on and off .... as for the light, thanks for the link, maybe i couple the light to the target ... definitely helpful :) Link to comment Share on other sites More sharing options...
Aragron Posted November 11, 2010 Share Posted November 11, 2010 Forgot to tell... the command Moveto can be used with the coordinates x y z, like Ref.Moveto player 10 0 10... For the switch,if you are using a World Objects Activator ,there should be an animation already,if you are using an static object or other,to make it move you need to place 2 in the same space,then enable one and disable the other. Link to comment Share on other sites More sharing options...
Recommended Posts