Jump to content
ℹ️ Intermittent Download History issues ×

Triggers and NPCs in Scripts


Demeggy

Recommended Posts

Hi all,

 

I'm trying to achieve what feels like the impossible at the moment.

 

Basically;

 

I've got a script which will randomly enable an NPC thus 'spawning' them.

The npc has an AI package which forces them to 'charge' towards an xmarker.

What I want is for the npc to hit a trigger, check if a variable from another script is true and disable (i.e. 'magic away') the NPC.

 

Given example;

 

Bob's our NPC; he spawns 7 seconds in, and charges the xmarker. He hits the trigger box, but the 'kill' variable is still 0. The player activates a key which sets the 'kill' variable to 1. Bob then magically disappears (whilst he's still inside the trigger).

 

I've poured my brain into GECK for hours trying to work out how to do this without much luck. Any theories greatly appreciated.

 

Kris

Link to comment
Share on other sites

Well, if Bobref's family is only enabled when bob himself is enabled, then you can simply just make each family member have Bobref as their enable parent.

 

If bobref is disabled, every family member will be disabled as well. When you enable bobref, his entire family enables at the same time.

This is also helpful to keep the number of references down.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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