treygeboy 0 Posted April 24, 2020 Hello, I have been trying to get this script working for the past day. I got a vehicle to only move to the next way point when a trigger has been activated. In this case when BLUFOR is inside a trigger zone for at least two minutes. However, I want them to land wait for all players to get into the vehicle until moving to the next way point. However, doing it the same way I did the original movement it only lands then take right back off regardless of the passengers being inside. In this case the helicopter is called "heli1" and the player(s) are called "player1" "player2" etc. I have also tried using the get out and get in command however, they get out but not back in. Here is the code player1 in heli1 && player2 in heli1; Is there a way for the game to get a list of all active players instead of limiting how many I can have. And how can I fix the problem of the helicopter either leaving us or not moving at all. Thanks in advance. Trey G Share this post Link to post Share on other sites
gc8 981 Posted April 24, 2020 4 minutes ago, treygeboy said: Is there a way for the game to get a list of all active players instead of limiting how many I can have. yes there is: https://community.bistudio.com/wiki/allPlayers Share this post Link to post Share on other sites
treygeboy 0 Posted April 24, 2020 7 hours ago, gc8 said: yes there is: https://community.bistudio.com/wiki/allPlayers So I would just put "all players" in place of "player1" and "player2". And what about the other problem I am having? Share this post Link to post Share on other sites
gc8 981 Posted April 24, 2020 5 minutes ago, treygeboy said: So I would just put "all players" in place of "player1" and "player2". And what about the other problem I am having? You could use something like this: _numPlayersInHeli1 = { _x in heli1 } count allplayers; if((count allplayers) == (_numPlayersInHeli1)) then { // All the players are in the heli1 }; Share this post Link to post Share on other sites
gc8 981 Posted April 24, 2020 7 hours ago, treygeboy said: And how can I fix the problem of the helicopter either leaving us or not moving at all. don't know.. what are you using now, waypoints? Share this post Link to post Share on other sites
treygeboy 0 Posted April 24, 2020 1 hour ago, gc8 said: don't know.. what are you using now, waypoints? Ya just simple move commands, then a land. Then once the people are in the heli. I want ai to take off and move to the next move waypoint. If there is a more efficient way do tell. Share this post Link to post Share on other sites
gc8 981 Posted April 24, 2020 14 minutes ago, treygeboy said: Ya just simple move commands, then a land. Then once the people are in the heli. I want ai to take off and move to the next move waypoint. If there is a more efficient way do tell. That's one way of doing it. you might want to look for video tutorials on how to setup those waypoints Share this post Link to post Share on other sites
treygeboy 0 Posted April 24, 2020 21 minutes ago, gc8 said: That's one way of doing it. you might want to look for video tutorials on how to setup those waypoints Ya I know how to do it. I did it on a different mission. Now Instead of only moving when all people are in heli I want it to first move once activated by a trigger then come and land. I got this part working however now I just need it to stay on the ground until all people are in the heli. Right now it is landing then taking right back off regardless if the people are in the heli. I have it set like this. The initial move point is only activated when "trigger1" is activated. Which in this case is set up for BLUFOR inside zone for 2 minutes. They take off once it is activated and then come and land. The move waypoint after the land waypoint has the trigger activation say " trigger01". However, it lands then takes back off regardless if "trigger01" is activated or another way of saying it is if the players are actually in the helicopter. This is the code that is in condition on "trigger01" player1 in heli1 && player2 in heli1; However I will try the all players one as that will be easier if I can figure out a way to do so. Share this post Link to post Share on other sites
gc8 981 Posted April 24, 2020 I'm not sure why you use triggers.. waypoint condition scripts should be sufficient Does the "player1 in heli1" code work then? Share this post Link to post Share on other sites
treygeboy 0 Posted April 24, 2020 I am not sure I put the "player1 in heli1; however after landing it takes right back off and hovers. Share this post Link to post Share on other sites
treygeboy 0 Posted April 24, 2020 1 hour ago, gc8 said: I'm not sure why you use triggers.. waypoint condition scripts should be sufficient Does the "player1 in heli1" code work then? I am not sure I put the "player1 in heli1"; in the condition of the move way point after the land way point. However after landing it takes right back off and hovers. Update well now I got him to stay on the ground however, once "player1" is in "heli1" it just stays on the ground. So I guess that means the next waypoint "moveif" is not being activated correct? It's back and forth sometimes it hovers other times it stays. Which makes no since at all hahaha Share this post Link to post Share on other sites
treygeboy 0 Posted April 24, 2020 2 hours ago, gc8 said: I'm not sure why you use triggers.. waypoint condition scripts should be sufficient Does the "player1 in heli1" code work then? I got it working using this method. Now I will try and use the all players command as you said https://forums.bohemia.net/forums/topic/212166-make-ai-ignore-a-waypoint-until-triggered/?do=findComment&comment=3253561 Share this post Link to post Share on other sites
treygeboy 0 Posted April 24, 2020 2 hours ago, gc8 said: I'm not sure why you use triggers.. waypoint condition scripts should be sufficient Does the "player1 in heli1" code work then? Where would I put the all players script? In the trigger? in the Condition or on activation? Share this post Link to post Share on other sites
gc8 981 Posted April 25, 2020 11 hours ago, treygeboy said: Where would I put the all players script? In the trigger? in the Condition or on activation? I dont know how you have setup the system but probably in waypoint condition This code is true if all players are in heli1 (Put that in condition): ((count allplayers) == ( { _x in heli1 } count allplayers )) Share this post Link to post Share on other sites
treygeboy 0 Posted April 25, 2020 14 hours ago, gc8 said: I dont know how you have setup the system but probably in waypoint condition This code is true if all players are in heli1 (Put that in condition): ((count allplayers) == ( { _x in heli1 } count allplayers )) Ok what about the if statement where do I put that. Or do I not need that Share this post Link to post Share on other sites
gc8 981 Posted April 26, 2020 9 hours ago, treygeboy said: Ok what about the if statement where do I put that. Or do I not need that no need for if statements if you are not doing this via script files. just waypoint condition needs the code Share this post Link to post Share on other sites
treygeboy 0 Posted April 26, 2020 11 hours ago, gc8 said: no need for if statements if you are not doing this via script files. just waypoint condition needs the code Ok thanks man. I got it working !! Thanks for the help! Share this post Link to post Share on other sites
game cardoso 0 Posted April 8, 2023 On 24/04/2020 at 04:35, treygeboy said: Olá, tenho tentado fazer esse script funcionar no último dia. Consegui que um veículo se movesse apenas para o próximo ponto de passagem quando um gatilho fosse ativado. Neste caso, quando o BLUFOR estiver dentro de uma zona de gatilho por pelo menos dois minutos. No entanto, quero que eles pousem, espere que todos os jogadores entrem no veículo até passar para o próximo ponto de passagem. No entanto, fazendo da mesma forma que fiz o movimento original, ele apenas pousa e depois decola, independentemente de os passageiros estarem dentro. Neste caso, o helicóptero é chamado de "heli1" e o(s) jogador(es) são chamados de "player1" "player2" etc. Eu também tentei usar o comando get out and get in, no entanto, eles saem, mas não voltam. o código Existe uma maneira de o jogo obter uma lista de todos os jogadores ativos em vez de limitar quantos posso ter. E como posso resolver o problema do helicóptero nos deixando ou não se movendo. Desde já, obrigado. Trey G I apologize for my intrusion but can someone help me? I would like to put a trigger in which it is triggered as soon as the player leaves the vehicle, with music from the trigger itse Share this post Link to post Share on other sites