AI Script: Follow Leader, still maintain other functions (including Stealth).
1MMRAM
Member Posts: 4
With my very basic attempts so far, I'm having a hard time combining effects such as MoveToObject(Player 1) or MoveToObjectFollow(Player1), etc, while still processing other functions like remaining in stealth (MTO seems to preserve stealth state, but MTOF leaves it), or other IF/THEN combat statements. Is there some way to have a hierarchy of actions?
What's I'd like is something like this:
1. If stealth is available, enter stealth
2. Run attack functions when enemies are in range
3. Move to Player 1 if past certain distance
As it stands, the first two functions only resolve when the third completes entirely. Irritatingly MoveToObject also constantly pushes Player1 around, while MTOF() and Formation() seem to be constant states that don't process other parts of the script until they are ended.
Any tips or direction appreciated!
What's I'd like is something like this:
1. If stealth is available, enter stealth
2. Run attack functions when enemies are in range
3. Move to Player 1 if past certain distance
As it stands, the first two functions only resolve when the third completes entirely. Irritatingly MoveToObject also constantly pushes Player1 around, while MTOF() and Formation() seem to be constant states that don't process other parts of the script until they are ended.
Any tips or direction appreciated!
0
Comments
I gather I can't have another function evaluate while MoveToObject*() is in process though? Just testing it now, stealth disengages when MoveToObjectOffset() starts and doesn't reinitialise until Player2 reaches Player1. I was envisioning an overriding imperative to re-enter stealth regardless of any other action currently in process, but that might be beyond the scope of the scripting language here.
FollowObjectFormation(Player1,1,1)
FollowObjectFormation / ActionListEmpty
Are these nwnx functions?
This issue was related to the Infinity Engine (BG/IWD), not Aurora Engine(NWN), it was just posted in wrong forum (not that the Infinity Engine has a scripting subforum).