Jump to content
Luft08

setBehaviour vs setCombatBehaviour

Recommended Posts

What are the differences between these two commands? Both take either a unit or group. Both have the same behaviour settings.

Thanks.

Share this post


Link to post
Share on other sites

The difference is this:
 

Quote

setBehaviour

Sets individual unit behaviour on every unit in a group. Although setBehaviour can be called on an individual unit, the entire group will be affected.

 

  • Like 1

Share this post


Link to post
Share on other sites

As Ibragim A states, the main difference, based on BIKI's entries, is that with setBehaviour you actually set the behaviour to the whole group regardless if it is used on a group or a unit in the group. As the comment of MulleDK13 states

 

Quote

If setting a behaviour on an individual unit is required, it can be achieved by creating a temporary group, use joinSilent to make the individual unit belong to that group, then change his behaviour, use joinSilent into the original group, then delete the temporary group.

 

In contrast, with setCombatBehaviour you can either set the behaviour of a single unit or of the whole group. Similar to setBehaviour one can use setBehaviourStrong to enforce the behaviour of a unit and try to do the same to the whole group. To be honest, I am not sure what the difference between setBehaviour and setBehaviourStrong is but I assume that the latter is more "enforcing" than the former.

 

Please keep in mind that my post is based on assumptions made based on the BIKI's entries, thus a wee bit of testing for your specific purpose could prove to be quite beneficial...

Share this post


Link to post
Share on other sites
1 hour ago, ZaellixA said:

I am not sure what the difference between setBehaviour and setBehaviourStrong

It is there on every relevant page
 

Quote

(setBehaviourStrong)  Sets individual unit behaviour on every unit in a group and additionally tries to force this behaviour to the unit's group


 

Quote

This command (setBehaviour) doesn't set AI Group behaviour, see setCombatBehaviour or setBehaviourStrong for this.

 

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the clarification.

 

But I do have a question. How does setBehaviour affects the behaviour of the rest of the units in the group? Referring to MadRussian's comment below

Quote

Although setBehaviour can be called on an individual unit, the entire group will be affected.

 

Share this post


Link to post
Share on other sites

It is in the command description 

 

Quote

 

Sets individual unit behaviour on every unit in a group.


The AI group is a separate entity, it is an object just like unit is an object. you can set behaviour of this object just like you can set behaviour of the unit, this is why you need setCombatBehaviour command, because setBehavior command sets behaviour only on unit but for every unit in the group even if argument is just 1 unit

 

  • Like 2

Share this post


Link to post
Share on other sites
2 hours ago, killzone_kid said:

The AI group is a separate entity

Aaaaahhhhhh OK... now it makes sense, thanks.

 

Not sure what the difference is in effect if you set the behaviour to the group or all the units in the group but from a "technical" point of view it makes sense. Thanks for the clarification.

Share this post


Link to post
Share on other sites
6 hours ago, ZaellixA said:

Aaaaahhhhhh OK... now it makes sense, thanks.

 

Not sure what the difference is in effect if you set the behaviour to the group or all the units in the group but from a "technical" point of view it makes sense. Thanks for the clarification.

If you set the behaviour on a group, I wonder if subsequent units joining that group will pick up the behaviour where if you set the behaviour on all units then joining units would not be effected?? Just guessing here. 

  • Like 1

Share this post


Link to post
Share on other sites
27 minutes ago, Luft08 said:

If you set the behaviour on a group, I wonder if subsequent units joining that group will pick up the behaviour where if you set the behaviour on all units then joining units would not be effected?? Just guessing here. 

Well, that's a reasonable guess. I believe testing is needed here :).

 

I'll let you people know if I manage to get any meaningful results.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×