Jump to content

nebulazerz

Member
  • Content Count

    128
  • Joined

  • Last visited

  • Medals

Community Reputation

14 Good

About nebulazerz

  • Rank
    Sergeant

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks, Ill try this out in my bubble effect instead of using allowDamage false. I plan on making a sort of tank class if you buy the armor from the shop that gives you the skill. I could even make different variations of damage reduction. Is there a way to make this effect everyone inside a certain area? would be cool to have players follow the tank class around and stay inside his defense bubble to take less damage while advancing the enemy. I have decided using this in level rewards though is a bad idea because it would bring a lot of balance issues for new players. But I am also thinking about creating a deployable Item that is on a time limit and creates a defense shield where you take less damage inside. Here is my bubble effect currently, its activated by putting on a certain type of clothing. fnc_bubEffect = { params[ "_objNetID" ]; _unit = objectFromNetId _objNetID; _unit setVariable[ "bubEffect", true ]; //local object variable if ( local _unit ) then { _unit allowDamage false; //AL and EG }; _unit setAnimSpeedCoef 2;//Unsure of locality needs testing _unit switchMove "AmovPercMstpSnonWnonDnon_EaseIn"; //AG and EL _unit setAnimSpeedCoef 0; //Unsure of locality needs testing while ( _unit getVariable[ "bubEffect", false ] ) do { drop [ //EL ["\A3\data_f\ParticleEffects\Universal\Universal",16,13,7,0],"","BillBoard", 1,1,[0,0.25,1],[0,0,0], random pi*2,1.277,1,0, [3], [[1,0,0,.5],[1,0,0,.5]], [10000], 0,0,"","", _unit,0, false,-1 ]; playSound "electricshock"; //EL _unit switchMove "AmovPercMstpSnonWnonDnon_Ease"; //AG and EL sleep 0.25; //This is the equivilent of you action per tick 6/24 = 0.25 seconds }; }; _skillE = [ player, // 0 object "Bubble", // 1 action title "images\blinkicon.paa", // 2 idle icon "images\blinkicon.paa", // 3 progress icon "player getvariable [ 'Bubble', false ]", // 4 condition to show "true", // 5 condition for action // 6 code executed on start { //Create a unique name for the jip queue [ netId player ] remoteExec [ "fnc_bubEffect", 0, format[ "%1_bub", netId player ] ]; }, // 7 code executed per ACTION tick ( Range 0 - 24 ), tick duration = action duration / MAX tick 24 {}, // 8 code executed on completion { //No JIP [ netId player ] remoteExec [ "fnc_bubFinish", 0 ]; //Remove start from JIP queue remoteExec [ "", format[ "%1_bub", netId player ] ] }, // 9 code executed on interruption { //No JIP [ netId player ] remoteExec [ "fnc_bubFinish", 0 ]; //Remove start from JIP queue remoteExec [ "", format[ "%1_bub", netId player ] ] }, [], // 10 arguments 6, // 11 action duration 0, // 12 priority false, // 13 remove on completion false // 14 show unconscious ] call BIS_fnc_holdActionAdd;
  2. Holy crap, thanks... never thought to Cntrl + F "handledamage". Looks like i started experimenting with damage reduction and forgot about it -_- Found this in my function library (in a level reward script) player addeventhandler ["HandleDamage",{(_this select 2) / 10;} ];
  3. I am still having this issue, I cant find anything in my code that would cause this to happen. Has anyone else had this happen?
  4. So then i should write my own respawn system or use one from the community and it should fix the problem? I will start with trying that. Edit: I am trying to use respawn= 0; now with the onPlayerKilled but it takes me right to the death screen. Is there something specific I need to put in that EH file to stop it from ending the game? this is what I am currently trying in there. // Set Respawn Pos switch (side player) do { case west: { _posRandom = ["respawn_west1","respawn_west2"] call bis_fnc_selectRandom; _position = getMarkerPos _posRandom vectorAdd [0,0,400]; [_position] call neb_fnc_core_setStartingPos; }; case east: { _posRandom = ["respawn_east1","respawn_east2"] call bis_fnc_selectRandom; _position = getMarkerPos _posRandom vectorAdd [0,0,400]; [_position] call neb_fnc_core_setStartingPos; }; }; The function just makes sure that the player respawns correctly by checking in a loop until they are spawned. Edit 2: Using respawn= 3; with the above seems to fix the problem. thanks for the help. Edit 3: Nevermind, it seems I can kill myself with a grenade but cannot die any other way. Still working on a solution. Edit 4: I have recorded a video of the bug in action. You can see the health bar jumping as if I am taking damage but everytime I take new damage it resets my health to 100% then gives me the new damage. Seems it could be something with one of my eventhandlers.
  5. Hi, I have been away from arma coding for about 6 months to take some classes and I am picking back up on a mission I almost had finished when i left it. I have one major issue that I cannot seem to fix where I can die the first time I spawn in the mission, but I am invincible when I respawn. Any player that joins is invincible from the start. I have been digging through my code all morning but I cant find any line that would change damage after death. Anyone have any ideas on what could be happening here? Its been a little bit so I am kind of rusty at coding but its all coming back to me as I look it over, just not certain about some specifics. Could it be this is my description.ext? respawn = 3; respawnOnStart = -1;
  6. Contact me if you are interested in a demo run of the mission in its current form Steam: Nebulazer
  7. nebulazerz

    Invisible Players and JIP setPos

    I have fixed the JIP issue for setPos, but players are still invisible from eachother. Any ideas why? Here is the function that fixed my spawning issue, I found it in an older thread. EDIT: fixed the invisible players by never hiding the units in the first place, instead i burried them 100M under the map :D EDIT2: seems this is still not perfect, it more often than not drops any player that JIP from 2000m instead of 400... which i just dont get. EDIT3: added more sleeps and it fixed it, guess it needed to "load" waitUntil { !isNull player && time > 0 }; //after briefing //Define UI ctrls #define UIlevel 1000 #define UIprogress 1001 #define UIprogressBar 1002 #define UIcash 1003 #define UIkills 1004 #define UIredScore 1005 #define UIbluScore 1006 #define UIbluBar 1007 #define UIredBar 1008 #define UIendScore 1009 #define UIhealthBar 1010 #define UIhealthIcon 1011 #define UIdisplayFPS 1012 titleCut ["", "BLACK FADED", 999]; sleep 1; // Set Starting Pos switch (side player) do { case west: { _position = [2938.69,13107.5,400]; [_position] call neb_fnc_core_setStartingPos; playSound "airplanes"; }; case east: { _position = [2695.89,12334.4,400]; [_position] call neb_fnc_core_setStartingPos; playSound "airplanes"; }; default {_position = [0,0,0];}; }; titlecut [" ","BLACK IN",5]; neb_fnc_core_setStartingPos = { params ["_position"]; player setPos _position; // _position diag_log format["setting player's position to: %1", _position]; sleep 1; _real_player_pos = getPos player; diag_log format["position that has been set: %1", _real_player_pos]; _tries = 0; sleep 1; while {abs(abs(_real_player_pos select 0) - abs(_position select 0)) > 10 or abs(abs(_real_player_pos select 1) - abs(_position select 1)) > 10} do { diag_log format["player pos is %1 which is not target pos %2. retrying...", _real_player_pos, _position]; hint format["position wasn't set correctly; trying again... %1", _tries]; sleep 1; _tries = _tries +1; player setPos _position; sleep 1; _real_player_pos = getPos player; diag_log format["player pos is %1 which is not target pos %2. retrying...", _real_player_pos, _position]; }; };
  8. Awesome, It all works from just my machine now. I cant test it JIP yet because I am having some issues still with players not getting setPos and hideObject false, but i trust that it works JIP and ill be testing it later today hopefully when i find a fix to the other JIP issues I am having. Is this a good way to check for the action instead of removing and adding it? Seems to work on my end but not sure if there are any multiplayer issues with this. if (isNil "BluActionSpawnTruckCheck") then { [ BluTeleScreen, "BluSpawnTruck" ] remoteExec ["neb_fnc_core_teleToTruck", 0, "BluTruckJIP" ]; BluActionSpawnTruckCheck = true; };
  9. I am having trouble getting players to spawn in correctly, I have the units boxed all checked so they are pretty much not on the map until a player takes them over but this seems to be causing some issues. Also, I cant get setPos to work with JIP, it always puts players in the place where I have the units placed on spawn if they join after the game has started. Here is the top of my initPlayerLocal.sqf waitUntil { !isNull player && time > 0 }; //after briefing //Define UI ctrls #define UIlevel 1000 #define UIprogress 1001 #define UIprogressBar 1002 #define UIcash 1003 #define UIkills 1004 #define UIredScore 1005 #define UIbluScore 1006 #define UIbluBar 1007 #define UIredBar 1008 #define UIendScore 1009 #define UIhealthBar 1010 #define UIhealthIcon 1011 #define UIdisplayFPS 1012 player allowDamage true; player enableSimulation true; player enableStamina false; player hideObject false; player hideObjectGlobal false; enableSentences false; // Set Starting Pos switch (side player) do { case west: { player setPos [2938.69,13107.5,400]; //playSound "airplanes"; }; case east: { player setPos [2695.89,12334.4,400]; //playSound "airplanes"; }; default {player setPos [0,0,0];}; };
  10. School will be starting again in a few days for me and i wont have as much time as I would like to work on my multiplayer mission I have been working on for the past month or so called 'Base Wars'. It is a SC/MOBA style game with 64 players persistant levels/money/stats. There are shops with level restrictions and costs already in place. There are AI that act the same as 'Creeps' or 'Jungle' in MOBA games (the plan is to stop them from spawning after certain number of players are in the game). The mission is nearly finished, the whole core gameplay element is already there and it is a fully functioning game that works on dedicated. The majority of what is left to do is small feature adding and bug testing/fixing. Thanks, Nebulazer
  11. I have this working now, there are some things that are nice about the profileNamespace such as the ability to carry your level over to multiple servers without a database. Im pretty sure this is how the guys who did KOTH do it, they must have some kind of check to see if you have manually edited the data. I will just need to figure out something similar in time, for now i'm not extremely worried about players editing their files. If I have active admins and am actively admining myself, It will be easy to figure out who has cheated. Leveling takes quite some time, if someone is a new player and high enough to buy a tank, i know they cheated.
  12. I have a new problem, When the truck gets destroyed and respawns, the setPos is putting me at [0,0,0] instead of at the newly spawned truck. Is this because the action is still ascociated with the old truck even though they have the same variable name? I tried removing the action but the second action always duplicates even when I try to remove it. Here is where the vehicle is being created. //BLU SPAWN TRUCK neb_fnc_core_bluSpawnTruck = { createMarker ["BluTruckSpawn",[3116.23,13584.7]]; "BluTruckSpawn" setMarkerType "Empty"; "BluTruckSpawn" setMarkerSize [2, 2]; while {true} do { _direction = 120; _position = getMarkerPos "BluTruckSpawn"; _mrk = "BluTruckSpawn"; _veh = createVehicle ["B_T_Truck_01_box_F", _position, [], 0, "NONE"]; _veh setVariable ["BIS_enableRandomization", false]; _veh setDir _direction; clearWeaponCargoGlobal _veh; clearMagazineCargoGlobal _veh; clearItemCargoGlobal _veh; _veh setVehicleVarName "BluSpawnTruck"; BluSpawnTruck = _veh; if (isNil "BluTruckAction") then { BluTruckAction = 0; BluTruckActionFree = 0; [BluSpawnTruck] call neb_fnc_addBounty; [BluTeleScreen, BluSpawnTruck, BluTruckAction] remoteExec ["neb_fnc_core_teleToTruck"]; [BluTeleScreen, BluSpawnTruck, BluTruckActionFree] remoteExec ["neb_fnc_core_teleToTruckFree"]; }; //Create trigger for shop _trigger = createTrigger[ "EmptyDetector", getMarkerPos _mrk, true ]; //Set trigger size on all clients and JIP [ _trigger, [ 5, 5, 0, false, 5 ] ] remoteExec [ "setTriggerArea", 0, true ]; //Attach it to the vehicle _trigger attachTo [ BluSpawnTruck, [0,0,0] ]; //Call shopInit on server and all clients and JIP _JIP = [ _trigger, "Blu Mobile FOB", "ALL", true, true ] remoteExec [ "NEB_fnc_shopInit", [ 0, 2 ], true ]; waitUntil {!alive BluSpawnTruck}; sleep .5; BluSpawnTruck = nil; sleep 10; }; }; Here is what the holdaction function currently looks like neb_fnc_core_teleToTruck = { params ["_home","_truck", "_action"]; _action = [ /* 0 object */ _home, /* 1 action title */ "Teleport To Mobile FOB ($500)", /* 2 idle icon */ "images\blinkicon.paa", /* 3 progress icon */ "images\blinkicon.paa", /* 4 condition to show */ "true", /* 5 condition for action */ "true", /* 6 code executed on start */ {}, /* 7 code executed per tick */ {}, /* 8 code executed on completion */ { param[ 3 ] params ["_home","_truck", "_action"]; [500] call neb_fnc_core_pay; player setPos [getPos _truck select 0, (getPos _truck select 1) +5, (getPos _truck select 2)]; }, /* 9 code executed on interruption */ {}, /* 10 arguments */ [_home,_truck,_action], /* 11 action duration */ 1, /* 12 priority */ 0, /* 13 remove on completion */ false, /* 14 show unconscious */ false ] call bis_fnc_holdActionAdd; }; EDIT: Doing this worked, though I wish it would let me assign action ID to names instead of numbers, It would be a lot easier to delete them without any issues that way. waitUntil {!alive BluSpawnTruck}; sleep .5; [BluTeleScreen,0] call bis_fnc_holdActionRemove; [BluTeleScreen,1] call bis_fnc_holdActionRemove; BluSpawnTruck = nil; sleep 10; EDIT2: Hmm after more testing, seems that it starts to duplicate after the second time the vehicle is destroyed. EDIT3: seems the only way to get decent results after the vehicle respawns is to removeAllActions from the screen.
  13. Thanks Larrow, i'll try that. EDIT: Once again, you have the answer for me when im stuck. :D Works like a charm, now just to tweak it to be more functional instead of putting you in the middle of the truck, haha. Heres the working hold action. I tried the top method first but it was telling me that it was an array instead of an object so I tried the method under and it worked. //Tele to Truck neb_fnc_core_teleToTruck = { params ["_home","_truck"]; hint format ["%1", _truck]; Blu_MobileFOB_Action = [ /* 0 object */ _home, /* 1 action title */ "Teleport To Mobile FOB", /* 2 idle icon */ "images\blinkicon.paa", /* 3 progress icon */ "images\blinkicon.paa", /* 4 condition to show */ "true", /* 5 condition for action */ "true", /* 6 code executed on start */ {}, /* 7 code executed per tick */ {}, /* 8 code executed on completion */ { param[ 3 ] params ["_home","_truck"]; player setPos getPos _truck; }, /* 9 code executed on interruption */ {}, /* 10 arguments */ [_home,_truck], /* 11 action duration */ 1, /* 12 priority */ 0, /* 13 remove on completion */ false, /* 14 show unconscious */ false ] call bis_fnc_holdActionAdd; };
  14. I am trying to create a function that will let me add a remoteExec to the script of any object or vehicle that I want my players to be able to teleport to through a screen near where they spawn. I am getting an error that tells me _unit is undefined. EDIT: Nevermind, after thinking about this for a minute. I realise how silly of a question this is. Its always going to be the player so I dont need to pass the parameter... overthinking it once again haha sorry. EDIT2: seems my real issue now is that its telling me undefined variable in expression _truck. The hold action is showing up on the object BluTeleScreen so i know that variable is passing through, but not the truck. In vehicle script after vehicle creation [BluSpawnTruck, BluTeleScreen] remoteExec ["neb_fnc_core_teleToTruck"]; the function is in my coreFunctions neb_fnc_core_teleToTruck = { params ["_truck","_home"]; Blu_MobileFOB_Action = [ /* 0 object */ _home, /* 1 action title */ "Teleport To Mobile FOB", /* 2 idle icon */ "images\blinkicon.paa", /* 3 progress icon */ "images\blinkicon.paa", /* 4 condition to show */ "true", /* 5 condition for action */ "true", /* 6 code executed on start */ {}, /* 7 code executed per tick */ {}, /* 8 code executed on completion */ {player setPos (getPos _truck)}, /* 9 code executed on interruption */ {}, /* 10 arguments */ [], /* 11 action duration */ 1, /* 12 priority */ 0, /* 13 remove on completion */ false, /* 14 show unconscious */ false ] call bis_fnc_holdActionAdd; };
×