Jump to content

Door and enemies question


Recommended Posts

Hi at all

 

In a few days I will have hopefully 2 interiors done in the ck.

 

Those interiors are planned to have some enemies in them.

 

The plan is to either:

 

-let the player move into the the first room of the interior

-then close the door behind and towards him

-then to spawn some enemies

 

Or:

 

-let the player move into the the first room of the interior

-then close the door behind and towards him

-let a npc (villain) talk

-then to spawn some enemies

 

Did someone know how I could do this best?

 

I know that Skyrim had many similar interior mechanics. As example often the doors closed after you had move into the grave room of some higher Draugr, but I can't remember seeing that in Fallout 4 (I have probably forgotten something).

 

I would be happy about any explanation, or pointing to ck examples.

Link to comment
Share on other sites

Sure, just make a defaultemptytrigger with a script simliar to this

ObjectReference Property TheEnemy Auto
ObjectReference Property TheDoor Auto

Event OnTriggerEnter(ObjectReference akActionRef)

TheDoor.setopen(false)
TheDoor.lock()
TheEnemy.enable()
Self.disable()
;Last one disables the trigger
EndEvent

You'd need to set the enemies to be "Initally Disabled"

Link to comment
Share on other sites

Thanks Zorkaz.

 

1 Thing I have forget: After the enemies are dead, the doors should be open again. Guess then I need to run a script on those enemies, that it opens the doors for the player again, right? (because otherwise the player would trapped there for forever^^).

Link to comment
Share on other sites

Several different ways of doing that, most effective involve an Actor.OnDeath event counter. Could use LocationRefType tags and GetRefTypeAliveCount but that needs another trigger to test and timers are nasty.

 

Are you already running a quest ?

Are the actors hand placed or scripted (PlaceActorAtMe) ?

Are the actor forms unique to your mod or using external lvlActor assets ?

Link to comment
Share on other sites

Well, the plan is basicly:

 

-To give the player a very basic kill quest.

-On his/her way to the villain, he runs through multiple rooms. So he is constantly in a situation where 1 door is behind and 1 before him. Most of the rooms are very large.

-Between those doors he should always getting trapped.

-Then specific enemies should spawn.

-Until the player has not kill every enemie, the doors should stay close.

-After the last enemie died, the doors should be open again.

 

I am not sure yet, if I will give the villain dialogue for those scenes (something like "har, har, har, I trapped you!" ... Just kidding, that would be awful ... :D), since that would make a new va necessary which I first would need to find and so on, but what I can say is that the above should happen.

 

-Aka. doors closing.

-Spawning enemies.

-Doors open.

 

Don't think a quest will necessary for it, or?

Edited by taryl80
Link to comment
Share on other sites

You need something to register Actor.OnDeath events and update a counter to open the door when zero.

 

There are many different ways of attaching event scripts to things and running a counter, but a quest is the usual mechanism.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...