ashtonlp101 Posted November 12, 2020 Share Posted November 12, 2020 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. Link to comment Share on other sites More sharing options...
dubiousintent Posted November 12, 2020 Share Posted November 12, 2020 "Push" is a reaction. What is your "trigger event"? Sounds like perhaps a "collision box" or "Activator"? Then the "event" (such as "OnActivate") will usually tell you who triggered it ( IsActionRef or GetActionRef inside the OnActivate block). Capture that ref in the event script before calling your "PushActorAway" function. -Dubious- Link to comment Share on other sites More sharing options...
ashtonlp101 Posted November 12, 2020 Author Share Posted November 12, 2020 (edited) My trigger event is Begin OnTriggerEnter so it applies to whatever enters the trigger. Thanks Dubious! Edited November 12, 2020 by ashtonlp101 Link to comment Share on other sites More sharing options...
ashtonlp101 Posted November 13, 2020 Author Share Posted November 13, 2020 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 GetActionRefSet Person To GetActionRefplaysound NVDLC04WPNEdeArcFire3DDamageAV Health 10PushActorAway Person 5 END Link to comment Share on other sites More sharing options...
dubiousintent Posted November 13, 2020 Share Posted November 13, 2020 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- Link to comment Share on other sites More sharing options...
ashtonlp101 Posted November 13, 2020 Author Share Posted November 13, 2020 Truly a blonde moment for me, I looked right past that. Thank you, Dubious. You my savior! Link to comment Share on other sites More sharing options...
Recommended Posts