setUnitPos no longer forces the unit to assume the needed position. When firing, they are liable to stand.
Description
Details
- Legacy ID
- 1449415045
- Severity
- None
- Resolution
- Unable To Duplicate
- Reproducibility
- Have Not Tried
- Category
- Scripting
Place a few units down in the editor with this in their init. boxes: this setUnitPos "MIDDLE";. Then add a few enemy units. Notice that those in the crouching position will not remain crouching and will stand up.
Event Timeline
In fact - it doesn't seem to work at all anymore! As soon as the enemy opens fire, they just do whatever they like.
Ok - tried on Dev branch too - AI will start crawling around with SetUnitPos "UP". I've tried disabling "FSM" and a few other things, but I can't sort it...
I just created an opfor unit and called it bob. Usually bob would drop down when I start shooting at him but
bob setUnitPos "UP"
kept him standing till the end.
I'm on dev.
I managed to sort it by disabling FSM - I think I've been getting some strange results, as units are post-ambientanimcombat... not sure how it's effecting them.
Still not working - no mods running - nothing. Sometimes it works. Sometimes it doesn't. Usually when the unit open fires it will ignore the command...
This ticket is useless without a repro, any repro. I tried again with today's build. This time made bob crouch:
bob setUnitPos "Middle";
Bob died like a hero not leaving his position crouching under fire. Does my set up work for you at least?
Hi Killzone - sorry to be so vague, mate. I think I added a repro since your last post (I try and do that now!). I've tried your set up as above and cannot keep the unit in a crouching position. They crouch to begin with and then decide to stand up. This only occurs if an enemy is nearby. The trouble is, this issue is not consistent. I've had times when the command works perfectly, and other times when it has failed miserably. I'm not running any mods and I'm using the Dev build. Cheers for your help,
I've made a video recording of the issue but it won't upload. I can email it to anyone interested.
OK! I've isolated the problem. It seems that an enemy tank is causing the AI to break their crouching position. I have no idea why, but as soon as I got rid of it - the problem vanished.
Can you make a simple mission, 2 units and instructions on what to do to break it instead?
I'll see if I can replicate what's happening from a larger mission I'm making and then upload it :)