Jump to content

Charles Darwin

Member
  • Content Count

    133
  • Joined

  • Last visited

  • Medals

Posts posted by Charles Darwin


  1. Ok so trying to randomly select a player unit inside a trigger and execute a small bit of code.

    in the init:

    [] execVM "spy.sqf";

    spy.sqf:

    if (isserver) then{
    _triglist = list triggerone;
    _count = count _triglist;
    _num = round(random _count);
    _spy = _triglist select _num;
    };
    hint format["%1 is a spy!", _spy];
    _spy setvehiclevarName "spy";

    code to be executed:

    if("spy" == vehiclevarName player)then{bugaction = CO addAction ["Bug Commander", "bug.sqf"]; ["You are the Spy!"] spawn BIS_fnc_infoText; sleep 7;["Plant the GPS Bug","on your Commander!"] spawn BIS_fnc_infoText;};
    _index = spy addMPEventHandler ["mprespawn", {bugaction = CO addAction ["Bug Commander", "bug.sqf"];}]; 

    but it doesnt seem to find anyone in the trigger area as it always says null or any is spy


  2. // if the array is empty, anybody can fly,
    // just add the string name of the playable units that can fly, for example:
    // for example: ["pilot_1","pilot_2"];, case sensitiv
    // this includes bonus aircrafts too
    GVAR(only_pilots_can_fly) = ["pilot_1"];
    
    GVAR(current_mission_text) = "";
    GVAR(current_mission_resolved_text) = "";
    

    pilot variable name is pilot_1 also tried with the classname pulled directly from mission.sqm

    				class Item0
    			{
    				position[]={8258.834,296.04001,2144.3391};
    				azimut=-110.771;
    				special="NONE";
    				id=144;
    				side="WEST";
    				vehicle="US_Soldier_Pilot_EP1";
    				player="PLAY CDG";
    				leader=1;
    				skill=0.2;
    				text="pilot_1";
    				init="this setGroupid [""Flight Wing""];";
    				description="Flight Wing Leader";
    

    on the names after checking some of the names do work..but it seems there is a limit to how many names can be displayed at once? it displays about the first 30 to 40 names and then doesnt display anymore


  3. ok heres two more problems lol

    Some how I broke the blue floating names over players heads, even with show play names enabled they don't show up.

    also in the only pilots can fly array in i_client no matter what I put in there it kicks everyone out, i have tried

    "pilot_1","pilot_2" etc

    and also

    "US_Soldier_Pilot_EP1"

    only difference is when i use "US_Soldier_Pilot_EP1" i get a hint saying only pilots can fly


  4. #ifndef __TT__
    GVAR(player_entities) =  switch (true) do {
    case (__OAVer): {
    	["co_1","co_2","co_3","co_4","co_5","co_6","alpha_1","alpha_2","alpha_3","alpha_4","alpha_5","alpha_6","alpha_7","alpha_8","alpha_9","alpha_10","alpha_11","alpha_12","alpha_13","bravo_1","bravo_2","bravo_3","bravo_4","bravo_5","bravo_6","bravo_7","bravo_8","bravo_9","bravo_10","bravo_11","bravo_12","bravo_13","charlie_1","charlie_2","charlie_3","charlie_4","charlie_5","charlie_6","charlie_7","charlie_8","charlie_9","charlie_10","charlie_11","charlie_12","charlie_13","hwep_1","hwep_2","hwep_3","hwep_4","tanker_1",tanker_2","tanker_3","tanker_5","tanker_6","tanker_7","tanker_8","tanker_9","tanker_10","tanker_11","tanker_12","pilot_1","pilot_2","pilot_3","pilot_4","pilot_5","pilot_6","sf_1","sf_2","sf_3","sf_4"]
    };
    case (__ACEVer): {
    	["co_1","co_2","co_3","co_4","co_5","co_6","alpha_1","alpha_2","alpha_3","alpha_4","alpha_5","alpha_6","alpha_7","alpha_8","alpha_9","alpha_10","alpha_11","alpha_12","alpha_13","bravo_1","bravo_2","bravo_3","bravo_4","bravo_5","bravo_6","bravo_7","bravo_8","bravo_9","bravo_10","bravo_11","bravo_12","bravo_13","charlie_1","charlie_2","charlie_3","charlie_4","charlie_5","charlie_6","charlie_7","charlie_8","charlie_9","charlie_10","charlie_11","charlie_12","charlie_13","hwep_1","hwep_2","hwep_3","hwep_4","tanker_1",tanker_2","tanker_3","tanker_5","tanker_6","tanker_7","tanker_8","tanker_9","tanker_10","tanker_11","tanker_12","pilot_1","pilot_2","pilot_3","pilot_4","pilot_5","pilot_6","sf_1","sf_2","sf_3","sf_4"]
    };
    case (__COVer): {
    	["co_1","co_2","co_3","co_4","co_5","co_6","alpha_1","alpha_2","alpha_3","alpha_4","alpha_5","alpha_6","alpha_7","alpha_8","alpha_9","alpha_10","alpha_11","alpha_12","alpha_13","bravo_1","bravo_2","bravo_3","bravo_4","bravo_5","bravo_6","bravo_7","bravo_8","bravo_9","bravo_10","bravo_11","bravo_12","bravo_13","charlie_1","charlie_2","charlie_3","charlie_4","charlie_5","charlie_6","charlie_7","charlie_8","charlie_9","charlie_10","charlie_11","charlie_12","charlie_13","hwep_1","hwep_2","hwep_3","hwep_4","tanker_1",tanker_2","tanker_3","tanker_5","tanker_6","tanker_7","tanker_8","tanker_9","tanker_10","tanker_11","tanker_12","pilot_1","pilot_2","pilot_3","pilot_4","pilot_5","pilot_6","sf_1","sf_2","sf_3","sf_4"]
    };


  5. ok have been pulling my hair out over this one for some time now, I am sure its a simple fix but one I cant seem to find.

    I took the latest version of domi 2.6 and added more playable units, i gave each one a variable name and changed the number of players in the x_setup. i also added the unit variable names to the appropriate lists in the i_common.

    Problem is, When I load the game it acts as if the init is broken, it doesnt hide the black area markers nor create any of the dynamic ones, nor create the ammo box etc.

    I have traced it down to the i_common and the only thing i changed in there is the variable name list for players.

    heres the rpt

    This one with an unedited i_common:

    "############################# Alpha_Tactical_Domination[V1] #############################"

    [27681,860.433,0,"Executing Dom init.sqf"]

    [27681,860.434,0,"Dom init.sqf processed"]

    [27682,860.514,0,"Executing Dom d_init.sqf"]

    [27682,860.973,0,"Dom d_init.sqf processed"]

    [27827,868.931,0,"XEH: PostInit Started"]

    [27827,868.97,0,"CBA_VERSIONING",["#CBA_HASH#",["cba"],[[[0,7,6,160],-1]],[[0,0,0],0]]]

    [27827,869.217,0,"XEH: PostInit Finished; [true,false,false,true,false,true,false,true,true,true]"]

    this one with the edited i_common:

    "############################# Alpha_Tactical_Domination[V1] #############################"

    [115557,36454.6,0,"Executing Dom init.sqf"]

    [115557,36454.6,0,"Dom init.sqf processed"]

    [115566,36455.1,0,"XEH: PostInit Started"]

    [115566,36455.2,0,"CBA_VERSIONING",["#CBA_HASH#",["cba"],[[[0,7,6,160],-1]],[[0,0,0],0]]]

    [115566,36455.2,0,"XEH: PostInit Finished; [true,false,false,true,false,true,false,true,true,true]"]

    and the new lines in the i_common are:

    ["co_1","co_2","co_3","co_4","co_5","co_6","alpha_1","alpha_2","alpha_3","alpha_4","alpha_5","alpha_6","alpha_7","alpha_8","alpha_9","alpha_10","alpha_11","alpha_12","alpha_13","bravo_1","bravo_2","bravo_3","bravo_4","bravo_5","bravo_6","bravo_7","bravo_8","bravo_9","bravo_10","bravo_11","bravo_12","bravo_13","charlie_1","charlie_2","charlie_3","charlie_4","charlie_5","charlie_6","charlie_7","charlie_8","charlie_9","charlie_10","charlie_11","charlie_12","charlie_13","hwep_1","hwep_2","hwep_3","hwep_4","tanker_1",tanker_2","tanker_3","tanker_5","tanker_6","tanker_7","tanker_8","tanker_9","tanker_10","tanker_11","tanker_12","pilot_1","pilot_2","pilot_3","pilot_4","pilot_5","pilot_6","sf_1","sf_2","sf_3","sf_4"]


  6. Ok so I have an idea for a script but I am not sure it would work so before I spend much time trying to figure it out thought I would ask for advice and any helpful info

    Basic Premise: In the event a player a player dies, his body must be retrieved and taken to a base hospital. When his body is taken to the base the body disappears and he is respawned.

    Basic Idea for Implementation:

    --------- add event handler to all players that when killed adds them to "deadarray"

    --------- All players will respawn in a locked hangar far from mission. any players not in "deadarray" will be moved to the base hospital

    --------- Players can interact with dead body when within so many meters of the hospital activating a script added to the corpse via event handler that will move the player associated with that corpse and ONLY the player associated with that corpse to the base hospital

    so question is mainly if you were scripting this how would you tackle it? and how would you associate a specific corps with a specific player? My best guess would be an array like ["Mycorpse", "playername"] but this seems a very ugly way to do it and Im sure there is a more elegant way

×