Jump to content

Adding to faction via trigger box


Recommended Posts

I have a trigger box, and I want anyone that triggers it to be added to a faction.

 

My script looks like:

 

scn QTriggerScript	

ref rFA

Begin OnTriggerEnter

Set rFA to getself

rFA.addtofaction QFaction 10


End

 

I tried it without the variable at all, simply putting the 'addtofaction' line, and that didn't work, then I tried it this way.

 

I have rarely if ever used reference variable, but this compiles fine and seems like it should work. But NPCs entering the trigger don't join the faciton. What up with that?

Link to comment
Share on other sites

Sorry, I'm not Cipscis (then, who is?), but...

 

In your script GetSelf will return the trigger, not the NPC who activated the trigger. Try GetActionRef instead.

I don't now if the player matters, but you might want to check for the player and not add the faction to him.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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