Jump to content
Sign in to follow this  
owmyeye

How to cancel human player commanded 'go prone' on a group with a trigger?

Recommended Posts

(For Single Player)

Basically my question is:

How do I use a trigger to override a player issued order for a group to go prone?

Scenario:

There are 2 groups. Group 1 is commanded by a player and ambushes a convoy. At this point, the player will likely issue the stay prone order. After the convoy is destroyed, the game automatically changes the player to Group 2's leader. Group 1 (now commanded by the AI) then follows way-points. The problem I experienced is that if the human orders Group 1's team to go prone and doesn't change it before the player switch- the group stays stuck in prone. They crawl to each way-point and never stand.

Attempted solutions:

- Using a trigger to target each unit with the setunitpos "up" command.

That only effects the group leader (who doesn't crawl, as he didn't issue the prone order to himself). None of the other group members have their stance effected by the command.

- Removing the players from the group

They just stay laying down.

- Adding them to another group leader who is standing

They just crawl over to them

Is there some other kind of command which I can use to set this groups stance? Is there maybe some kind of 'clear orders' function or something?

Any help would be very much appreciated.

Share this post


Link to post
Share on other sites

{ _x setUnitPos "AUTO"; _x setUnitPosWeak "AUTO"; } forEach units group1

Give that a try, should do the trick.

Share this post


Link to post
Share on other sites
{ _x setUnitPos "AUTO"; _x setUnitPosWeak "AUTO"; } forEach units group1

Give that a try, should do the trick.

@Kolmain : That's not working, but I don't know if it's because i'm doing it wrong.

What I did:

1) Put: group1 = group this , in the group leader's init

2) Made a trigger activated by the group-leader, which on act: {_x setUnitPos "AUTO"; _x setUnitPosWeak "AUTO";} forEach units group1;

I put text in the trigger and I can see it's activating, but the group doesn't stand up.

I also just tried un-grouping one of the units and using both the setunitpos and setunitposweak on him, but that didn't work either.

@DreadedEntity , I should have mentioned I already tried changing the group to 'safe' (using a waypoint) and it doesn't work.

Share this post


Link to post
Share on other sites
forEach (units group1);

{_x setUnitPos "AUTO"; _x setUnitPosWeak "AUTO";} forEach (units group1);

They still don't stand up. :cryy:

Share this post


Link to post
Share on other sites
{_x setUnitPos "UP"; _x setUnitPosWeak "UP";} forEach (units group1); 

Share this post


Link to post
Share on other sites

"UP" doesn't work either.

I tested to see if the commands worked before issuing the the stay prone command (by pressing ~,7,8) and I can make the team stand up and go prone. After using the leader to issue 'stay prone', the triggers no longer effect the units- even after the units are removed from the group.

It seems like once a player issue's go prone, nothing can effect their stance until another player issue's a new order by pressing ~,7 .

Is there any way to use a trigger to make the AI issue the command to their team? Or, like I wondered before, is there any way to clear these commands?

Share this post


Link to post
Share on other sites

Actually, just read the wiki on setUnitPosWeak, which has in the notes:

This command is the lowest level of priority for setting unit position and to be used in scripted FSM's. The current priorities are:

1. Unit pos commanded (from the commanding menu, higher priority).

2. Unit pos scripted (from setUnitPos scripting command, medium priority).

3. Unit pos FSM / setUnitPosWeak (used in the formation FSM, lowest priority).

So I'm not sure it's possible to alter that behavior without an addon of sorts.

Share this post


Link to post
Share on other sites

Dang! That's a real deal-breaker for me releasing this scenario on steam... not that the masses are hanging out for my work- but anyway it sucks.

Share this post


Link to post
Share on other sites
Dang! That's a real deal-breaker for me releasing this scenario on steam... not that the masses are hanging out for my work- but anyway it sucks.

Hm. You could just delete and recreate the group via scripting? That'll work for sure.

Share this post


Link to post
Share on other sites
Hm. You could just delete and recreate the group via scripting? That'll work for sure.

I'm not entirely sure what you mean. Use a trigger to delete the group? Or some other kind of script?

Using triggers, I've tried removing units from the group and even adding them to a fresh group (with new leader) but those 2 things didn't help. The unit keeps the prone command un-grouped and when joining a new group.

Hopefully you mean something different than triggers?

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
Sign in to follow this  

×