Jump to content

sarogahtyp

Member
  • Content Count

    2494
  • Joined

  • Last visited

  • Medals

Everything posted by sarogahtyp

  1. okay, i can confirm a hc is not part of playableUnits.
  2. @ZaellixA one more detail is that u r writing code for use on server and op tries it on client. (using "player"). OPs code will not work if there are some more connected clients because each client will choose a different terrorist. but again, why not using _allPlayers = playableUnits; instead of ???
  3. huh, I made a mistake. I should have read the wiki myself before posting nonsense... I meant playableUnits: _allPlayers = playableUnits; this contains alive players without HCs + switchable Units which should not exist on MP without AI usage for Player slots...
  4. i guess you don't use .rpt file to watch script errors. do you? your if then statement is missing the closing curly bracket... edit: you can just use _allPlayers = allUnits; because allUnits has only alive players and no headless clients in it reading command descriptions in the wiki helps a lot
  5. huh, took a second look at your script... you cant just do two endless while loops behind each other. the second loop will never get executed at least how u do it. It can be done this way: [] spawn { while {true} do { your code }; }; [] spawn { while {true} do { your code }; }; spawn will spawn a new script and put it to script scheduler which takes care of it after that.
  6. other useful stuff: Init order event scripts Script Optimization Array Stuff just ask if u need more ;-)
  7. what I forgot to mention is that the cron manager script is designed to run server side only. therefore you can't run it on client in its current state. But you could easily delete the if (isServer) conditions on the script files to get it work on clients...
  8. one scripting goal should be to avoid to have a lots of endless while loops but what is your while loop for? maybe there is another way but idk why you need to check it every 5 seconds... A way I use to avoid multiple endless while loops is to use the cron manager script provided by @ussrlongbow. It checks every 0.5 second for jobs which need to be executed and it uses only one trigger for this. Using this I get rid of a bunch of while loops by just registering the while-content as a job. Also many while loops can be avoided by using Armas Event Handlers. Why to avoid multiple while loops? One point is that they prevent a script to get finished and therefore they may overload the script scheduler which has to handle those opened scripts.
  9. this is not the same and if you need it or not you have to decide yourself... look at example 3 of the private wiki entry. with private you are able to ensure to modify an already known variable in the current scope only. means you could use a variable in a script like _cool and give it a value of 123. then you start a new scope by doing a while loop. inside of that while you could use private _cool; and then change the value of _cool to 345. as long as you are inside the while loop _cool will be 345. but if you are exiting that loop then _cool will have the value 123 as set before you entered the while loop...
  10. you have to worry about it if you copy code out of forum because there are often invisible characters inside of it which cause error messages.
  11. sarogahtyp

    Vehicles are like cats

    did u try to disable simulation for the vehicle and then put it on its side?
  12. this is not really recursive because not the script starts the script again but the waypoint will start it if the waypoint gets activated. the prior script instance should have ended long before. no problems here i guess
  13. It does: https://community.bistudio.com/wiki/Eden_Editor:_Trigger
  14. show screenshots of your triggers pls or try to give more structured info...
  15. Hey Guys, I guess you did messing around with a forum bug (invisible chars) this error message contains an invisible char: 1:42:49 Error in expression <gear.sqf"; hint "ATgear detected"; };> 1:42:49 Error position: <> 1:42:49 Error Invalid number in expression I mark it in next code bloxk with: !HERE! 1:42:49 Error in expression <gear.sqf"; hint "ATgear detected"; };!HERE!> 1:42:49 Error position: <!HERE!> 1:42:49 Error Invalid number in expression
  16. sarogahtyp

    CFGsound

    he ask for an eh for gear down. same question as in the linked thread ...
  17. sarogahtyp

    CFGsound

    Don't ask twice please. especially if you ve opened a new thread for this:
  18. sarogahtyp

    Simple Low Altitude Warning

    add this EH to your plane this addEventHandler ["Gear", { params ["_vehicle", "_gearState"]; if {_gearState} then { if (!isNil "ALTwarn") then { terminate ALTwarn }; } else { ALTwarn = [] execVM "LowALT.sqf"; }; }]; not tested!
  19. Text is a reserved word because it's a command: text
  20. sarogahtyp

    Detach helicopter

    try setVehiclePosition:
  21. sarogahtyp

    Detach helicopter

    that's what we understood already since u mentioned that you attached a boat to get it drivable...
  22. sarogahtyp

    Detach helicopter

    I guess you can't turn engine of the chopper on as long as it is attached.
×