Jump to content

skudd3r

Member
  • Content Count

    3
  • Joined

  • Last visited

  • Medals

Everything posted by skudd3r

  1. Note: I'm learning to script still so if I am doing something messy, tell me I won't be offended. Goal: Have a helicopter controlled by AI fly to a waypoint, wait for all players to get out, then move off when no players are left in the chopper. Script: Helicopter follows waypoints. At waypoint 3, a script is activated (AIR1 being the helo, AIR1OUT being a variable I set in init.sqf to false): null = [AIR1, AIR1OUT] execVM "scripts\emptyVehicle.sqf"; At waypoint 4, I set a condition AIR1OUT, this causes the helicopter to stop (Altitude at 3-5m). I bail out and nothing happens, the helicopter remains in that way-point. So I added a debug hint my script to try to see what was going on. I found out that my waituntil is working fine, it shows that there is 1 player in the chopper and the Boolean is false. When I bail out however, the counter changes to 0, but the Boolean remains as false. Its late I could just be tired or completely overlooking something obvious. Here is my SQF: //Made by SKuD //null = [vehicle,player] execVM "scripts\emptyVehicle.sqf"; _vehicle = _this select 0; _str = "Counter: "; _unit = player; _condition = _this select 1; waitUntil{ {_x in _vehicle} count units group _unit == 0; _counter = {_x in _vehicle} count units group _unit; _str = _str + format ["%1 %2", _counter, _condition]; hint _str; sleep 5; }; _condition = true;
  2. I know about unload, but I am wanting the users to perform the action, feels more involved. I also was trying to create this script so it could be reusable with the inputs, vehicle name and the condition name as input variables. I was thinking maybe the issue was the variable AIR1OUT is set in the init.sqf as false, I place it in the waypoint condition as AIR1OUT and in the previous waypoint I've already executed the script, but in the script I take the input for the condition and set it to _condition and update it locally. But then why would my waituntil loop not stop? My debug hint updates and shows as 0 when the user bails out of the chopper, so shouldn't that end the waituntil loop(It's not atm)?
  3. Is this static location of arty or cursor location? Either way you should be able to create an artillery script and run it with a execVM
×