-
Content Count
35 -
Joined
-
Last visited
-
Medals
-
MarchelorD started following JR Nova
-
JR Nova started following The Alamo (Wave Defense Co-05), Script not running on dedicated servers, [SOLVED] Displaying Variable Number on CfgCommunicationMenu text and and 2 others
-
Script not running on dedicated servers
JR Nova posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello I'm having some trouble making my mission work on dedicated servers. This is the code block which is causing problems init.sqf if (isServer) then { null=[true] execVM "waves.sqf"; [] execVM "unlocks.sqf"; null=[] execVM "support\request_support.sqf"; addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_killerID"]; if ((isPlayer _killer) && (alive _killer)) then { _killerID = owner _killer; [_killed] remoteExec ["lmo_killMoney", _killerID, false]; }; }]; }; This works fine on hosted servers, but on dedicated servers none of the code is ran. From my understanding (from this article), isServer should return true for both local hosted MP servers and dedicated servers. Am I doing something wrong? I also tried changing the first line to if (isServer || isDedicated) then { but the same thing happens, it works on local hosted MP but not on a dedicated server. I honestly have no idea what to do, as I have no dedicated server experience. Any help would be greatly appreciated! Here is a link to the mission on github -
Update! Revamped the entire mission system. -Added: money system, towers at base now cost money. -Added: Pop-A-Perc system -Added: enemy choppers that spawn with snipers on the bench to later rounds -Added: parameters can now be set by mission host before the game starts -Added: different enemy factions can be selected -Changed: enemies starts with pistols for the first wave -Changed: players now spawn with pistols
-
[SOLVED] Displaying Variable Number on CfgCommunicationMenu text
JR Nova replied to JR Nova's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Larrow Thanks for simplifying and explaining each step, this helps so much! I'm just starting to get my feet wet with some more advanced stuff and little things like this blow my mind lol. You're the best! 😁 -
[SOLVED] Displaying Variable Number on CfgCommunicationMenu text
JR Nova replied to JR Nova's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks that helps, but does that work for arrays too? For my example (I think) I need to define what menu to look at and what to change the text to. How I'm assuming is In theory this would change my support menu to say Artillery Strike $100 or worst case Artillery Strike - XXX, but neither one of them show up. -
[SOLVED] Displaying Variable Number on CfgCommunicationMenu text
JR Nova replied to JR Nova's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ahh okay I can do without the structuredText. But as for the missionNamespace variable, I'm not exactly sure how to go about changing that as I searched BIS_fnc_addCommMenuItem_menu and can't find anything. I tried this code and the name didn't change. _arty = [player,"artillery"] remoteExec ["BIS_fnc_addCommMenuItem"]; missionNamespace setVariable ["BIS_fnc_addCommMenuItem_menu",["artillery", format ['Artillery Strike $%1', artilleryPrice]]]; -
[SOLVED] Displaying Variable Number on CfgCommunicationMenu text
JR Nova posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello I'm trying to get a variable number (artilleryPrice) to show on the CfgCommunicationMenu class CfgCommunicationMenu { class artillery { text = "format ['Artillery Strike <t color='#00ff00'>$%1</t>', artilleryPrice]"; // Text displayed in the menu and in a notification submenu = ""; // Submenu opened upon activation expression = "[] execVM 'support\arty.sqf'"; // Code executed upon activation (ignored when the submenu is not empty) icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\artillery_ca.paa"; // Icon displayed permanently next to the command menu cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa"; // Custom cursor displayed when the item is selected enable = "1"; // Simple expression condition for enabling the item removeAfterExpressionCall = 1; // 1 to remove the item after calling }; }; It just literally prints format ['Artillery Strike <t color='#00ff00'>$%1</t>', artilleryPrice]. Is this even possible? I've searched the forums and can't really find another example of something like this other than in GUIs, but I'm pretty sure I have to use a different format lol. I checked the PreProcessor Commands but I'm not exactly sure if what I'm looking for is in there or not. -
[SOLVED] addAction for players near hidden object
JR Nova replied to JR Nova's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks that did the trick! Had to change a few things because the action was only getting removed from the player who activated it, but everything is working now 😁 init.sqf scripts\towers.sqf -
[SOLVED] addAction for players near hidden object
JR Nova replied to JR Nova's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok I actually have 5 towers total that I need this to work for (nTower, wTower, eTower, sTower, tower) so I just made a function that adds the trigger and action. Now the action doesn't appear at all though. Am I doing something wrong? init.sqf lmo_towers = { params ["_unit", "_price", "_tower","_action","_trig"]; _unit = _this select 0; _price = _this select 1; _tower = _this select 2; _trig = createTrigger ["EmptyDetector", getPos _tower, false]; _trig setTriggerArea [5, 5, 0, false]; _action = _unit addAction [format ["Purchase Tower <t color='#00ff00'>$%1</t>", _price], "scripts\towers.sqf", [_tower, _trig, _price], 5, true, true, "", "_x getVariable ['lmo_cash', 0] >= _price"]; _trig triggerAttachVehicle [_unit]; _trig setTriggerActivation ["VEHICLE", "PRESENT", true]; _trig setTriggerStatements ["this", "_action", "_unit removeAction _action;"]; }; player setVariable ["lmo_cash",2000, false]; pTowerPrice = 250; towerPrice = 1000; [player, towerPrice, tower] call lmo_towers; [player, pTowerPrice, nTower] call lmo_towers; [player, pTowerPrice, sTower] call lmo_towers; [player, pTowerPrice, eTower] call lmo_towers; [player, pTowerPrice, wTower] call lmo_towers; scripts\towers.sqf -
[SOLVED] addAction for players near hidden object
JR Nova posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm trying to make an action to purchase and unhide a hidden tower (named Tower) when a player is near where it will go and has enough money. I had it working fine for 1 person using a trigger around the tower, but when I tested it on MP it added an action for each player that was connected, for example 2 players would give 2 actions and give the actions to players who weren't in the trigger but had enough money, also these duplicate actions would not delete upon trigger deact or if another player used the action. the code from the trigger (named towerTrig) that sort of worked Activation: Any Player Type: Present Condition player in thisList On Act towerAction = player addAction [format ["Purchase Tower <t color='#00ff00'>$%1</t>", towerPrice], "scripts\towers.sqf", [Tower, towerTrig, towerPrice], 5, true, true, "", "player getVariable ['lmo_cash', 0] >= towerPrice"]; On Deact player removeAction towerAction; scripts\towers.sqf I also tried running an addAction from the init.sqf, but the action would only take away the money and not show the tower unless it was selected by the host. If I ran it with if (isServer) then {} the action would only show for the host and not any of the other players. init.sqf if (isServer) then { //Tried running with this line and without [player, [format ["Purchase Tower <t color='#00ff00'>$%1</t>", TowerPrice], "scripts\towers.sqf", [Tower, towerTrig, TowerPrice], 5, true, true, "", "_this getVariable ['lmo_cash', 0] >= TowerPrice && _this distance Tower < 10"]] remoteExec ["addAction"]; }; //Tried running with this line and without Is there a way to make this happen? -
setWaypointLoiterRadius breaking script
JR Nova replied to JR Nova's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks a ton, this worked out perfectly! -
setWaypointLoiterRadius breaking script
JR Nova replied to JR Nova's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ah that could be it, I do have a trigger around the area the player is in. I guess I'll just have to deal with it then because I kinda need the trigger more than I need the heli lol -
setWaypointLoiterRadius breaking script
JR Nova posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm trying to spawn a helicopter with guys on the benches that flies in and circles an area the player is in (near an empty helipad named attackPos) and kill the player. I tried using BIS_fnc_stalk, but the helicopter would just fly to the location and then just raise altitude forever. Here is the part of code that spawns the chopper and shooters. This code does not work at all, nothing spawns in. If I remove just this one line _heliWaypoint setWaypointLoiterRadius 200; everything spawns and the chopper flies to the correct location, but then raises altitude and flies away to the edge of the map. Any idea how to get this to work properly? -
Hmm strange, for me it's at the veeerrryyy bottom of the list on Altis. It was like halfway hidden though lol that might be why
-
Steam Workshop Link: https://steamcommunity.com/sharedfiles/filedetails/?id=1979428795 MISSION Survive each wave of enemies, that gets harder and harder each wave. Vehicles and snipers spawn in the later rounds. Earn cash from killing enemies that you can spend on upgrading your base, pop-a-perks or support. If you die, you can't respawn until the end of the wave. If all players die, the wave is lost and resets. FEATURES Customize your game with parameters Choose to fight against the AAF (Default), CSAT, NATO, FIA, Syndikat or RHS Russians. virtual arsenal (unlocked at wave 3) revive, spectator custom base and arena unlockable support (UAV recon, laser guided missile, mortars, artillery, carpet bombing) custom level system and base unlocks enemy body armor and vehicles level up each wave enemy helicopters spawn with snipers on benches weather and time changes every few waves (customizable) custom music and sounds SUPPORT Laser Designated Missile - If you have a laser designator, you can call in laser designated missile strikes after wave 15. You must keep your laser designator on the target until the missile strikes. (There might currently be a bug that removes the missile if you turn the designator off). Artillery, Mortars, Carpet Bomb - Choose one of the 3 from the support menu and click on the map to rain down fire from above. UAV Recon - All hostile units will be marked for the remainer of the round. These markers will update every few seconds to track enemy movement. Rearm - Reapplies last loadout that was equiped when arsenal was closed. Invisibility - Makes enemies ignore you until the timer expires. God Mode - Makes you immune to damage until the timer expires. POP-A-PERC SHOOTER PERC - Lowers weapon sway and recoil. Located near the box at spawn. CLUTCH PERC - Speeds up how fast you revive teammates. Located near the hospital. SPEED PERC - Increases your movement speed. Located on the ground near the main tower. BEAST PERC - Increase how much damage you can take. Located at the top of the main tower. TIME CYCLE (Default of 3 waves per level but customizable) Morning Noon Evening Night Night (Dark) Morning WAVE UNLOCKS Wave 2 - Heal (Support Menu) Wave 3 - Virtual Arsenal Wave 4 - Rearm (Support Menu) Wave 7 - UAV Recon (Support Menu) Wave 8 - Medical Healing Building Wave 9 - Invisibility (Support Menu) Wave 10 - God Mode (Support Menu) Wave 11 - Mortars Wave 15 - Laser Guided Missile Wave 17 - APC at base Wave 20 - Artillery Wave 23 - Tank at base Wave 25 - Carpet Bombs CREDITS HUGE thanks to @Larrowfor help with heli waypoints and the support menu prices. Also a huge thanks to @killzone_kid for help with the action for buying towers. Big shouts out to Daxx for the arena compositions Thanks @austin_medic and @lsd for their composition packs Thanks @shukofor the random position script Thanks @kibot for the support scripts from DUWS Thanks @wogz187 and @pierremgi for help on the forums Big thanks to Phil, Bruno and Porte for all their patience during testing. Custom images, sounds and music by @JR Nova. REQUIREMENTS None but choosing an enemy faction of RHS Russians requires RHS AFRF and GREF BUGS Sometimes an AI group will spawn and not move. If this happens, either you can use the UAV to find and kill them or use the action on the debug laptop at base to advance the level. No cash reward from destroying vehicles sometimes. NOTE: You don't get the bonus for completing the wave if you advance with the debug laptop. CUSTOM FACTIONS To use custom factions, open classNames.sqf and scroll down to "case (6)". You'll need to enter the classnames for enemy clothes, armor, weapons & vehicles. You can add as many items as you want or one, but the arrays can't be left empty or there will be errors. WANT TO HELP? Github repo: https://github.com/novakoda/Alamo Could use some help with adding GUI and any features, suggestions, code optimization, etc.
-
Spawned AI not following waypoints sometimes
JR Nova replied to JR Nova's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ah, thanks for the help! I finally got it working by running a code on the spawned groups that give them a doMove command to an invisible heli pad named "attackPos", waits a minute, then runs the stalker code. I renamed spawn.sqf from original post to waves.sqf init.sqf waves.sqf spawn.sqf