Jump to content

Recommended Posts

Posted

So I'm trying to make a script that pushes whatever NPC/creature that enters it but I need a way to reference said actor. So, is there a way to assign whatever enters this trigger to a reference within the script? Essentially what I'm asking is:

 

PushactorAway Ref 5; How would I assign whoever enters the trigger to this ref?

 

I don't think GetSelf would work because then it's be telling the trigger to push itself, so I can't think of anything else.

Posted (edited)

My trigger event is Begin OnTriggerEnter so it applies to whatever enters the trigger. Thanks Dubious!

Edited by ashtonlp101
Posted

Okay so my problem still remains because this is only working on the player but not on any of the NPCs that walk into the trigger:

 

Ref Person
Begin OnTriggerEnter player
GetActionRef
Set Person To GetActionRef
playsound NVDLC04WPNEdeArcFire3D
DamageAV Health 10
PushActorAway Person 5
END
Posted

That is because your "Begin" block says "Player" (which is an optional parameter). Leave off the parameter: "Begin OnTriggerEnter" only; so "the block is run when any ref enters the trigger box." Read the description carefully, and also 'TIP Block Types Multiple vs Single Frame processing' under the "Scripting" section of the wiki "Getting started creating mods using GECK" article.

 

-Dubious-

  • Recently Browsing   0 members

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