Jump to content

alleycat

Member
  • Content Count

    1003
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by alleycat

  1. Thanks, however it does not work in multiplayer. When the b1 unit is not used by a player it throws an error. Is there really no way to check for some things existence without the game throwing errors?
  2. I am trying to use the handledamage eventhandler like this: _unit = _this select 0; _selection = _this select 1; _damage = _this select 2; _source = _this select 3; _projectile = _this select 4; diag_log text format["%1 %2 %3 %4 %5", _unit, _selection, _damage, _source, _projectile]; _damage Isnt _damage at the end supposed to be the return value and pass on the damage to the engine? Because it does not work. The script fires but the unit does not take any damage. It is called like this: player addEventHandler ["HandleDamage",{_this execvm "script.sqf";}];
  3. This wont work: _entity addEventHandler ["HandeDamage", {[_this] call compile preprocessFileLineNumbers "client\player\ai_damagefilter.sqf";}]; _damage = _this select 0; diag_log text format["_damage %1", _damage]; _damage The script never fires because the diag_log does not appear in the log.
  4. I am feeling more comfortable with sqf scripting, so if apart from a diagram, I would rather not use it. Thanks for the answer. Reading some old interviews of rocket there was screenshots of fsm and zombie behaviour and I assumed from that you can do things with it sqf cant. Ok just to be clear, fsm can use exactly the same scripting commands as regular sqf?
  5. Forgot writing that in the manual, you growl by pressing the Y/Z key (depending on what keyboard you have). It is the key next to your T key.
  6. They go to script heaven and are uploaded to the great root server, peace be upon it
  7. Thanks I will try that.
  8. Is it possible to include addons (configs, models, islands) with a mission file and have it load without needing to load an addon folder before the game starts?
  9. I was sure it is not possible, but the make arma contest rules were a bit suggestive on that so I had to ask.
  10. If I wanted to attach an eventhandler to every zeus created AI unit, how would I do that? I could use the init field after I placed all my units or do it for each manually but that is so ghetto.
  11. It appears because the unit spawned by zeus is local to the zeus machine, the "player" would only refer to the local player. btw if you want to force ANOTHER client to reliably run a script, try this: http://dev.withsix.com/docs/cba/files/network/fnc_globalExecute-sqf.html
  12. The walking sounds are not an issue, because there is 3 survivors per hunter so it is hard to tell whose footsteps are heard. As for features, the current state of the mission is about 20% of what I want to do with it. I want to expand daytime gameplay a bit more and there is 3-5 more abilities for the hunter I am coding. btw while the videos suggest it is only night time, you can also play it during daylight.
  13. I would actually like to change the damage based on conditions, so I am still looking for a solution for this. Could it be that execVM is not working with return values?
  14. alleycat

    [MP] Hunting Trip

    DOWNLOAD v0.003 http://steamcommunity.com/sharedfiles/filedetails/?id=259086490
  15. First release: http://steamcommunity.com/sharedfiles/filedetails/?id=259086490
  16. Having an issue with a global variable in MP. And by global I mean something declared in the init.sqf like so: g_variable = 5; Then I tested this on a dedicated server where a script called on the server that uses the variable. Now for the messed up creepy part: It works on a dedicated, however when playing on a local server all scripts using the variable break and report an unknown variable. What the hell?
  17. Initialization Order When mission is starting, its components are initialized in the following order: Functions with recompile param set to 1 are recompiled Functions with preInit param set to 1 are called Object Init Event Handlers are called Object initialization fields are called init.sqs is executed in singleplayer init.sqf is executed in singleplayer Persistent multiplayer functions are called (client only) Modules are initialized [u]initServer.sqf is executed (server only)[/u] initPlayerLocal.sqf is executed initPlayerServer.sqf is executed (server only) Functions with postInit param set to 1 are called "BIS_fnc_init" variable is set to true init.sqs is executed in multiplayer init.sqf is executed in multiplayer Does that mean dedicated server only? Because my mission appears to work fine in editor and on a dedicated but breaks on a non dedicated mp server (as if the initserver does not exist)
  18. As I wrote, the complete initserver.sqf does not run on a nondedicated mp server.
  19. if it is called from the serverside it will only run on the server. Also createvehicle reliably will spawn things and they will appear for all players and not multiply. To be safe do what mario said, or: if (isserver) then { }; isServer fires on both a dedicated server, client hosted server and in the editor. My and marios code do the same thing. His code exits the script if the caller is not a server. While mine runs what is in the bracket if it is a server So if you want to not actually call the script and then exit if its not a server, you can do if (isserver) then { //run your script }; This will skip calling the script if th condition (isserver) is not true All of it said my approach would be a bit more economic, because you dont even have to call a script if it is not a server.
  20. I think it depends where it was spawned, as in, did you call the spawning of the car from the server? Anything createvehicle on the server is globally available (I think it even is if called from a client)
  21. I would like to have a dialog that still allows players to navigate their unit/zeus while it is active. Using a dialog allows mouse movement but no player movement while displays do the opposite. However zeus allows to have both, so I did some dumpster diving in the curator interface but I could not find what determines the ZEUS interface being able to be a display and dialog at the same time. I have also looked at the available parameters used in dialogs but nothing seemed useful. Here is my example //Used for DISPLAYS, not DIALOGS class RscTitles { class interface { idd = 5000; duration = 1e+006; movingenable = true; onLoad = "uiNamespace setVariable ['interface_display', _this select 0];"; class Controls { class frame1: RscFrame { idc = 1800; x = 0.208333 * safezoneW + safezoneX; y = 0.85 * safezoneH + safezoneY; w = 0.583333 * safezoneW; h = 0.154 * safezoneH; colorBackground[] = {1,1,1,0.5}; }; class b1: RscButton { idc = 1600; text = ""; //--- ToDo: Localize; x = 0.215625 * safezoneW + safezoneX; y = 0.864 * safezoneH + safezoneY; w = 0.0802083 * safezoneW; h = 0.056 * safezoneH; }; class RscButton_1601: RscButton { idc = 1601; text = ""; //--- ToDo: Localize; x = 0.215625 * safezoneW + safezoneX; y = 0.934 * safezoneH + safezoneY; w = 0.0802083 * safezoneW; h = 0.056 * safezoneH; }; }; }; };
  22. If I want to pack code into a function how would I do that? I have looked at the keydown functions but I am not sure of the correct syntax and what type of compile to use. _unassigned_players = []; { if ((_x isKindOf "Man") and (side _x == west)) then { _unassigned_players set [count _unassigned_players, _x]; }; } forEach Allunits; diag_log text format["_unassigned_players: %1", count _unassigned_players]; I use this a lot and I would like to pack this into a reusable function.
  23. Thanks, 2 questions about this: 1. If I call the function, will the game execute that function and wait for it to be finished or simply start it and continue with the next statement? So far I avoided functions because i was not sure how that works. Example: statement; function call; statement; 2. What is the advantage of compiling and preprocessing? Is it performane gain and does that even matter on something small as my example?
×