Some issues with AI doing multiple things at once

I’ve created waypoints for the casemate to follow, and it will encounter enemies at some point along the way, and I run into some issues when the casemate trying to stop and shoot the enemies, then quickly turn again trying to follow the waypoint route, is it possible that I make them stop moving and shoot the enemy as long as the enemy is in their line of sight?

Screenshot 2024-11-14 015954

I’ve tried plenty of stuff and none of them seems to work the way I want, is it possible?

1 Like

Yes, it is possible.
Create trigger with action “UnitSetProperties” where set stop for units.
Then if necessary you can resume their movement according to waypoints.

1 Like

Hey, thank you, bro. It works with moveSpeedKatShooting set to 0. Unfortunately, it works only with vehicles with a turret, and I can’t seem to make it work on turretless vehicles, they do stop but they are still “wiggling” when the enemy is in LOS so it looks weird.

Btw, is it possible to create a lighting system? mission were set at night time and I’ve placed several mobile flood light structures, is it possible to create lighting to illuminate the area around it?

Yeah, I found this problem too. Looks really weird.
Well, there are a lot of problems with CDK and with game itself.

Never had this task before.
There are a couple of actions that looks like searchlight (taken from official website)
Funny that even gaijin themselves do not know if some of their triggers work or what the purpose of some triggers is.

Might be better to have a trigger with a condition, action and else action. Set the trigger to activate if any condition is met. Let the trigger repeat every second. Set the condition to be a if fired at, if unit is within distance, if unit is in visable range and whatever else you may need. Set the action to your attack and unitproperties. Then the else action to be your normal movement. Also set its attack type to “dont aim” in this action. As for lighting no. All the lighting is baked into the map. You can set custom nights by messing with longitude and latitude, dates. So you can have a any state of the moon or no moon. Ive never got the searchlight units or triggers to work. Hell even the searchlight units dont work.

Its rather buggy, I have had some problems with units disappearing after I saved the mission blk then another time all the enemy units disappeared, thankfully I have had some experience with editing the blk in text files and found out one of the unit lines has a missing { so it couldn’t read half the lines, like how did that happen? also the ckd is very prone to crashing and has a lot of performance issues when you enabled the asset viewing mode, literally froze for 20 seconds when you switched from environment viewing mode to mission editing mode.

I’ve tried the visibility range and it doesn’t seem to change their behavior, even trigger only when player “sees” the enemy also doesn’t do anything.

Also now I trying to code some units to be “immovable” by all means of collisions, tried the movable = 0, cannotmove = 1 and all the anti collision lines, none worked.

I’ve wanted to make the hangar flood light unit work, its currently using this light_generator_a asset in objectgroup, and the properties of this unit have no lighting setting, so I can imagine several problems even if we managed to put light on it, or make it looks like this unit produce light, upon unit destruction the light needs to go away, if possible by triggers. I’m still new to this, will update if I find any workaround.