Page 1 of 1

Posted: Sun Jul 09, 2006 12:17 pm
by gugusm
With reference to my previous topic:
I have group of thrall in my map and I made for them proximity and radius tests. I want them to back into their initial positions when not fighting. It works good with LEGI action, but how can I make it with TUNI and MOVE actions? A-Red proposed me to make LEGI action (it works) or make in my radius test "Activate on Failure" flag. I tried this (I link "Activate on Failure" with MOVE action), but it didn't work. I think the problem lies here:
When player forces are in the radius, thralls attacks. In the same moment, radius test checks if player forces are farther than radius, but the player forces are closer and thralls attacks. So, after fight thralls are just standing. Maybe it's possible to make an always active action. I mean, the radius tests are always active and always are checking if enemy is closer or farther than radius, even after fight. If something is unclear, please ask.

Posted: Sun Jul 09, 2006 1:19 pm
by A-Red
If you open an action, there's a menu that says "Deactivates:"
You can set it to Success, Failure, Execution (Success OR Failure), Trigger (I don't know what that is exactly), or Never. If you set your TUNI to deactivate never, you shouldn't have that problem. They're set to Success by default, so it would test continually until it actually finds units within the radius, and then it would just turn off.

Posted: Mon Jul 10, 2006 3:52 am
by gugusm
Yeah, it works. Thanks.

Posted: Mon Jul 10, 2006 7:08 am
by haravikk
A-Red wrote:If you open an action, there's a menu that says "Deactivates:"
You can set it to Success, Failure, Execution (Success OR Failure), Trigger (I don't know what that is exactly), or Never. If you set your TUNI to deactivate never, you shouldn't have that problem. They're set to Success by default, so it would test continually until it actually finds units within the radius, and then it would just turn off.
Although I've never had reason to use it, as I understand it on-trigger and on-execution will cause an action to consider success differently:

For example; you have a move action.
When set to on trigger, a success (for activates on success parameters) is simply having the subject of the action alive to be told to move in the first place, failure is if the unit doesn't exist, or some parameter is missing (ie the actual way-point).
When set to on execution, a success is having the unit reach it's destination, a failure is having the unit stop because it is stuck.

However, as with much scripting this rarely works as it should, it may however be useful if the circumstances are controlled well enough (ie the unit you're moving is uncontrollable to the player, and you know it won't be obstructed).
So on execution is having it follow through to a finish, on trigger is having the command issued correctly.
For many actions (such as tests) it is irrelevant.


Also, as a last note, if you are using several actions set to never deactivate (perhaps until some other action deactivates it) then you should incorporate delays, as these will reduce the chances of it causing issues.
Oh, and actually, for what you're doing you'd be better off using a Legion command, simply put the units you're controlling into Group actions, then create a Legion action to control them, it has parameters for maintaining position, and for detecting nearby enemies, it also tends to be more robust unless you need to test for additional things.

Posted: Mon Jul 10, 2006 8:50 am
by gugusm
So, in short, it's better to use LEGI actions?

Posted: Mon Jul 10, 2006 10:31 am
by Zeph
if you are TehLazyâ„¢

Posted: Mon Jul 10, 2006 3:46 pm
by A-Red
Thanks Hara, I'd been wondering about that. That should help me solve the MOVE issues I've been having too.

Posted: Tue Jul 11, 2006 6:04 am
by haravikk
gugusm wrote:So, in short, it's better to use LEGI actions?
Well, legions are well suited to what you're trying to do, however if what you're doing at the moment is a great way to learn so it's up to you. However, by the sounds of it you got your current solution to work, adding a legion instead would be better for efficiency and usually run better.
However, with individual actions you get finer control, for example if you wanted to add a dodge script so your thrall scattered from dwarven grenades or arrow volleys. Though with thrall that's probably redundant, dodging a thrall is steering a car without wheels :)