Jump to content
thecoolsideofthepillow

Locking/Unlocking AI Spawnpoint Modules from Sector Ownership?

Recommended Posts

I did this a while back before the ED3N editor came out where I could sync I think a trigger, a lock or unlock logic and the sector in question to any other module/trigger to make it so when the sector is captured by one team it would unlock one set of things, and if captured by the other, lock those first things and unlock others.

 

I don't remember how to do it though. The pictograph as a reference was only in the 2D editor, which is no longer in the game and very few of the modules in the 3D editor have yet to have these ported over.

 

I've tried a scripted method, and it works for the player spawns; but activating/deactivating the "AI Spawnpoint" modules with enableSimulation does not seem to work. Regardless of whether the simulation is enabled, the AI never uses spawnpoints other than the one at their respective AI Spawn module that controls the overall spawning behavior. Even if the weighting is set higher on the unlocked modules. I know modules and syncing aren't the norm around here, but I'm hoping maybe someone knows what I'm referring to here and knows the proper set up. Using as little scripting as possible always seems to make a smoother mission.

Share this post


Link to post
Share on other sites

Quick tip: Whilst in the map selection screen for the editor, highlight the map you want and press CTRL+0 (on an english keyboard, not sure about any others).

Should pop you right back into the 2D editor.

Have you tried using triggers and their condition fields?

condition :

(myLovelySector getVariable "owner" != west)

activation :

 

myLovelySector enableSimulation false; 

!= meaning not equal to, so change that around to suit your needs. 

Share this post


Link to post
Share on other sites

Yeah, that's exactly what I was trying to do.

 

Got a trigger with the condition:

 

sectorA getVariable "owner" == WEST

 

Activation:

 

aispawnA enableSimulation true;

 

Deactivation:

 

aispawnA enableSimulation false;

 

My sector module's variable name is "sectorA" (I *am* supposed to use the variable name, right, and not the display name?), my AI Spawner is "aispawnA." When BLUFOR owns sectorA, the AI never spawns at the designated point. The always on spawner has a weight of 1, the new spawner has the default of 5; but I have also tried these weights reversed because I am not sure which direction it goes for "more weight" so-to-speak.

 

Thanks for the command to get to the 2D editor, by the way. I just needed this little bit:

 

https://steamuserimages-a.akamaihd.net/ugc/96107790574488733/F232E196E704574FE263A2F24FA4D2C2488EFF98/

 

I was almost right with it when I started last night. Just forgot to set my triggers to the proper team (left them default). Haha

Share this post


Link to post
Share on other sites

yep, the variable name for the module should just be aispsawnA.

I've honestly never used the sector control modules all that much. But, this should have worked.

Not sure the weighting of the spawned ai matters much. 

Share this post


Link to post
Share on other sites

It's not the weighting of the AI to spawn itself; there's another option in there for when you use multiple spawnpoints, it wants to use one more than another. But since it's a numerical value, it's a bit vague as to whether a lower number or a higher number is given priority. If they're all equal, it just picks at random.

Share this post


Link to post
Share on other sites
3 minutes ago, thecoolsideofthepillow said:

No problem. You helped me get what I needed so I should be good for, oh another 3 hours until I try to get crazy with something and need help again. lol

Lol, good luck.

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

×