-
Content Count
54 -
Joined
-
Last visited
-
Medals
Everything posted by soldier9945
-
Hi there! I was initially looking to load the Virtual Arsenal while a player is in the spawn menu so that he can choose his gear with a nice visual interface. I found out that the Zeus mode has the feature to create and populate the Inventory menu with loadouts created by the Zeus player, but only for Zeus, not for all players. What I want to do now is the following: User connects to the server and gets the respawn and inventory menus. I successfully implemented: respawnTemplates[] = {"Revive", "MenuPosition", "Tickets", "Wave", "MenuInventory"}; Inventory menu is populated with standard loadouts defined in my mission (if possible, a button to load the Virtual Arsenal would be nice, if not a simple ammo crate after respawn will do the trick) If the user saved one or more loadouts in Virtual Arsenal, import them into the Menu Inventory for the next respawn of this player (ideally only the ones created on the actual server to limit incomplete loadouts due to server/mission restrictions) I have looked for the last 5 hours through multiple sources and forums to find something similar, without luck. Note that I am just (re)starting to script and make missions for ArmA. I stopped after Cold War Crisis started to get old in... what... 2004? (ARMA NEVER GETS OLD!!! I know... shame on me) I have found a thread (BI Virtual Arsenal and BI respawn. Playing nicely together?) dealing about automatically restoring the previously selected loadout at respawn and somehow revive with the last known loadout (if you threw a grenade you shouldn't be magically revived with a new nade!)... I think I'll be forced to look at that at some point. What do you think? Would that be possible? I am willing to invest some time to get this working for my mission project. I want to implement this "per player virtual arsenal loadout" in a sort of "mission template" I am currently trying to build This mission preset would be similar to "Rush" in Battlefield Less arcade than the mode in BF but still letting players respawn on squad leaders and respawn points to bring fast paced action to ArmA multiplayer The mission has multiple steps like "Rush" but every objective has an impact on ressources of the defending or attacking team The ultimate goal is to create a mission template that can be more or less easily modified by :moving the mission on the map modifying it's size (distance between the objectives) copying it over to another island changing objectives (destroying a weapons cache in a building, stealing or destroying a fuel truck, holding a zone, stealing documents) changing the impact an action has on objectives (stealing the fuel truck gives your team access to a tank previously out of fuel, or destroying it to easily cut off their tank which is already low on fuel, restricting access to special weapons because a weapon cache has been taken out...) In short I want to make ArmA accessible to more casual people and show them what they miss out not being able to create their own content, making it easyer for them to discover and adapt to the deep gameplay mechanics possible with this game.
- 29 replies
-
- MenuInventory
- Custom Loadouts
-
(and 1 more)
Tagged with:
-
BIS_fnc_showMissionStatus shows wrong countdown time (at server start?)
soldier9945 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Apparently I have not managed to implement the BIS_fnc_showMissionStatus properly. It works fine on a Dedicated server, the end script ends the mission on the right time. But I can't seem to find out how to show the right time to the players. It displays too much time on the client, but only if I join the Dedicated server. If I launch the mission from the editor it works, at least for me, with the right time showing. Original BIS_FNC_countdown /* Author: Karel Moricky Description: Trigger countdown Parameter(s): 0: NUMBER - countdown in seconds 1: BOOL - true to set the value globally Returns: NUMBER */ private ["_countdown","_isGlobal"]; _countdown = [_this,0,0,[0,true]] call bis_fnc_param; _isGlobal = [_this,1,true,[true]] call bis_fnc_param; switch (typename _countdown) do { case (typename 0): { private ["_servertime"]; _servertime = if (ismultiplayer) then {servertime} else {time}; switch true do { case (_countdown < 0): { missionnamespace setvariable ["bis_fnc_countdown_time",nil]; if (_isGlobal) then {publicvariable "bis_fnc_countdown_time";}; -1 }; case (_countdown == 0): { private ["_time"]; _time = missionnamespace getvariable "bis_fnc_countdown_time"; if (isnil "_time") then { -1 } else { (_time - _servertime) max 0 }; }; case (_countdown > 0): { private ["_time"]; _time = _servertime + _countdown; missionnamespace setvariable ["bis_fnc_countdown_time",_time]; if (_isGlobal) then {publicvariable "bis_fnc_countdown_time";}; _time }; default { -1 }; }; }; case (typename true): { ([] call bis_fnc_countdown) > 0 }; default { -1 }; }; I have used in the initServer.sqf file (I expect the second parameter to set the mission time as a public variable for clients to get the right time when they initialize): // Mission End [600, true] call BIS_fnc_countdown; //start mission Countdown It seems to work fine on the server as stated, my End.sqf script ends the mission on the right time, 10mins after beginning. Problem is, when I want to show the player this timeout through initPlayerLocal.sqf: // Show Tickets Status [] call BIS_fnc_showMissionStatus; It shows numbers over the 1000's, as if the client interprets the server time wrong. I've checked after letting the Dedicated server was running for some time... and it strangely worked... EDIT: can reproduce this. Restarting server and connecting in about a minute shows the wrong countdown number. Waiting approx. 10min shows the right number. How do I fix that? -
BIS_fnc_showMissionStatus shows wrong countdown time (at server start?)
soldier9945 replied to soldier9945's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Still having the problem when loading it with the first player connecting... but only on a dedicated server. Hosted local server doesn't have this error. I will try to make my own counter as suggested: -
How to copy Virtual Inventory from a vehicle to another?
soldier9945 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi! I was trying to implement the Virtual Arsenal in my MP mission, but ran into the problem that I didn't want to blacklist most of the available stuff per faction. Then I stumbled across the new Eden Virtual Inventory (or real inventory) where I can choose either a fixed amount of weapons, or infinite weapons and items on this vehicle, ammobox. Problem is, if I wanted to copy the same selection I made on a truck for example, but I wanted to copy it over to an ammo box... how would someone do that? Edit the mission.sqm directly? The other way may be to copy the virtual arsenal loadout to the other object, but I can't find a way to edit the inventory content of a vehicle/ammobox. How would you proceed? -
How to copy Virtual Inventory from a vehicle to another?
soldier9945 replied to soldier9945's topic in ARMA 3 - MISSION EDITING & SCRIPTING
And just like that it works... Don't know what I did back then... Thanks for the explanation regarding BIS_addVirtualWeaponCargo_cargo -
How to copy Virtual Inventory from a vehicle to another?
soldier9945 replied to soldier9945's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I finally got it working by using the functions instead of the variables. initServer.sqf: fnc_copyVehicleArsenal = { Params["_vehToCopy", "_destVehs"]; Private["_BackPackCargo", "_ItemCargo", "_MagazineCargo", "_WeaponCargo"]; _BackPackCargo = _vehToCopy call BIS_fnc_getVirtualBackpackCargo; _ItemCargo = _vehToCopy call BIS_fnc_getVirtualItemCargo; _MagazineCargo = _vehToCopy call BIS_fnc_getVirtualMagazineCargo; _WeaponCargo = _vehToCopy call BIS_fnc_getVirtualWeaponcargo; { [_x, _BackPackCargo] call BIS_fnc_addVirtualBackpackCargo; [_x, _ItemCargo] call BIS_fnc_addVirtualItemCargo; [_x, _MagazineCargo] call BIS_fnc_addVirtualMagazineCargo; [_x, _WeaponCargo] call BIS_fnc_addVirtualWeaponCargo; ["AmmoboxServer", [_x, true]] call BIS_fnc_arsenal; } forEach _destVehs; }; [west_truck_1, [west_truck_2, west_truck_3, west_truck_4]] call fnc_copyVehicleArsenal; [east_truck_1, [east_truck_2, east_ammobox_1, east_ammobox_2]] call fnc_copyVehicleArsenal; I'm not sure that code is clean or optimized... still re-learning ArmA scripting... :/ -
How to copy Virtual Inventory from a vehicle to another?
soldier9945 replied to soldier9945's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I've got an error on this line: _x setVariable ["BIS_fnc_arsenal_condition", _condition, true ]; In the original BIS_fnc_arsenal it's used the same way, so I don't know why it wouldn't work here : case "AmmoboxInit": { private ["_box","_allowAll"]; _box = [_this,0,objnull,[objnull]] call bis_fnc_param; _allowAll = [_this,1,false,[false]] call bis_fnc_param; _condition = [_this,2,{true},[{}]] call bis_fnc_param; if ({} isequalto {}) then { _box setvariable ["bis_fnc_arsenal_condition",_condition,true]; }; -
How to copy Virtual Inventory from a vehicle to another?
soldier9945 replied to soldier9945's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@larrow, you're the best. I was gonna try to implement it like that... Do you read minds? Thanks a thousand times! Were did you find the BIS_fnc_arsenal_condition variable? EDIT: doesn't your script only copy the weapons from the truck ? _x setVariable [ "bis_addvirtualweaponcargo_cargo", _cargo, true ]; If this is for the weapons, shouldn't we add these variables too ? BIS_fnc_getVirtualBackpackCargo_cargo BIS_fnc_getVirtualItemsCargo_cargo BIS_fnc_getVirtualMagazineCargo_caro fnc_copyVehicleArsenal = { params[ "_vehToCopy", "_vehs" ]; _condition = _vehToCopy getVariable "BIS_fnc_arsenal_condition"; _cargo = _vehToCopy getVariable "bis_addVirtualBackpackCargo_cargo"; _cargo = _vehToCopy getVariable "bis_addVirtualItemsCargo_cargo"; _cargo = _vehToCopy getVariable "bis_addVirtualMagazinesCargo_cargo"; _cargo = _vehToCopy getVariable "bis_addVirtualWeaponcargo_cargo"; { _x setVariable [ "BIS_fnc_arsenal_condition", _condition, true ]; _x setVariable [ "bis_addVirtualBackpackCargo_cargo", _cargo, true ]; _x setVariable [ "bis_addVirtualItemsCargo_cargo", _cargo, true ]; _x setVariable [ "bis_addVirtualMagazinesCargo_cargo", _cargo, true ]; _x setVariable [ "bis_addVirtualWeaponcargo_cargo", _cargo, true ]; [ "AmmoboxServer", [ _x, true ] ] call BIS_fnc_arsenal; }forEach _vehs; }; if ( isServer ) then { [ west_truck_1, [ west_truck_2, west_truck_3, west_truck_4 ] ] call fnc_copyVehicleArsenal; }; Also, is using these variables faster than calling the functions BIS_addVirtual*****Cargo ? -
How to copy Virtual Inventory from a vehicle to another?
soldier9945 replied to soldier9945's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I may have found a solution reading the Arsenal Wiki and came up with the following idea: I could set up a Truck for Blufor called west_truck_1 and edit the virtual items I wanted. and in the init of every object I wanted to replicate these item selections: [this,(west_truck_1 call BIS_fnc_getVirtualBackpackCargo)] call BIS_fnc_addVirtualBackpackCargo; [this,(west_truck_1 call BIS_fnc_getVirtualItemCargo)] call BIS_fnc_addVirtualItemCargo; [this,(west_truck_1 call BIS_fnc_getVirtualMagazineCargo)] call BIS_fnc_addVirtualMagazineCargo; [this,(west_truck_1 call BIS_fnc_getVirtualWeaponCargo)] call BIS_fnc_addVirtualWeaponCargo; I'll try this now and will report back if it works! EDIT: Confirmed! This works! I had to change a few things from my first idea, sorry for the notifications that may have sent to subscribers of this thread -
Countdown timer, adding a points system & Stopping script if another is activated
soldier9945 replied to LimpingWhale's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I've started a new topic BIS_fnc_showMissionStatus shows wrong countdown time (at server start?) @larrow explained why the number is wrong in the first 5min: -
BIS_fnc_showMissionStatus shows wrong countdown time (at server start?)
soldier9945 replied to soldier9945's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks again! Does that mean it's a bug to be fixed? What synchronizes the server? A module? Do you know why it does wait 5mins before syncing? Thanks for the suggestions! I'll try to find another countdown script. -
Countdown timer, adding a points system & Stopping script if another is activated
soldier9945 replied to LimpingWhale's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks @harmdhast! Where would I execute it? If I'm not wrong, if it's called in the initServer.sqf, wouldn't it only be launched only at server start? What I don't understand is the second parameter explained with 1: BOOL - true to set the value globally. Shouldn't it already be correct for all clients? I've tried to reconnect after the server has started for an hour, and strangely it worked and showed the right time. I'll try running it with and report back. UPDATE: Just tried the following in initServer.sqf: [600, true] remoteExec ["BIS_fnc_countdown"]; //start mission Countdown Problem is, my end.sqf script triggers at start of the mission, ending it immediately. -
Countdown timer, adding a points system & Stopping script if another is activated
soldier9945 replied to LimpingWhale's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@harmdhast Not useful. Not at all. Thread was unanswered. How is anybody gonna find solutions on here leaving things unanswered? @dreadedentity Thanks for the explanation. "Does not synchronize across clients" does that mean there's no possibility to show each client the current state of the countdown? That was my question about BIS_fnc_showMissionStatus. You explained the DE_fnc_countdown. Should we only use this one instead of BIS_fnc_countdown? Why? Thank you. -
Countdown timer, adding a points system & Stopping script if another is activated
soldier9945 replied to LimpingWhale's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@LimpingWhale I found out how to use BIS_fnc_countdown: /* Author: Karel Moricky Description: Trigger countdown Parameter(s): 0: NUMBER - countdown in seconds 1: BOOL - true to set the value globally Returns: NUMBER */ private ["_countdown","_isGlobal"]; _countdown = [_this,0,0,[0,true]] call bis_fnc_param; _isGlobal = [_this,1,true,[true]] call bis_fnc_param; switch (typename _countdown) do { case (typename 0): { private ["_servertime"]; _servertime = if (ismultiplayer) then {servertime} else {time}; switch true do { case (_countdown < 0): { missionnamespace setvariable ["bis_fnc_countdown_time",nil]; if (_isGlobal) then {publicvariable "bis_fnc_countdown_time";}; -1 }; case (_countdown == 0): { private ["_time"]; _time = missionnamespace getvariable "bis_fnc_countdown_time"; if (isnil "_time") then { -1 } else { (_time - _servertime) max 0 }; }; case (_countdown > 0): { private ["_time"]; _time = _servertime + _countdown; missionnamespace setvariable ["bis_fnc_countdown_time",_time]; if (_isGlobal) then {publicvariable "bis_fnc_countdown_time";}; _time }; default { -1 }; }; }; case (typename true): { ([] call bis_fnc_countdown) > 0 }; default { -1 }; }; Now when used in the initServer.sqf file like this: // Mission End [600, true] call BIS_fnc_countdown; //start mission Countdown it seems to work fine, even on Dedicated Severs. Problem is, when I want to show the player this timeout in initPlayerLocal.sqf: // Show Tickets Status [] call BIS_fnc_showMissionStatus; It does only work on my client if I host the game (from editor -> as MP mission) and it counts down from 10min to 0min. But on the dedicated server I get weird numbers (1030min) that grow if I restart the server 3min later, it will show (1033min) If I then restart the server 5min later it will show (1038min). I can however call the BIS_fnc_countdown funciton in the initPlayerLocal.sqf but then the timer goes wild and triggers my end conditions somehow too early. I think something is broken with the showMissionStatus function... I think there is a step missing by substracting the time of the server (from midnight?) or something like that. -
Kunduz, Afghanistan [10km] v1.20
soldier9945 replied to james2464's topic in ARMA 3 - ADDONS & MODS: COMPLETE
I can't seem to port my working missions on Kunduz to a dedicated Eden server... AI just falls through the map in loops and swim forward (instead of walking), same with vehicles (unmanned) that rotate weirdly. This doesn't happen when launched as MP mission from the Editor... What could it be? I tried making a sample mission with just 4 units (playable) and the swim-fallthrough-bug is there too. HELP!!! EDIT: My fault, I launched the dedicated server with nssm (launch any program as a service) and I had to hard code the startup parameters... first I had the armaholic version loaded on the server, and I changed it for the workshop version... The Dedicated Server couldn't load the map data anymore so he let the units and vehicles fall, but my client did the physics calculations with the terrain as ground surface... -
How to copy Virtual Inventory from a vehicle to another?
soldier9945 replied to soldier9945's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Okay, that I know. But is there an easy way to get the names of the already configured items from one vehicle to copy it into the init? Thanks! -
How to copy Virtual Inventory from a vehicle to another?
soldier9945 replied to soldier9945's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Dayum... Gonna try this, didn't event think about it. Thanks! What if I wanted to add some equipment everywhere, I'd have to edit every vehicle, right? -
Custom Respawn Inventory Menu per player (dynamically load player's saved Virtual Arsenal loadouts)
soldier9945 replied to soldier9945's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi there! Just another thing I found out: I can't create a custom loadout and select it on the next spawn, because the Virtual Arsenal loadouts are loaded only on the player init in initPlayerLocal.sqf // Load Virtual Arsenal into Respawn Inventory _arsenalNames = []; _arsenalDataLocal = []; _arsenalData = profilenamespace getvariable ["bis_fnc_saveInventory_data",[]]; for "_i" from 0 to (count _arsenalData - 1) step 2 do { _name = _arsenalData select _i; _arsenalDataLocal = _arsenalDataLocal + [_name,_arsenalData select (_i + 1)]; _nul = _arsenalNames pushBack ( format[ "missionnamespace:%1", _name ] ); }; missionnamespace setvariable ["bis_fnc_saveInventory_data",_arsenalDataLocal]; [player,_arsenalNames] call bis_fnc_setrespawninventory; To be able to load a created loadout in a running mission, also execute the same code in the onPlayerKilled.sqf event handler: // Load Virtual Arsenal into Respawn Inventory _arsenalNames = []; _arsenalDataLocal = []; _arsenalData = profilenamespace getvariable ["bis_fnc_saveInventory_data",[]]; for "_i" from 0 to (count _arsenalData - 1) step 2 do { _name = _arsenalData select _i; _arsenalDataLocal = _arsenalDataLocal + [_name,_arsenalData select (_i + 1)]; _nul = _arsenalNames pushBack ( format[ "missionnamespace:%1", _name ] ); }; missionnamespace setvariable ["bis_fnc_saveInventory_data",_arsenalDataLocal]; [player,_arsenalNames] call bis_fnc_setrespawninventory; That way the loadouts get reloaded into the Spawn Inventory Menu every time a player dies (just before they are needed btw...). It works also if the player chooses to respawn with the menu entry, as the respawn will simply kill the player.- 29 replies
-
- 2
-
-
- MenuInventory
- Custom Loadouts
-
(and 1 more)
Tagged with:
-
[Possible BUG] Spawn Menu inventory selection copies over placed unit items
soldier9945 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi there! I don't know if the issue tracker lists this bug, as it is currently offline. I implemented the Spawn Menu Loadouts and I'm not 100% sure but I think that the loadout merges with the placed unit's inventory. What I mean is the following: - I created an MP mission where the players can choose from 2 sides each having 2 squads - The squads were standard groups i chose and enabled the flag "Playable" - If I play the scenario and choose a server slot as an AT unit, then choose a Sniper loadout in the Spawn Menu my player is really slow because of: -- Sniper Loadout fully there, with main weapon, secondary, guillie suit and other items -- I have multiple rockets in my backpack from the unit's original loadout Is it a bug? Do we have to clean all MP placed units with 0 equipment? Or call a "remove_all_items" function on init of each unit? Thank you for clearing this up. -
Custom Respawn Inventory Menu per player (dynamically load player's saved Virtual Arsenal loadouts)
soldier9945 replied to soldier9945's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Wow! Thanks a lot! I will try this asap! EDIT: It works like a charm!!!! Thanks alot! Where did you find / how did you deduce this? Tell me if I can get you a beer or something else! (PayPal or other)- 29 replies
-
- MenuInventory
- Custom Loadouts
-
(and 1 more)
Tagged with:
-
Custom Respawn Inventory Menu per player (dynamically load player's saved Virtual Arsenal loadouts)
soldier9945 replied to soldier9945's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I need sleep... infact the thread BI Virtual Arsenal and BI respawn. Playing nicely together? is all about what I try to do, minus the possibility to save multiple loadouts and a graphical way to switch them through. We need to find where the Virtual Arsenal loadout is stored, how to access it and populate the Respawn Inventory menu with those entries... Well, good night, I'm out.- 29 replies
-
- MenuInventory
- Custom Loadouts
-
(and 1 more)
Tagged with:
-
Fluid Stance(Better cover system)
soldier9945 replied to welcome to hell's topic in ARMA 2 & OA - SUGGESTIONS
Yeah, that looks good! Especially for non-trackir-user. But then, please don't forget the actual trackir user and add a vertical axis :) (I know it's some work to do for the animations required but... why not? Maybe a MOD Team will be able to do it?) -
Hi, I don't know if you read the thread (... ;)), but I proposed a temporary solution to the problem here... (see -winxp program start parameter) We all run ArmA2 with both our 4870 GPU's and get more FPS, but the game seems to stress the CPU much more than the GPU, so it still laggs in some places... It is mainly a game "problem", because if you change the launch configuration of the game, it works. But I don't think it really is a problem. It's just that either ATI or BIS have decided that Crossfire is not optimized yet (apparently on Vista and newer Windows versions, as "-winxp" implies that this works on XP [NEED CONFIRMATION] ), so they preferred to deactivate it.
-
How does the MOD system work in detail?
soldier9945 posted a topic in ARMA 2 & OA - ADDONS & MODS: DISCUSSION
Hi! I know how mods are used in ArmA1&2 but I'd like to know how exactly, on the technical point of view, it is applied. First question: Does a MOD have to be activated all the time in-game, as soon as it launches? Or would it be possible to activate a mod that doesn't run on servers that don't allow this or the other mod? Can a mod be not loaded when connecting to a new server or loading a new map in SP without restarting the game without the MOD? That would be a nice dynamic system! Second question: Will ArmA2 support a MOD rule in the Browser where you can show all servers accepting your sound MOD or model MOD or servers who run the MOD you want to play? I'm not aware of a system like that for now, maybe it is already there? :confused: Thanks alot! :D -
Ooookay, great! :) Tell me if you want to have my ASUS 4870x2 unmodded, never overclocked. I think it will have a good price then ;) I live in Switzerland btw... ;)