Usually if you for example put an AI in a building, once the bullets start flying he lay on the ground completely still.
What I wonder is if anyone got any info, tricks in how to make the AI stand up without making movement waypoints. Maby a hold waypoint with stand but I never tried it so if someone know something that will, it would be good!
Cheers!
Enemy AI lay still on ground.
- Ender
- Posts: 218
- Joined: Sun Mar 06, 2016 5:42 pm
- Location: Sweden
- Contact:
Enemy AI lay still on ground.
It is the challenge that makes one better, to push one's limit and actively look for things to do better- Ender
- Wombat
- Posts: 601
- Joined: Mon Jan 18, 2016 3:19 am
- Contact:
Re: Enemy AI lay still on ground.
You can force a unit to stay standing by entering the following code into it's init:
this setUnitPos "UP";
You can also force units to stay crouch or prone by using "MIDDLE" or "DOWN" respectively. I'm sure it's possible to create a more detailed script which forces a unit to go from standing to a crouch for X number of seconds when he takes damage and then return back to standing again (see setUnitPos, getDammage and sleep). This could make an AI use cover more effectively when fighting from a window for example.
this setUnitPos "UP";
You can also force units to stay crouch or prone by using "MIDDLE" or "DOWN" respectively. I'm sure it's possible to create a more detailed script which forces a unit to go from standing to a crouch for X number of seconds when he takes damage and then return back to standing again (see setUnitPos, getDammage and sleep). This could make an AI use cover more effectively when fighting from a window for example.
-
- Posts: 293
- Joined: Sun Jan 17, 2016 5:10 pm
- Contact:
Re: Enemy AI lay still on ground.
Please put this kind of question in the Editing Forum next time. It does not specifically concern Server 2.
- Wombat
- Posts: 601
- Joined: Mon Jan 18, 2016 3:19 am
- Contact:
- Ender
- Posts: 218
- Joined: Sun Mar 06, 2016 5:42 pm
- Location: Sweden
- Contact:
Re: Enemy AI lay still on ground.
Cheers!
It is the challenge that makes one better, to push one's limit and actively look for things to do better- Ender
- 2600K
- Posts: 173
- Joined: Sun Jan 17, 2016 5:21 pm
- Contact:
Re: Enemy AI lay still on ground.
There's a 'stance' icon under 'Object States' which has the same effect as adding the code into the units init.
-
- Posts: 49
- Joined: Sun Oct 23, 2016 7:21 pm
- Contact:
Re: Enemy AI lay still on ground.
You can also disable certain aspect of the AI if you wish for them to remain specifically in one position.
Here's the init of a unit that will always remain standing in the window, and should be observing a specific position without moving, fleeing or engaging enemies (will still open fire at will though).
this setUnitPos "UP";
this disableAI "path";
this disableAI "FSM";
this lookAt gateMain;
I think I may have been having trouble with the lookAt command not being strict enough (unit still scans surrounding area when shots heard) but this may be because of ACE scripting.
I haven't yet looked into testing that further though.
Here's the init of a unit that will always remain standing in the window, and should be observing a specific position without moving, fleeing or engaging enemies (will still open fire at will though).
this setUnitPos "UP";
this disableAI "path";
this disableAI "FSM";
this lookAt gateMain;
I think I may have been having trouble with the lookAt command not being strict enough (unit still scans surrounding area when shots heard) but this may be because of ACE scripting.
I haven't yet looked into testing that further though.
Who is online
Users browsing this forum: No registered users and 5 guests