Jump to content

Home

How to do this....


Darth Kaan

Recommended Posts

..say you have an enclosed area with four enemy NPC's and the only way out of that area, is to turn off a forcefield via a switch which will then allow access to the exit. I know how to link the switch and forcefield to turn it off, but...

 

how can you make the switch where it will only work after all four of the enemies have been dispatched?

 

Any insight would be appreciated.

Link to comment
Share on other sites

First create a simple script with one command.

 

Use "act_force"

 

Second link a target_activate to your forcefield trigger.

Third create a target_counter and name it "act_force".

The count will be the number of NPC's that need to die.

The target will be the target_activate.

 

Fourth for each NPC add the following

DeathScript "Scriptname"

 

 

There you have it...

Each time your NPC dies, he will fire the counter, when the counter reaches his mark he will fire the activator allowing you to lower the force fields.

 

PS. don't forget to change your forcefield trigger to activator.

 

PSS,

You could do this all with scriptting but I find it easier to do it this way. Since you wouldn't have to declare any variables at the level start...

Link to comment
Share on other sites

Hmm, in my experience you can just connect (target) the NPCs to the target_counter. Then go forward as previously with the target_activate and a trigger deactivated in Radiant. You don't need any scripts for this job. An NPC will launch it's target at the sober moment of dying.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...