Jump to content

cerberusjin

Member
  • Content Count

    17
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About cerberusjin

  • Rank
    Private First Class
  1. cerberusjin

    server script not working

    Sorry if I didn't made it clear. What I mean is if i'll just add isDedicated at the server part just like the script below. //==============Declaration of Global Variables PointsNeeded = 4000; Pointsperkill = 20; gameOver = false; scoresUpdated = false; //scores are bugged till next release - they dont reset scores = [0, 0]; //Pause till briefing has finished sleep 1; //================== //=== SERVER === //================== if ((isServer) or (isDedicated)) then { //==============LOADOUT { //-----WEST [west, format["WEST%1",_x] ] call BIS_fnc_addRespawnInventory; //-----EAST [east, format["EAST%1",_x] ] call BIS_fnc_addRespawnInventory; }forEach [1,2,3,4,5,6]; ..........
  2. I'm using DLink 600L and enable port forwarding. After launch, i can only see it in LAN and when I join, the game won't start and will be stuck to loading screen. and.. can't see other's dedicated server anymore.
  3. cerberusjin

    server script not working

    Hi! I'm back again. I'm trying to make it work for dedicated server. Just a quick question: All I need is to add (isDedicated) then it's gonna work if run in dedicated server? if ((isServer) or (isDedicated)) then { ... } I can't test it right now because I'm having problem setting up dedicated server(TADST).
  4. cerberusjin

    server script not working

    Thank you so much for dedicating so much time writing that essay to explain that to me. I guess my problem is figuring out which line of code should come first, coz I think that's where I messed up. BTW, I just finished(not really a finished game mode) what I'm trying to do and submitted it at makearmanotwar. Thanks again for the big help.
  5. A 5 versus 5 battle between East team and West team that involves sector control and points system. The two teams will go to war to take control of the 3 sectors which add points to the team that took it. The location gives no advantage to any of the team. Only teamwork, strategy and skill will ensure their victory. The first team to get the required points wins the game. - Earn points by killing enemy player - Capture sector(s) for additional bonus points and points over time About the game: - At the start of the game, players can choose from the loadout which soldier they wanted to use. the loadout is also available when you die. - As soon as players respawn, they can start moving and get some objectives(capturing sector(s) or kill enemy players) - Capturing Sector A or B will give 20 points to the team that took it and 1 point per second. While capturing Sector C will give the team 30 points and 1 point per second. - Every death will give 20 points to the opposing side. - The current location/map is just a concept to show the gameplay or how the game mode works. - The first location/map is just for 5v5 but the game mode is not limited to 5v5 - Points required to win the game is 4000 Known issue(s): player respawn at the start of the game is being considered as death and adding points to the opposing side. If you like the game mode please support me by voting: http://makearmanotwar.com/entry/izYggkpIb9#.VBrQBvmSxWo Also, thanks to the community and especially to Larrow for helping me finish(have progress) this game mode.
  6. cerberusjin

    server script not working

    @Larrow Thanks again for the big help! As of now, I'm trying to understand the whole script. if it is fine with you, can you explain to me what i'm doing wrong? why my functions are not working correctly(including the script in my other thread)? basic of using spawn? when to use spawn or call? Sorry if i have so many questions.
  7. cerberusjin

    server script not working

    @Iceman77 still doesn't work.
  8. cerberusjin

    server script not working

    @JShock still doesnt work. complete script inside init.sqf waitUntil {(!isNull player && time > 0)}; //==============LOADOUT //-----WEST [west, "WEST1"] call BIS_fnc_addRespawnInventory; [west, "WEST2"] call BIS_fnc_addRespawnInventory; [west, "WEST3"] call BIS_fnc_addRespawnInventory; [west, "WEST4"] call BIS_fnc_addRespawnInventory; [west, "WEST5"] call BIS_fnc_addRespawnInventory; [west, "WEST6"] call BIS_fnc_addRespawnInventory; //-----EAST [east, "EAST1"] call BIS_fnc_addRespawnInventory; [east, "EAST2"] call BIS_fnc_addRespawnInventory; [east, "EAST3"] call BIS_fnc_addRespawnInventory; [east, "EAST4"] call BIS_fnc_addRespawnInventory; [east, "EAST5"] call BIS_fnc_addRespawnInventory; [east, "EAST6"] call BIS_fnc_addRespawnInventory; //==============Declaration of Variables //[east, west] PointsNeeded = 100; Pointsperkill = 20; gameOver = false; if (!isDedicated) then { //west addScoreSide ((scoreSide west)*-1); //east addScoreSide ((scoreSide east)*-1); while {!gameOver} do { //=======Score Display SCORE_01_Load = {((_this select 0) displayCtrl 1001) ctrlSetText format ["%1", scoreSide west]}; 1 cutRsc ["score_test","PLAIN"]; SCORE_02_Load = {((_this select 0) displayCtrl 1002) ctrlSetText format ["%1", scoreSide east]}; 2 cutRsc ["score_test2","PLAIN"]; sleep 0.125; //Has one of the teams reached score limit if ((scoreSide west) >= PointsNeeded) then { gameOver = true; publicVariable "gameOver"; //Send end mission to clients - based on if they won or lost [["SideLost",false,5],"BIS_fnc_endMission", east, false] call BIS_fnc_MP; [["SideWon",true,true],"BIS_fnc_endMission", west, false] call BIS_fnc_MP; }; if ((scoreSide east) >= PointsNeeded) then { gameOver = true; publicVariable "gameOver"; //Send end mission to clients - based on if they won or lost [["SideLost",false,5],"BIS_fnc_endMission", west, false] call BIS_fnc_MP; [["SideWon",true,true],"BIS_fnc_endMission", east, false] call BIS_fnc_MP; }; }; //=====disable respawn for "_i" from 0 to 1e+1000 do { waitUntil {!isNull (findDisplay 49)}; ((findDisplay 49) displayCtrl 1010) ctrlEnable false; }; }; if (!isServer) exitWith{}; [west,1] call BIS_fnc_respawnTickets; [east,1] call BIS_fnc_respawnTickets; _handle = [] spawn { while {!gameOver} do { if ((sctr_A getVariable "owner") == west) then { west addScoreSide 1; } else { if ((sctr_A getVariable "owner") == east) then { east addScoreSide 1; }; }; sleep 1; }; };
  9. I set up a sectrol control. Named the sector "sctr_A". everything works fine except the server side script. Problem: At the start of the game the ticket won't change it's value even if i put any number. After capturing the sector, the script should increment team score but it's not working. Can someone please explain to me why my script is not working? And if not too much, help me solve the problem/correct the script. init.sqf gameOver = false; if (isServer) then { [west,0] call BIS_fnc_respawnTickets; [east,0] call BIS_fnc_respawnTickets; _handle = [] spawn { while {!gameOver} do { if ((sctr_A getVariable "owner") == west) then { west addScoreSide 1; } else { if ((sctr_A getVariable "owner") == east) then { east addScoreSide 1; }; }; sleep 1; }; }; };
  10. cerberusjin

    The new Sector Module

    @schmingo I also tried that tutorial from youtube. Bleeding and respawn are not working. Team Score is not resetting after exiting the game and gets carry over to other multiplayer games. I don't know what I did wrong. I just followed his example. Can someone help me pls?
  11. cerberusjin

    Multiplayer kill counter

    @Larrow i tried to use your code. It works perfectly if only for these two (1) at the start the of the game when players spawned, it is being counted as death (2) if a player joins a game in progress his/her death is not being counted. btw, thanks for the help. I'll just find a solution for these problems. @DreadedEntity I tried the EH but i can't find a way to make it work or because i'm doing it wrong. I'm suppose to put it in player's init right then name him "chat"? then at init.sqf, define westDead = []; and remove //(comment) for //westDead = westDead + [_this select 0]; and also I have questions about these 2 lines _this select 1 addScore 1; //select 1 is for? what will happen for team kill ? side _this select 1 addScoreSide 1; //select 1 is for? DreadedEntity gave me an idea so I tried this. init.sqf //==============LOADOUT //-----WEST [west, "WEST1"] call BIS_fnc_addRespawnInventory; [west, "WEST2"] call BIS_fnc_addRespawnInventory; [west, "WEST3"] call BIS_fnc_addRespawnInventory; [west, "WEST4"] call BIS_fnc_addRespawnInventory; [west, "WEST5"] call BIS_fnc_addRespawnInventory; [west, "WEST6"] call BIS_fnc_addRespawnInventory; //-----EAST [east, "EAST1"] call BIS_fnc_addRespawnInventory; [east, "EAST2"] call BIS_fnc_addRespawnInventory; [east, "EAST3"] call BIS_fnc_addRespawnInventory; [east, "EAST4"] call BIS_fnc_addRespawnInventory; [east, "EAST5"] call BIS_fnc_addRespawnInventory; [east, "EAST6"] call BIS_fnc_addRespawnInventory; //======declaration of variables DeadRedCount = 0; DeadBlueCount = 0; PointsNeeded = 60; Pointsperkill = 20; bluescore = 0; redscore = 0; //publicvariable "DeadRedCount"; //publicvariable "DeadBlueCount"; //publicvariable "PointsNeeded"; //publicvariable "Pointsperkill"; //publicvariable "bluescore"; //publicvariable "redscore"; //=======Score Display while {true} do { SCORE_01_Load = {((_this select 0) displayCtrl 1001) ctrlSetText format ["%1", bluescore]}; 1 cutRsc ["score_test","PLAIN"]; SCORE_02_Load = {((_this select 0) displayCtrl 1002) ctrlSetText format ["%1", redscore]}; 2 cutRsc ["score_test2","PLAIN"]; sleep 0.125; }; every EAST playable/player's init if(isserver) then {this addMPEventHandler ["MPkilled",{redscore = redscore + Pointsperkill; publicVariable "redscore";}];}; every WEST playable/player's init if(isserver) then {this addMPEventHandler ["MPkilled",{bluescore = bluescore + Pointsperkill; publicvariable "bluescore";}]; }; it solved the problem of player's death who joined game in progress. They are now being counted. Problem: The score being displayed is out of sync for the players who join game in progress and will be updated if a score was added. (I guess I will be using addScoreSide and scoreSide instead)
  12. cerberusjin

    Multiplayer kill counter

    @SilentSpike It's fine. As long as we learned something, it is ok.
  13. cerberusjin

    Multiplayer kill counter

    @waltenberg I tried your code. result(s): I'm getting 2 deaths for east/Red team at the start of the game(not because of your code, I don't know why this is happening. Before I'm getting 1 because of player respawn, but now 2.) When I killed an East player, it adds two deaths to Red Team. When I killed a West player, it adds zero death to Blue Team.
  14. cerberusjin

    Multiplayer kill counter

    thanks for helping but that didn't solved the problem. and you got it the other way around. i believed _x is the victim not the killer. which means he is with the EAST/Red Team. { if ((side _x == east) or (side player == east)) then { _x addMPEventHandler ["mpkilled", { DeadRedCount = DeadRedCount + 1; publicvariable "DeadRedCount"; DeadRedCount call func_deadRed; }]; }; } foreach allunits; I still don't know how to use it. Can you teach me more because my problem is I have 2 teams, East and West.
  15. cerberusjin

    Multiplayer kill counter

    yes, i still don't have eventhandler for the opfor. I don't want to add more codes if there is still an existing problem but i will add it later on when the problem is fixed.
×