Jump to content

gokitty1199

Member
  • Content Count

    308
  • Joined

  • Last visited

  • Medals

Community Reputation

208 Excellent

7 Followers

About gokitty1199

  • Rank
    Staff Sergeant

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

779 profile views
  1. assuming i understood you correctly, call this on the first person who enters the triggers client and it will broadcast the system chat to everyone. not with systemChat no, you would need another form of displaying the message for that(afaik) BUF_DisplayText = { _profileName = profileName; _str = format["Time: %1 ProfileName: %2", time, _profileName]; _str remoteExec ["systemChat", 0, false]; };
  2. you can put whatever you want in it. so each time a player enters the trigger you want to display text to everyone showing who entered the trigger? or do you want it to only display who entered the trigger first to everyone or what? that part is still unclear to me
  3. you can simply call a function from the trigger to run on the clients. how do you want it called exactly and for who do you want it to be shown to? heres an example of what i mean BUF_DisplayText = { _profileName = profileName; systemChat format["Time: %1 ProfileName: %2", time, _profileName]; };
  4. the variables are not actually defined due to spawn{}. heres an example of what i mean this will throw an undefined variable error for _unit(inside of spawn{}). the first params ["_passedInUnit"] is referring to [this] that you passed into the sectorTacticInfantry.sqf script, the unit itself which you need to add to the top outside of spawn. params ["_passedInUnit"]; [] spawn { params ["_unit"]; hint str _unit; }; now heres a working example where it knows what _unit is. im passing in [this] just like before into the script(how you called it in your post, no different), im assigning it outside of spawn{}, then i am passing it INTO spawn{} so the script inside of spawn{//script here} knows what it is params ["_passedInUnit"]; [_passedInUnit] spawn { params ["_unit"]; hint str _unit; }; make sense? spawn is not really a part of your .sqf script that you execVM, its more so telling the game to compile/add a new script to the scheduler which is why you have to pass variables into it to use them. i would consider trying to rewrite alot of your script and try to make it more efficient because alot of open loops on alot of AI will cause some lag. try coming up with a method that fires once on a specific event or X seconds and checks all of them at once(i havent really read your script so sorry if that will not achieve what your trying to do). consider creating a function that takes in a unit as a parameter and call it instead
  5. that seems about right since it prints out hints pretty quickly with just a slight delay sometimes, thank you. scripting ftw
  6. do you by chance know how often triggers check their conditions? i saw someone posted it a few weeks ago but for the life of me i cannot find that post
  7. am i the only one who thinks its a bad idea to have triggers rapidly checking to see if a side is dead(not being a dick im honestly asking if it would be considered worse or better than the below method as i just dont use trigger conditions ever)? specifically having multiple triggers that are constantly checking the exact same thing for 2 sides when you can check everything only when a unit dies right away? i just read your post again and im assuming you want to check and see if any of those (opfor and independent) units are inside of the trigger area, you can simply do this and remove the constant trigger condition checks all together with this in initServer.sqf. this checks only when one of the units die and not continually, just a quick little blurp if that makes sense and checks only for the amount of units inside of the trigger area. if you want to change it to all the opfor/independent units across the entire map just remove inAreaArray enemyCountTrigger. enemyCountTrigger being the name of the trigger for this test addMissionEventHandler ["EntityKilled", { params ["_unit", "_killer", "_instigator", "_useEffects"]; _opAndIndiRemaining = count (allUnits select {side _x == east || side _x == independent} inAreaArray enemyCountTrigger); if (_opAndIndiRemaining <= 0) then { "EveryoneWon" call BIS_fnc_endMissionServer; }; }]; if you want to check opfor and independent separately just do this addMissionEventHandler ["EntityKilled", { params ["_unit", "_killer", "_instigator", "_useEffects"]; _IndiRemaining = count (allUnits select {side _x == independent} inAreaArray enemyCountTrigger); _opforRemaining = count (allUnits select {side _x == east} inAreaArray enemyCountTrigger); //do whatever you want with the number of remaining opfor/independent }];
  8. off a glance it looks correct. put it in initServer.sqf
  9. a suggestion, since triggers would be constantly checking the condition, it may be better to check if all opfor/independents are eliminated via a entityKilled event handler so its only going to check each time something dies instead of every like (is it 3ms for triggers?). addMissionEventHandler ["EntityKilled", { params ["_unit", "_killer", "_instigator", "_useEffects"]; _opAndIndiRemaining = count (allUnits select {side _x isEqualTo east || side _x isEqualTo independent}); if (_opAndIndiRemaining <= 0) then { "EveryoneWon" call BIS_fnc_endMissionServer; }; }];
  10. because it needs to know where to create the unit and it needs a position. you can get the position of the trigger if thats what you want? if not you can simply place down some markers and use getMarkerPos "markerName" where you see _pos. i would recommend you simply create a function that you can call for this for simplicity and so you dont have to deal with global variables where they are not needed
  11. group is not a variable. you need to create a group for the unit to be in, such as myGroup = createGroup east; and then use myGroup. same thing with pos, have you defined pos?
  12. in triggers (correct me if im wrong) you cannot use local variables(variables starting with _) so _group and _pos are going to give you errors
  13. use distance. when i was making my weapon/zombie spawner/despawner, i got an array of all the players and all of the weaponholders/zombie units and simply had a control variable that determined if they should be deleted by looping through all of the objects and zombies and players with a nested foreach. so outer foreach loop was for an array of objects and zombies, the inner foreach loop was for players. i would do a check, if the object/zombie was less than 300 meters from the player, dont delete and break out of that foreach to the outter foreach. i have to go real quick but heres a quick example of what i mean { _object = _x; _deleteObject = true; { if (_object distance _x < 300) then { _deleteObject = false; //break out of loop }; } forEach _players; if (_deleteObject) then { deleteVehicle _object; }; } forEach _objects;
  14. when i automated my competition shooting mission, i set the starting time and final time as variables on the timer itself. Set an action or trigger that fires a loop(if you need to see the time displayed continually), or set the start time and end time and subtract them to see the total time(more accurate than a loop timer unless you perform checks every 5 seconds or so to set the time to the proper time). what you could do is set the start time on the timer right as the script starts/trigger activates and start your loop. have a local variable be your current time. every 5 seconds, get the current time with "time" and subtract start time from it, then set your current time varaible to equal it. you can run multiple timers at once but keep in mind a hint will get overwritten with each new hint
  15. it will work in multiplayer, its in the initPlayerLocal, any player that joins the server will get these actions. simply setting damage for the engine isnt enough with the helicopters(afaik) to damage the engine, im not sure what else you need to do though. no i did not, you probably have something removing the actions.
×