script question : enable npc on entering an area

Post » Mon Feb 22, 2010 9:49 pm

Okay, trying to help with a buddy's mod.

He wants to make it so when you enter a location (with door) an npc is activated outside the house.

Now iirc you can't do an on activate script on doors because of issues (back in oblivion it was that way) but is there a way to do a onload for a cell that would kick the npc to active if the player enters a certain locked room?
User avatar
IsAiah AkA figgy
 
Posts: 3398
Joined: Tue Oct 09, 2007 7:43 am

Post » Mon Feb 22, 2010 2:40 pm

Why not just place a trigger around the area that the player teleports to after using the door. You could then put your script on the trigger.
User avatar
Rex Help
 
Posts: 3380
Joined: Mon Jun 18, 2007 6:52 pm

Post » Mon Feb 22, 2010 2:00 pm

There shouldn't be a problem with using an http://geck.gamesas.com/index.php/OnActivate block on the door, so long as you call http://geck.gamesas.com/index.php/Activate properly in the block. That said, using a trigger with an http://geck.gamesas.com/index.php/OnTriggerEnter block would work as well.

Cipscis
User avatar
Tanya Parra
 
Posts: 3435
Joined: Fri Jul 28, 2006 5:15 am

Post » Mon Feb 22, 2010 3:07 pm

thanks, been awhile since I've been modding... old computer died and well mostly did oblivion house mods (may redownload them and update someday... when I get a machine with enough space on the hd... taxes will see)

fogotten a lot of the tricks

Likely use the trigger instead, simply because I remember using them more than anything else.

Now to play around and get it right for him.... probably use the idea in my little house mod I'm working on too.... bwahahahaha!

edit:

Using a collision geometry trigger (or is there a different one to use)

okay we got a global since they want a couple different things to go on now with the character entering the room is this the proper scripting or am I missing something (been forever since I did scripts in this or oblivion)

ScriptName modEnteredRoom

; triggered when player enters the room the first time

begin onTriggerEnter
if modEntered == 0
if IsActionRef player == 1
modSpawn.Enable
set modEntered to 1
endif
endif
End

edit 2 : doh the trigger box was too big.. changed it and it works now >.< though I had already done that
User avatar
Julie Serebrekoff
 
Posts: 3359
Joined: Sun Dec 24, 2006 4:41 am


Return to Fallout 3