how do you setup a spawn via lever like in the arena mod

Post » Tue Jun 19, 2012 2:58 pm

I was just wondering how you make npcs spawn when you pull a lever or talk to another npc like in the arena mod. help me out plz:)
User avatar
Stay-C
 
Posts: 3514
Joined: Sun Jul 16, 2006 2:04 am

Post » Tue Jun 19, 2012 8:31 pm

There are numerous ways to do it, some much more complex than others. Do you want to spawn a single actor? This is easiest.

Personally I would create the actor I want to spawn. Let's say a bear. You want to duplicate the EncBear actor and rename it to your own instance. Then I would create a leveled list, at this point you're only going to have the bear in it.

So far this is a matter of creating the two objects and adding the bear to the leveled list - it shouldn't be that difficult.

Drag the leveled list in the arena or wherever you plan to have it. Double click it on the render map, and check the box titled "Initially disabled". Next you're going to make your own instance of a lever activator object (duplicating it like you did for the bear).

Double click the lever, on the far tab to right under scripts, add your own. For this script add a property, leveled list. Title it combatant1. Set it to be the leveled list you dragged in the world. You're going to want to read up a bit on the wiki but the quick way (it probably won't work without minor editing) is to have
LeveledList Property combatant1 autoEvent OnActivate(akActor)   if ( combatant1.GetDisabled() == 1 )	   combatant1.enable()   endifendEvent

This code will probably not work off the bat but it should be a good starting point. This method will allow you to add different combatants to the leveled list - but it'll be a little tricky to define which combatant you want to appear then.
User avatar
Frank Firefly
 
Posts: 3429
Joined: Sun Aug 19, 2007 9:34 am

Post » Tue Jun 19, 2012 7:20 pm

I confused about what you mean by leveled list... could you explain this. I am very new sorry:(
User avatar
Albert Wesker
 
Posts: 3499
Joined: Fri May 11, 2007 11:17 pm


Return to V - Skyrim