I have searched here and ofpec for everything about addaction, i still have doubts..
1. Can i "put" an addaction on a a.i. unit? I only got it to work with players and objects..
2. I did get it to work with a trigger that checks the distance betwean the player(s) and the a.i. unit, if any player
gets <5 from the target he gets the addaction:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
capture = player addAction ["Take prisoner", "hostage.sqs"]
[/QUOTE]
The condition is:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
"_x distance prisioner < 5" count (units mygroup) > 0
[/QUOTE]
2.a Will "player" refer to any player (in the group) that triggers this in MP?
2.b How do i remove the action if the guy ignores it and walks away? It still shows on the action menu... i tried to reverse the distance (> 5) and to remove the action but it didnt work..
Help.
HOME
.
Reply With Quote

