ApplyEffectAtLocation facing direction.
ForSerious
Member Posts: 466
I'm trying to improve this little script @Zephirius made. You get stopped when you enter a trigger and Bigby's Interposing Hand pops up in front. If that effect gets applied to an object, it spins around like normal. If it gets applied at a location is does not spin, but it's facing away from the trigger.
I've tried rotating the object and nothing changes.
Aside from remaking the area with north changed to south, is there any way I can manipulate the location to get the hand to face another direction?
Here's the most basic version of the script:
I've tried rotating the object and nothing changes.
Aside from remaking the area with north changed to south, is there any way I can manipulate the location to get the hand to face another direction?
Here's the most basic version of the script:
void main() { object oScanner = GetObjectByTag("SCANNER"); location lLoc = GetLocation(oScanner); effect eScan = EffectVisualEffect(VFX_DUR_BIGBYS_INTERPOSING_HAND); ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eScan, lLoc, 6.0); }The SCANNER object is placed north of the trigger.
0
Comments
AssignCommand(oObjectSouthOfTrigger,ApplyEffectAtLocation())
There is fire-only-once-per-player logic in the full script. You can only ever enter the trigger from the south. The stopping hand needs to appear in front of the player entering the trigger.
Maybe I should not have been so hesitant. The Rotate Area function in the toolset works flawlessly and did yield the result I wanted.
So, because I have only one Hand facing one direction, I can do this. If I wanted to have multiple hands facing different directions though, I'm still out of luck—unless someone knows something else.
Alternatively, if the object tagged "SCANNER" can be rotated by 180 degrees, that would also solve the problem.
Or, a second alternative, make the reference object be something invisible such as a waypoint, so you can orient it whatever way is most convenient.
If the above doesn't work properly for you, then you can try substituting the angles 0.0, 90.0, 180.0 or 270.0 when you build the location, to make the hand face one of the compass points.
Or, you can get the location of the entering PC as well then extract and use the "opposite facing" of the PC, combined with the position where you want the hand to appear.
(I haven't had a chance to check any of the above code, but it should work. If not, I'll make a test module and see if I can figure out how to make it work)
That is the type of help I was hoping for.
Unfortunately, none of your suggestions change the result.
I think what's going on is that this effect does not use the facing value because it usually rotates.
The only other direction I can think to go is to somehow change the appearance of an object to be the model for the effect.
I just needed to read the details of EffectVisualEffect.
"effect EffectVisualEffect(int nVisualEffectId, int nMissEffect=FALSE, float fScale=1.0f, vector vTranslate=[0.0,0.0,0.0], vector vRotate=[0.0,0.0,0.0])"
So when I define it like this it works.
(That was so much easier than trying to do json object manipulations.)