Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
frankiie

Making certain Ai's playable via a trigger.

Recommended Posts

I was kinda wanting to lock the player into a position for a beggining of a mission, sort of a scene since I set up the Ai to do everything, and it's like a ambush and stuff like that.

and I was wondering if you could make Ai playble on a trigger? So you can switch to them after the scene is over and stuff. :) Anything is helpful.

Share this post


Link to post
Share on other sites

Thanks, so what I put into the trigger that is supposed to let Ai playable was "enableTeamSwitch enable".

Didn't seem to work. I suck at this, am I putting in the right thing, or missing something?

Share this post


Link to post
Share on other sites

This works:

addSwitchableUnit 'UnitName'

without the actual '' s. Just name the unit you want to be switchable and add it after addSwitchable in the Trigger Activation box. Example: addSwitchable Fred

Edited by froggyluv

Share this post


Link to post
Share on other sites

After trying to figure it out for an hour I finally got it.

thanks for helping :)

Share this post


Link to post
Share on other sites

So is it best to use both setPlayable and addSwitchableUnit?

Share this post


Link to post
Share on other sites
So is it best to use both setPlayable and addSwitchableUnit?

just use "addSwitchableUnit unitname" in the trigger activation. Simple and it works awesome

Share this post


Link to post
Share on other sites

Yeah, it seems to work. I'm still wondering what's the difference between them... I remember that I tried setPlayable in Arma 2, when I didn't know of addSwitchableUnit, but it didn't work for me back then. Does setPlayable maybe add the unit as selectable when you join the server, but doesn't make it respawnable when you die in-game, while addSwitchableUnit does the opposite? I have to try to test them, I guess.

Share this post


Link to post
Share on other sites
Yeah, it seems to work. I'm still wondering what's the difference between them... I remember that I tried setPlayable in Arma 2, when I didn't know of addSwitchableUnit, but it didn't work for me back then. Does setPlayable maybe add the unit as selectable when you join the server, but doesn't make it respawnable when you die in-game, while addSwitchableUnit does the opposite? I have to try to test them, I guess.

Not really sure.. Although be aware that I tested if "addSwitchableUnit" works in MP LAN. And it does not work, only in Scenarios and Editor.

Share this post


Link to post
Share on other sites

Yeah there is no Teamswitch in MP but I have seen hack around scripts for Arma2 that had it working.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×