Page MenuHomeFeedback Tracker

Creating the FIRST AI by script freezes the game for some time.
Closed, ResolvedPublic

Description

I'm working in a mission creating units randomly using TINY scripts but I notice that every time I create the first AI the game suffers a HUGE PERFORMANCE HIT. My powerful computer freezes for about 3-5 seconds. My colleague Pc, not powerful, freeze for more than 10 seconds when it creates the first AI.

I did try all the possible options to create a unit: old version, array version and the function version. ALWAYS I have a big drop on performance when I create the first AI unit even creating a center by script or placing a unit of the same side on the editor.

  • SOMETIMES THERE IS NO PERFORMANCE HIT IF YOU ALREADY PLAY THE GAME ONCE * To notice it you must restart the game an then you will experience this bug.

By the way this issue can be behind the small number of AI units that Arma 3 can handle. In Arma 2 I did not have any issues creating a lot of AI units with same commands.

Thanks for your time {F22983}

Details

Legacy ID
1424784960
Severity
None
Resolution
No Bug
Reproducibility
Always
Category
Scripting
Steps To Reproduce
  1. RESTART THE GAME (IMPORTANT)
  1. Move forward and use the 0-0-0 trigger to run the script.
  1. You will experience a huge game freeze and it will recover itself after a few seconds.
Additional Information

By the way I did a test using the minimal code:

_Spawn_Team = CreateGroup East;
_Spawn_Team createUnit ["O_Soldier_F", [0,0], [], 3, "NONE"];

with 500m view distance and it has the same problem.

Event Timeline

Murcielago edited Additional Information. (Show Details)
Murcielago set Category to Scripting.
Murcielago set Reproducibility to Always.
Murcielago set Severity to None.
Murcielago set Resolution to No Bug.
Murcielago set Legacy ID to 1424784960.May 7 2016, 5:41 PM

The issue is the use of:

Position ([0,0,0] NearestObject 457070)

remove that line from the radio trigger and a vast majority of the freeze is gone.
the way nearestObject is setup, when you use ^ that ^ format, the search range becomes unlimited, and its starting that huge search from the middle of the ocean

only the stutter left is from loading in a new object that wasn't originally included in the mission on load (any large or complex object does this, not just AI units)

See cancerouspete's post. I observe 2-3% fps drop, which is normal and we are not able to fix it. Are you able to reproduce this issue without that nearestObject line? Thanks
I would recommend to use some other way. Using of unlimited (457km) radius in nearestObject command is not very good for smooth fps.

No reaction for some time. Resolved as no bug.

MadDogX added a subscriber: MadDogX.May 7 2016, 5:41 PM

Mass closing tickets marked as resolved more than 1 month ago.

If the issue is in fact not resolved, please create a new ticket referencing this one and ask for it to be re-opened.