Jump to content
dlegion

how change hostages faction after rescue?

Recommended Posts

hello guys,
i'm having a little issue with hostages rescue script...i use this code :
[h1, h2, h3, h4] joinsilent (group _x);
...where h1 h2 h3 h4 are hostages and _x is player saving them, and all works in editor MP, but on dedicated server, hostages join player group, but remain civilian faction!
i wish they change team to player's team (red or blue) so opponent AI (green) shoot to kill them after rescue!
any idea how make it happen also on dedicated ?
thanks guys !

Share this post


Link to post
Share on other sites

Could it be that they're setCaptive for your hostage script?

In that case:

{_x setCaptive false} forEach [h1, h2, h3, h4];

Share this post


Link to post
Share on other sites

thanks Belbo!
well no, they are just spawed as normal civilians, i suspect a locality issue , because on local server it works but not on dedicated...its strange.
i explain it better: the hostages side is civilian by default, but as soon as a player approach them (3 m range), i wish they take the faction of the player near them, that can be RED or BLU.
so i cant for example make a blu hostage captive waiting to be saved, because it can be saved by red players.
checking with editor, i see that they take player faction (but they are probably local to player already, being editor), while on dedicated this does not happen, and they stay civilian faction.
as additional info, all the script runs server side. maybe i need to somehow run it on clients too ?
 

Share this post


Link to post
Share on other sites

You have to move the hostages to a group of the appropriate side, the units themselves have no real side per se

Sent from my SM-T580 using Tapatalk

Share this post


Link to post
Share on other sites

awesome ! thanks man, tonight i try this !
thanks again !

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

×