Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Help with random object move to location script

I have no idea what I am doing wrong with this script, I think it should work "ondamaged"

#include "x0_i0_position"
void main()
location lAttacker = GetLocation(OBJECT_SELF);
object oArea = GetArea(OBJECT_SELF);
float xDist =IntToFloat(d6(5));
float xAngle =IntToFloat(d8(50)-45);
object oSelf = OBJECT_SELF ;
location bLoc = GetLocation(oSelf);
vector bVec = GetPositionFromLocation(bLoc) ;
bVec = GetChangedPosition(bVec,xDist,xAngle);
bLoc = Location(oArea, bVec, xAngle);

ActionJumpToLocation (bLoc);



  • PhantasmaPhantasma Member Posts: 76
    edited October 2020
    ClearAllActions(TRUE) before the jump is what you need.

    However, ActionJumpToLocation will walk to the location if it's very close, so you may want to use ActionJumpToObject (create an invisible object to jump to) with the bWalkStraightLine set to FALSE - assuming that will work, I haven't tested it.

Sign In or Register to comment.