Jump to content

Vegatry

Member
  • Content Count

    55
  • Joined

  • Last visited

  • Medals

Everything posted by Vegatry

  1. It can, using technique such as spawning units via trigger, disable units simulation and etc. For MP, Headless Client could support up to the scale of hundred AI without overloading the server FPS.
  2. Goal: How do I check if BIS_fnc_Unitplay was finished so I could execute codes such as bail out the AIs or deleteVehicle and etc.. Questions/Addition infos Or does it automatically detect if its was finished and jump to the next line of codes? I unPBO the official showcase "Commanding" and founded following code in its initMission.hpp file, but it still seem to be confusing to me... Anyone help me slove the puzzle? I tried with ["my helo name", "finished"] on its third parameter just as how BIS did, but doesn't work. _data = call compile preprocessFileLineNumbers "Littlebird.sqf"; If (!([] call BIS_fnc_isCampaign)) Then {[bIS_Littlebird, _data, [bIS_Littlebird, "finished"], false, false, 0, 40] spawn BIS_fnc_unitPlay} Else { BIS_Littlebird disableAI "anim"; BIS_player action ["Eject", BIS_Littlebird]; unassignVehicle BIS_A1; [bIS_A1] orderGetIn false; BIS_A1 action ["Eject",BIS_Littlebird]; BIS_player setPos [2147.14,1877.83,0.00130177]; BIS_player setDir 320; BIS_A1 setDir 320; BIS_A1 setPos [2152.7,1879.28,0.00130939]; BIS_Littlebird setPos [(getPos BIS_Helipad select 0), (getPos BIS_Helipad select 1), 0.25]; BIS_Littlebird setDir 210; "BIS_mrkStart" setMarkerPos (getPos BIS_helipad); };
  3. Well its a nay, the scripts continues after the function. Which my poor little character eject from the heli high from 100m and splash on the ground...looks pretty dead.
  4. Is there any command, eventhandler, or functions that detect specific units/groups, or simply player is in combat?
  5. Thanks mate, just saved my day digging in the wiki.(Didn't find what I want while searching it previously.) ;)
  6. Intention: The purpose was I want the AI used for creating an ambient basement hidden when a checking trigger is activated to increas frame rates. (I want to save them for later use which deleteVehicle is not an option) May anyone help me debug it a bit, or any ideas to reproduce the script? (Example mission would be the best) Many thanks. Update: The error is known caused by the false usage of switch-case. The following script is my first attempts, which is pretty shitty and unshaped. As I expected, it failed to work :butbut: Its activated via trigger's onAct on Act = nul = ["dum1"] execVM "AIcache.sqf"; AIcache.sqf: _dummygroup1 = [dummy1, dummy2,dummy3,dummy4,dummy5,dummy6,dummy7,dummy8,dummy9,dummy10,dummy11,dummy12,dummy13,dummy14,dummy15,dummy16,dummy17,dummy18,dummy19,dummy20,dummy21,dummy22,dummy23,dummy24,dummy25,dummy26,dummy27,dummy28,dummy29]; _dummygroup2 = [dummy30,dummy31,dummy32,dummy34]; _typeOfDummy = toLower (_this select 0); switch(_typeOfDummy) do { case "dum1" { { _x enableSimulation false; _x hideObject true; } forEach _dummygroup1; }; case "dum2" { { _x enableSimulation false; _x hideObject true; } forEach _dummygroup2; }; }
  7. :o Cheers mate, just notice what a foolish errors I had made.
  8. Vegatry

    Goggle trouble

    Just as Rocksteady said { if(side _x == civilian) then { removeGoggles _x; }; } foreach (allUnits);
  9. Does Unit capture 'capture' any usage of weapon? (Such as firing a missile) Or does it simply track target's movement only. :confused:
  10. Vegatry

    Looking for a partner

    Perhaps taking a look on F3 Folk Framework, its very easy to use for MP scenarios designing [url]http://ferstaberinde.com/f3/en//index.php?title=Main_Page[/url]
  11. good job to Wolfenswan! Finally AI caching is here!
  12. Vegatry

    Random civ headgear

    removeheadgear this; If you are using an array, replace "this" by the array you're using. Let's say _unit this select 0; you just need to change it to removeheadgear _unit;
  13. My original intents was make a heat signature script that keeps track all the existing units (not static object). If they exist, puts a marker (such as a mildot) there. After 90 sec or certain amount of time pass, the marker will update and 'teleport' to a new position. How could I get an array from all those units on the map? Even if I don't give them a name. Let's say only Blufor could see the heat signature, I had made a few headstart (very shitty scripted though): heat_blue.sqf private ["_faction","_unit"]; _unit = _this select 0; _faction = toLower (faction _unit); if (_faction == "BLU_F") then { #include "heat.sqf" }; heat.sqf: //Here's what beyond my knowledge, getting an array from all units.. _blah = blahblahblah //something that get those array _faction = toLower (faction _unit); if ((_faction == "BLU_F")&&(_blah != "")) then { _mkr = createMarkerLocal ["marker1", getMarkerPos _blah]; _mkr setMarkerShapeLocal "ICON"; _mkr setMarkerTypeLocal "mil_dot"; _mkr setMarkerSizeLocal [1,1]; _mkr setMarkerColorLocal "Colorred"; }; //and when 90 second had pass, the marker1 'refresh' its position. cheers :D,
  14. ;) thanks...never thought it would be that easy.. May I ask another question about making a timer? So It could refresh the marker every certain amount of time?
  15. After player disconnected the game, the unit he controlled will be 'wiped out' and the slot would disappear. So how do I spawn a new unit that's visible in the game lobby with same "init" as the previous one? Any sample mission? (Like VTS style, you disconnect, you rejoin, the unit slot is still there.) pseudo code: /*Check if player still alive If player was killed, check faction Spawn a new unit at somewhere Run a JIP script when player join. Teleport to their own base. */ Did I get my ideas right? Or it was completely false. I uses 'Group' respawn due to 'None'/'Bird' doesn't support JIP while all playable AI is disabled.
  16. :confused: It doesn't work as suspected, I just uploaded my sample mission.
  17. Could anyone help me debug / improve belowed scripts? Many thanks ;) repairman.sqf was executed on two engineers (opfor & indep) placed in editor via nul = [this] execVM "repairman.sqf"; and ammo1 is just an ammo truck. repairman.sqf: _repairman = _this select 0; _dmg = getdammage ammo1; if(side player == opfor ||{side player == independent}) then { waitUntil {_repairman distances ammo1 <= 2}; if (_dmg > 0.4) then { _repairman addaction ["Repair", "repair.sqf"]; }; }; And here is: repair.sqf: _repairRate = 0; _dmg = getdammage ammo1; repairman switchmove "Acts_TreatingWounded05"; //Then I want to make a loop that slowly regenerate "ammo1" back to full health ...but how should I do it? if (_dmg = 0) exitWith {}; :confused: My testing mission sample : https://www.dropbox.com/s/cmk8mje99mrfb6t/repairman.sqf https://www.dropbox.com/s/hp10ml6o3uryfmm/repair.sqf https://www.dropbox.com/s/mqfhpeg6m7mqbwu/mission.sqm
  18. I uses respawn = 1; //bird (spectator) respawndelay = 5; respawndialog = 0; as I perfer "hardcore" style gameplay, but then I realized that any JIP player will auto assign to spectator mode and have to wait till next match. [it's usually long mission and our clan member have an unstable participate time, thus some member have connection issue. ] I don't have a dedicated server to test on now, but I want to know if respawn = 0; //none will do the trick for me. or should I start getting my hand dirty on event handler, initJIPcompatible, and etc?
  19. will give it a shot. ;) cheers ---------- Post added at 07:12 ---------- Previous post was at 05:43 ---------- :rolleyes: Another few questions, does "side" respawn behaved similar with “group"? What's their major different impact on JIP player? [additional information: AI is disabled.] The wiki says: 4 "GROUP" Respawn to the next available playable unit in a group. When none is left, BIRD respawn is used instead. 5 "SIDE" Respawn to the next available playable unit of the same side (selected using team switch window). When none is left, BIRD respawn is used instead.
  20. I just comes up an idea where a mp mission involve in 3 sides, which Opfor and independent wants to meet in a randomly generated marker in a specific area, while Blufor have no idea where they meets and have to search for them. So how do I make the marker only visible to East and IND? I also wants this marker visible to any player JIP. I make a little head start, then I went clueless on what should I do next... If (!IsDedicated) Then { MkrJIP = { private ["_mkr1", "_mkr2", "_mkr3"]; //three position I want to randomized it }; };
  21. You could also try F3 Folks framework, it had some easy to go fire team marker http://ferstaberinde.com/f3/en//index.php?title=Main_Page.
×