Jump to content

falconx1

Member
  • Content Count

    179
  • Joined

  • Last visited

  • Medals

Everything posted by falconx1

  1. falconx1

    [MP/Team] Urban Assault v1.0 Alpha

    recommend downloading the new version updated main post. objective marker bug fixed (important game play) null death messages fixed
  2. falconx1

    [MP/Team] Urban Assault v1.0 Alpha

    Urban Assault v1.04 Beta added. Fixes and changes read the change log above. Original post and download link updated
  3. Hi, I'm trying to make a ANTI-spawn kill / ANTI-team kill script for my "Team Objective" mission and my "coop defense" missions I was hoping you awesome scripter Vets can take a look at my code and offer some input to get it working relatively bug free or working as intended at a minimum :p. Important: Keep in mind that all players are in the same group. West in a group and Independent is in own group Here is what happened on my first test that i noticed.... I left AI on for my first script test since no other players were there to test the script against, and I named the player slots just for testing "C1,C2,C3 etc" and used: C1,C2,C3 etc addMPEventHandler ["mpkilled", {[_this select 0, _this select 1] Spawn playerKilled}]; so then basically me and my AI teammate was base raping west. Then when my AI teammate killed a west AI the script killed me lol It's only supposed to kill the player who either is spawn killing or team killing. Not sure what im doing wrong here. Init.sqf: //////////////////////////////////////////////////////////////////////////////////// SpawnKillMsg = {titleText ["SPAWN KILLING IS NOT ALLOWED!", "BLACK IN",8]; player setDamage 1;}; TeamKillMsg = {titleText ["TEAM KILLING IS NOT ALLOWED!", "BLACK IN",8]; player setDamage 1;}; playerKilled = CompileFinal preprocessFileLineNumbers "playerKilled.sqf"; player addMPEventHandler ["mpkilled", {[_this select 0, _this select 1] Spawn playerKilled}]; //////////////////////////////////////////////////////////////////////////////////// playerkilled.sqf victim = _this select 0; killer = _this select 1; Victim_Faction = side (group victim); // Killer_Faction = side (group killer); // player globalChat format ["%1 was killed by %2", name victim, name killer]; if (victim == killer) exitWith {}; if (Victim_Faction == Killer_Faction) then { [[],"TeamKillMsg",killer,true,false] spawn BIS_fnc_MP; } else { if ( Killer_Faction == independent && ((victim distance getMarkerPos "Respawn_west" < 70) || (victim distance getMarkerPos "respawn_west2" < 70))) then { [[],"SpawnKillMsg",killer,true,false] spawn BIS_fnc_MP; diag_log format ["Victim Faction: %1 Killer Faction: %2", Victim_Faction, Killer_Faction]; }; if ( Killer_Faction == west && ((victim distance getMarkerPos "respawn_guerrila" < 70) || (victim distance getMarkerPos "respawn_guerrila2" < 70))) then { [[],"SpawnKillMsg",killer,true,false] spawn BIS_fnc_MP; diag_log format ["Victim Faction: %1 Killer Faction: %2", Victim_Faction, Killer_Faction]; }; }; diag_log format ["Victim: %1 Killer: %2 Victim Faction: %3 Killer Faction: %4", victim, killer, Victim_Faction, Killer_Faction]; waitUntil {alive player};
  4. if that's all you have to do to use the new tickets system then that's super simple, but i would prolly use a loop instead of a trigger. Description.ext respawnTemplatesWest[] = {"MenuInventory","MenuPosition","Tickets"}; Init.sqf //set tickets [west, 5] call BIS_fnc_respawnTickets; // OR set using? ticketsWest = 5; server.sqf //count remaining tickets as fight goes on EndisNear = true; while {EndisNear} do { ticketNUM = [west] call BIS_fnc_respawnTickets; if (ticketNUM == 0)then { ["End1","BIS_fnc_endMission",west] call BIS_fnc_MP; ["End2","BIS_fnc_endMission",independent] call BIS_fnc_MP; EndisNear = false; }; sleep 10; }; so is this example correct? i will have to test it today or tomorrow
  5. falconx1

    Killed Eventhandler

    i think he can use addEventHandler if its used with BIS_fnc_MP; other wise use addMPEventHandler
  6. falconx1

    Respawn Ticket System?

    The Biki is written in secret code for only the ancient ones with wisdom can understand, the knowledge is hidden, the secret yet to be revealed. Deep within the soul you must search, forever seek the light and forever you will have the answer. The ancient one's once shown me great wisdom, and things unknown to mankind. but i still did not have the answer... http://forums.bistudio.com/showthread.php?159925-anyone-know-how-to-use-the-tickets-system
  7. i want to add each faction to one group, so west is in their own group and independent is in their own group etc. i want to know if im doing this correct first of all. GroupGreen.sqf //--create group for Independent, then have independent players join the group _GroupGreen = Creategroup independent; [g1,g2,g3,g4,g5,g6,g7,g8] joinSilent _GroupGreen; GroupBlue.sqf //--create group for West, then have west players join the group _GroupBlue = Creategroup west; [b1,b2,b3,b4,b5,b6,b7,b8] joinSilent _GroupBlue; each green player in editor is named: g1,g2,g3,g4,g5,g6,g7,g8 each blue player in editor is named: b1,b2,b3,b4,b5,b6,b7,b8 each green players init field: null = [this] execVM "GroupGreen.sqf"; this addeventhandler ["respawn","_this execVM 'GroupGreen.sqf'"]; each blue players init field: null = [this] execVM "GroupBlue.sqf"; this addeventhandler ["respawn","_this execVM 'GroupBlue.sqf'"]; so another question. If I'm adding players to the groups correct etc do you see any bugs in code? like every single player who JIPS or respawns from death will always go into its right team sides group or no?
  8. are they gonna be back in group when they respawn? i still would like to know if i'm doing it right etc, because im trying to learn scripting more too
  9. haha i just noticed i forgot that oops. Exactly what i was looking for thank you for the help guys.
  10. im trying to do certain things in code, for a given side. so i have the object i want to be interactive and im placing this code in the Init field on the object. it doesn't work. Is there a different syntax for init fields? i just want the objective action to popup only when west is near the object and not other team. if {side == west} then { this allowDamage false; this addAction [("<t color=""#FFFF66"">" + ("Secure Objective") + "</t>"),"SecureObjective.sqf",[],1,false,true,"","_this distance _target < 2"]; }; else { //also do i have to do another side check here? for other team? this allowDamage false; };
  11. I was wondering why the functions view has been changed the other one pre latest beta update was better. You used to be able to easily dump code out into files for later inspection, the highlight scrolled up and down all the way etc. is there anyway i can use the old one again?
  12. anyone know if it works yet? or should i try to create my own ticket system ?
  13. will something like this work? i'm not sure AddGear = True; while {true} do { //<------------- spawn your dudes here removeallweapons _x; removeallassigneditems _x; removeallcontainers _x; _x addUniform "U_B_CombatUniform_mcam_tshirt"; _x addbackpack "B_Kitbag_Base"; _x addvest "V_PlateCarrierIA1_dgtl"; _x addheadgear "H_Watchcap_blk"; _x addmagazines ["30Rnd_556x45_Stanag", 8]; _x addmagazines ["UGL_FlareCIR_F",3]; _x addweapon "arifle_Mk20_GL_F"; _x addMagazines ["HandGrenade", 2]; _x addweapon "ItemCompass"; _x addweapon "ItemGPS"; _x addweapon "ItemMap"; _x addweapon "ItemRadio"; _x addweapon "ItemWatch"; _x addItem "FirstAidKit"; _x addPrimaryWeaponItem "optic_ACO_grn"; _x addPrimaryWeaponItem "acc_pointer_IR"; _x addMagazines ["9Rnd_45ACP_Mag", 4]; _x addweapon "hgun_ACPC2_F"; _x addweapon "Binocular"; _x assignItem "Binocular"; _x addItem "NVGoggles"; _x assignItem "NVGoggles"; AddGear = False; //gear added is done exit loop }; ofcourse add your correct weapons to it etc
  14. falconx1

    make ai vehicle respawn

    :notworthy: kylania
  15. falconx1

    make ai vehicle respawn

    ur prolly gonna want to use event handlers. i tried to do it for you but it only respawns once. maybe someone will clean this code up and fix it for you so vehicles always respawn. vehicles Init field in the editor: null = [this] execVM "VehicleRespawn.sqf"; VehicleRespawn.sqf _car = _this select 0; VehicleSpawner = "yourmarker"; //vehicle spawn marker VehicleKilled = CompileFinal preprocessFileLineNumbers "VRespawn.sqf"; _car addEventHandler ["killed", {[_this select 0] Spawn VehicleKilled}]; VRespawn.sqf ExecVM "VehicleRespawn.sqf"; _car = [markerPos VehicleSpawner, WEST, ["B_MRAP_01_hmg_F"], [], [], [0.25, 0.25]] call BIS_fnc_spawnGroup;
  16. falconx1

    Dialog Doesn't Appear

    u can edit the dialog i made or look at it or do what ever you want with it http://www.filedropper.com/visualoptions just create a demo mission with just a mission.sqm then drop all them files in there.
  17. falconx1

    Dialog Doesn't Appear

    im not certain but don't u need the controls class? try using all this code for your dialogs.hpp #include "defines.hpp" class CQB_DIALOG { idd=-1 movingenable = true; enableSimulation = true; controlsbackground[] = { }; objects[] = { }; controls[] = { CQB_FRAME, CQB_B1, CQB_B2, CQB_B3, CQB_B4, CQB_B5 }; class Controls { class RscFrame { idc = 1801; text = "CQB Facility"; //--- ToDo: Localize; w = 10 * GUI_GRID_W; h = 13 * GUI_GRID_H; sizeEx = 1.25 * GUI_GRID_H; type = CT_STATIC; // constant style = ST_LEFT; // constant font = FontM; colorBackground[] = { 1, 1, 1, 0.3 }; colorText[] = { 0, 0, 0, 1 }; color[] = { 1, 1, 1, 1 }; colorActive[] = { 1, 0.2, 0.2, 1 }; }; class RscButton { idc = 1601; text = "Layout #1"; //--- ToDo: Localize; w = 7 * GUI_GRID_W; h = 1 * GUI_GRID_H; sizeEx = 1.25 * GUI_GRID_H; type = CT_STATIC; // constant style = ST_LEFT; // constant font = FontM; colorText[] = {1,1,1,.9}; colorDisabled[] = {0.4,0.4,0.4,0}; colorBackground[] = {0.75,0.75,0.75,0.8}; colorBackgroundDisabled[] = {0,0.0,0}; colorBackgroundActive[] = {0.75,0.75,0.75,1}; colorFocused[] = {0.75,0.75,0.75,.5}; colorShadow[] = {0.023529,0,0.0313725,1}; colorBorder[] = {0.023529,0,0.0313725,1}; }; class CQB_FRAME: RscFrame { text = "CQB Facility"; //--- ToDo: Localize; x = 2 * GUI_GRID_W + GUI_GRID_X; y = 4 * GUI_GRID_H + GUI_GRID_Y; }; class CQB_B1: RscButton { text = "Layout #1"; //--- ToDo: Localize; x = 3.5 * GUI_GRID_W + GUI_GRID_X; y = 6 * GUI_GRID_H + GUI_GRID_Y; }; class CQB_B2: RscButton { text = "Layout #2"; //--- ToDo: Localize; x = 3.5 * GUI_GRID_W + GUI_GRID_X; y = 8 * GUI_GRID_H + GUI_GRID_Y; }; class CQB_B3: RscButton { text = "Layout #3"; //--- ToDo: Localize; x = 3.5 * GUI_GRID_W + GUI_GRID_X; y = 10 * GUI_GRID_H + GUI_GRID_Y; }; class CQB_B4: RscButton { text = "Layout #4"; //--- ToDo: Localize; x = 3.5 * GUI_GRID_W + GUI_GRID_X; y = 12 * GUI_GRID_H + GUI_GRID_Y; }; class CQB_B5: RscButton { text = "Layout #5"; //--- ToDo: Localize; x = 3.5 * GUI_GRID_W + GUI_GRID_X; y = 14 * GUI_GRID_H + GUI_GRID_Y; }; }; }; Edit: if it crashes try to remove your controls array
  18. I've dumped out a lot of east configfile too:
  19. i do agree and Ive been to about every site u can think of for help. I think a big part of it is having a lot of code examples help not just 2 or 3. most of the examples on the wiki dont fit my criteria. of how im trying to do code something. for me it makes progression slow down.
  20. while {true} do { //marker vehicles spawn at VehicleSpawner = "yourmarker"; //_grp1 = createGroup east; //you actually dont need this line of code _grp1 = [markerPos VehicleSpawner, EAST, ["O_MRAP_02_hmg_F"], [], [], [0.25, 0.25]] call BIS_fnc_spawnGroup; sleep 5; }; every few seconds a vehicle with crew will spawn at a marker u made inside the editor. so open the editor and make a marker and name the marker "yourmarker" and make a file called init.sqf in your mission directory and place the code above
  21. untested but try this: //make a marker called "Attck" it's going to be the marker where ai is going to attack AttackLocation = getMarkerPos "Attck"; //---Loop forever while {true} do { // wat side to count? west east? spawn more AI when all east units dead waitUntil {({(side _x) == east} count allUnits) == 0}; //marker east vehocles spawn at VehicleSpawner = "yourmarker"; _grp1 = createGroup east; _grp1 = [markerPos VehicleSpawner, EAST, ["O_MRAP_02_hmg_F"], [], [], [0.25, 0.25]] call BIS_fnc_spawnGroup; _wp0 = _grp1 addWaypoint [AttackLocation,0]; _wp0 setWaypointType "SAD"; _wp0 setWaypointFormation "LINE"; _wp0 setWaypointBehaviour "AWARE"; _wp0 setwaypointcombatmode "YELLOW"; _wp0 setWaypointSpeed "NORMAL"; sleep 5; };
  22. i like that method you posted, i adapted it. but i would like to use the variable to SetSkill. based on the skill level param. Can someone please download my mission and take a look at it for me? . the AI are still godlike. i have no idea why they are still elite AI. the Skill var is set in init.sqf and i believe is legit. I really want to finish this mission. but im reluctant to finish it if the AI can't be set properly. Run your dedicated server leave the start location PARAM on kamino since i havn't got the other AI code added ATM . http://www.filedropper.com/firefight-beta-v1stratis_1 Be sure to host the mission on veteran mode files of interest: Functions_AI.sqf AI_4X_Infantry_Kamino.sqf server.sqf Init.sqf Parameters.hpp
  23. Works in preview test and i think LAN but definitely, absolutely not in dedicated the scripts are set up as follows. Init.sqf code: if (isServer) then {ExecVM "server.sqf"}; then server.sqf code: {ExecVM "AI_4X_Infantry_Camp_Tempest.sqf";}; //which contains RandomDirection = ["Camp Tempest1","Camp Tempest2","Camp Tempest3","Camp Tempest4","Camp Tempest5","Camp Tempest6","Camp Tempest7","Camp Tempest8"] select floor(random 8); _grp1 = createGroup east; _grp1 = [markerPos RandomDirection, EAST, ["O_Soldier_F", "O_Soldier_GL_F", "O_Soldier_AR_F"], [], [], [0.10, 0.10]] call BIS_fnc_spawnGroup; //or 0.25 -1 { _x allowFleeing 0} forEach units _grp1; _wp0 = _grp1 addWaypoint [AttackMarkerLocation,0]; _wp0 setWaypointType "SAD"; _wp0 setWaypointFormation "LINE"; _wp0 setWaypointBehaviour "AWARE"; _wp0 setwaypointcombatmode "YELLOW"; _wp0 setWaypointSpeed "NORMAL"; Would really appreciate help on getting AI SKill adjusted for Dedicated play. Sick of being head shot every time on AI SKill 0.25 and lower. I know for a fact its not setting the skill right
  24. http://community.bistudio.com/wiki/setUnitAbility it appears to be ignored when i set range to 0.25 - 0.30 or 0.25 - 0.25 which would just set it at 0.25 but is ignored as i can tell would hate to have to mod all the AI Code.. the way im doing it, is much cleaner if it would freaking work on dedicated :( i could be implementing the code wrong that's why i posted how it's being ran script wise in the first post above Edit: I was just testing all this again with various methods to set skill of the AI. i used the one above that wildfireposted , and it don't work: the reason i believe is because during mission selection if veteran mode was chosen, this is over writing server side Scripted AI Setskill. can someone confirm this is correct? if that's the case i think it should be changed because i only load missions on veteran mode just to get rid of the unit/player markers. not to play against godlike AI !!! here is the tested code: let me know if u think it's incorrect
  25. i prefer to have my condition satisfied, but yea i didn't know this either
×