wozzsta
Member-
Content Count
56 -
Joined
-
Last visited
-
Medals
Everything posted by wozzsta
-
Wave system not triggering next wave - missionNameSpace not being set
wozzsta posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi guys, I have a custom wave defence script that me and another guy built a year or so ago, and i haven't touched it since. But now when i try and use it, it doesn't work properly. When everything is killed from a wave it is soposed to set a missionNameSpace variable to true, which a trigger then reads and starts the next wave. But killing the wave doesnt set the nameSpace variable. I have checked that the the next wave trigger is working correctly by adding a playerAddAction to set the nameSpace var manually and it triggers the next wave as expected. Can you see what's wrong with this? case "wave1" : { private ["_loc", "_veh", "_waypoint", "_allunits", "_playersinOA"]; _playersinOA = _oaMarker call fnc_playersinOA; ["<t color='#ff0000' size = '0.8'>Warning!<br />Wave 1 Incoming In 30 Seconds!</t>",-1,-1,6,1,0,789] remoteExec ["BIS_fnc_dynamicText",_playersinOA,false]; sleep 30; _loc = getmarkerpos _wave; _veh = ["O_MRAP_02_gmg_F"]; _waypoint = getMarkerPos _wpt; _allunits = [_veh, _loc, _waypoint] call fnc_createWave; waitUntil {sleep 2; 0 != count _allunits}; [_allunits] spawn { params ["_infantry"]; waitUntil { sleep 10; 0 == {alive _x} count _infantry; }; missionNamespace setVariable ["w1_done",true,false]; }; }; -
Errors in RPT with stat saving script.
wozzsta posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi guys, I am using this script (initPlayerLocal.sqf) to load and save my players money. I found it on here and it seems too work nicely. private ["_player"]; _player = _this select 0; waitUntil {!isNull _player}; if (isNil {profileNamespace getVariable "HG_mycash"}) then { // if profilenamespace doesn't find your variable it creates as 0 profileNamespace setVariable ["HG_mycash", 99999]; }; _profile = (profileNamespace getVariable "HG_mycash"); // Gets your save _player setVariable ["HG_mycash", _profile]; // loads it _player addAction ["Hint Money",{ _player =_this select 0; _money = (_player getVariable "HG_mycash"); profileNamespace setVariable ["HG_mycash", _money]; hint format["You have %1",_money]; }]; _player addAction ["Change Equipment",{ ["Open",true] spawn BIS_fnc_arsenal; }]; while {true} do { sleep 5; _player =_this select 0; _money = (_player getVariable "HG_mycash"); profileNamespace setVariable ["HG_mycash", _money]; }; However, it spams my RPT log with this: Error in expression <r = _this select 0; waitUntil {!isNull _player}; if (isNil {profileNamespace > Error position: <_player}; if (isNil {profileNamespace > Error Undefined variable in expression: _player File mpmissions\__cur_mp.Tanoa\initPlayerLocal.sqf, line 5 Attempt to override final function - bis_fnc_storeparamsvalues_data Error in expression <r = _this select 0; waitUntil {!isNull _player}; if (isNil {profileNamespace > Error position: <_player}; if (isNil {profileNamespace > Error Undefined variable in expression: _player File mpmissions\__cur_mp.Tanoa\initPlayerLocal.sqf, line 5 Error in expression <r = _this select 0; Any ideas what i can do? Thanks. -
Hi guys, i am adapting a no fly zone script i found. i have a trigger with the condition of: "Any player - Present" And the on activation: { nul=["_x", "noFly1", "nf1"] execVM "airDamage.sqf" } forEach thisList; this calls this script: params ["_x", "_noFly", "_oaMarker"]; switch _noFly do { case "noFly1" : { private ["_playersinOA"]; _playersinOA = _oaMarker call fnc_playersinOA; ["<t color='#ff0000' size = '0.8'>Warning! You are in a no fly zone!<br />Turn back now!</t>",-1,-1,6,1,0,789] remoteExec ["BIS_fnc_dynamicText",_playersinOA,false]; sleep 5; _unit = _this select 0; _veh = vehicle _unit; _pos = getPos _unit; if ( _veh isKindOf "Air" && (_pos select 2) > 5 ) then { if (local _unit) then { _veh setDamage 1; }; }; }; }; but when it gets to the _unit, _veh and _pos variables it breaks: 15:16:57 Error in expression <leep 5; _unit = _this select 0; _veh = vehicle _unit; _pos = getPos _unit; if > 15:16:57 Error position: <vehicle _unit; _pos = getPos _unit; if > 15:16:57 Error vehicle: Type String, expected Object any ideas what i can do to fix it? im lost? Thanks.
-
Hi guys, I have searched hi and low and i can't seem to find a base building system anywhere that isnt designed for dayz/exile. Has anyone made one/does one exist? cheers.
-
Need Help Making Simple Money System
wozzsta replied to npmproductions13's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yeah all that looks about right, give it a go and have a play around, like i said without an IDE to code in it's easy to get lost :) -
Need Help Making Simple Money System
wozzsta replied to npmproductions13's topic in ARMA 3 - MISSION EDITING & SCRIPTING
maybe try this? again not tested but it "should work" :) https://community.bistudio.com/wiki/rank if ((isPlayer _killer) && (alive _killer)) then { _rankformoney = "COLONEL" if(_killed isKindof "man") && (_rankformoney = rank _killed)then{ GoldCurrency = GoldCurrency + 500; hint format[New Currency %1, GoldCurrency]; }; }; }]; Cheers. -
[Release] Addon-Free ArmA Radio
wozzsta replied to phronk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
awesome mod thanks for the release! I am having one small issue: no matter how far away i am from AI even if i am right up close, i just get a flat line signal on my radio. Any ideas? Cheers. -
Scenario gets wiped when trying to test it in MP
wozzsta replied to gbus's topic in ARMA 3 - EDEN EDITOR
try exporting it to MP first then open the exported mission and play MP from that? -
how to removeAction for all players and JIP until server restart.
wozzsta posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi all, I have an action on a flag pole that starts a mission when selected, and once it is activated it disappears but only for the player that activated it and only for that session, if they leave and rejoin the action is available again. This is the code on the flag pole: "WaveAction = this addAction[""Start Wave Defence!"", ""functions\wavetrigger.sqf""]; "; this is what it triggers: ["oa1", "WWDStart", "WAVE 1"] call fnc_sendNotif; [] spawn {null = ["wave1", "wp1", "oa1"] execVM "waves.sqf";}; WaveFlag removeAction WaveAction; so, how do i remove it for everyone? Cheers. -
how to removeAction for all players and JIP until server restart.
wozzsta replied to wozzsta's topic in ARMA 3 - MISSION EDITING & SCRIPTING
hmm so i'm doing something wrong. i am using this in my functions\wavetrigger.sqf: if (missionNamespace getVariable ["CanUse", false]) then { hint "please wait until server restart before trying again!" } else{ diag_log text "OA1 WWDSTART WAVE1 SEND NOTIFICATION STARTING."; ["oa1", "WWDStart", "WAVE 1"] call fnc_sendNotif; diag_log text "OA1 WWDSTART WAVE1 SEND NOTIFICATION FINISHED."; [] spawn {null = ["wave1", "wp1", "oa1"] execVM "waves.sqf";}; missionNamespace setVariable ["CanUse",false,true]; }; and this in my init.sqf: missionNamespace setVariable ["CanUse",true,true]; but it doesnt matter what i do, it always comes up with "please wait until server restart before trying again!" so i guess i am doing something wrong? -
how to removeAction for all players and JIP until server restart.
wozzsta replied to wozzsta's topic in ARMA 3 - MISSION EDITING & SCRIPTING
something like if (missionNamespace getVariable ['var_canUse', false, true] then { hint "please wait until server restart before trying again!" } else{ execVM "functions\wavetrigger.sqf" }; -
how to removeAction for all players and JIP until server restart.
wozzsta replied to wozzsta's topic in ARMA 3 - MISSION EDITING & SCRIPTING
thanks for the reply, the trigger is "live" from the mission start as it is on an objects init, so i guess on mission load. but i guess the action doesnt need to be removed. i could have the script check a missionNamespace Variable and depending on if it has been triggered on not display a different message. thanks! -
Need Help Making Simple Money System
wozzsta replied to npmproductions13's topic in ARMA 3 - MISSION EDITING & SCRIPTING
no worries mate, i come from a C# background myself, it's a steep learning curving not having intelesense to rely on. -
Need Help Making Simple Money System
wozzsta replied to npmproductions13's topic in ARMA 3 - MISSION EDITING & SCRIPTING
hmmm you could do a nested if statement. if ((isPlayer _killer) && (alive _killer)) then { if(_killed isKindof "man") then{ GoldCurrency = GoldCurrency + 500; hint format[New Currency %1, GoldCurrency] }; }; }]; i havnt tested that but that should only give money if you kill a soldier, to limit it to specific units i'm not sure when i implemented this on my mission i wanted it to be a global system. Cheers. -
Need Help Making Simple Money System
wozzsta replied to npmproductions13's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Rather than using the targets init, which means you have to add that code to every unit u want a reward for, i would add an event handler to you initServer.sqf addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_killerID"]; if ((isPlayer _killer) && (alive _killer)) then { GoldCurrency = GoldCurrency + 500; hint format[New Currency %1, GoldCurrency] }; }]; -
Need Help Making Simple Money System
wozzsta replied to npmproductions13's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have a generic money system: make a initServer.sqf and put this in it: addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_killerID"]; if ((isPlayer _killer) && (alive _killer)) then { _killerID = owner _killer; [_killed] remoteExec ["fnc_addmoneyMP", _killerID, false]; }; }]; make a description.ext and put this in it: class CfgNotifications { class GotAward { title = "AWARD RECEIVED"; iconPicture = "\A3\Ui_f\data\GUI\Cfg\Ranks\general_gs.paa"; description = "<t color='#ffff33'>AWARD RECEIVED<br />%1</t>"; color[] = {0.3,0.6,0.3,1}; sound = ""; duration = 2; priority = 0; }; }; make a folder called functions and inside there a file called global.sqf and put this in it: fnc_addmoneyMP = { params ["_killed", "_award", "_myName"]; _award = 0; switch (true) do { case (_killed isKindOf "Man") : { _award = 1000; _myName = profileName; player setVariable ["HG_Cash",(player getVariable "HG_Cash") + _award, false]; ["GotAward",[_award]] call BIS_fnc_showNotification; titleText [format[(localize "STR_HG_DLG_MC"),[player getvariable 'HG_Cash'] call BIS_fnc_numberText],"PLAIN DOWN",1]; }; case (_killed isKindOf "Static") : { _award = 2000; _myName = profileName; player setVariable ["HG_Cash",(player getVariable "HG_Cash") + _award, false]; ["GotAward",[_award]] call BIS_fnc_showNotification; titleText [format[(localize "STR_HG_DLG_MC"),[player getvariable 'HG_Cash'] call BIS_fnc_numberText],"PLAIN DOWN",1]; }; case (_killed isKindOf "Car") : { _award = 3000; _myName = profileName; player setVariable ["HG_Cash",(player getVariable "HG_Cash") + _award, false]; ["GotAward",[_award]] call BIS_fnc_showNotification; titleText [format[(localize "STR_HG_DLG_MC"),[player getvariable 'HG_Cash'] call BIS_fnc_numberText],"PLAIN DOWN",1]; }; case (_killed isKindOf "Ship") : { _award = 4000; _myName = profileName; player setVariable ["HG_Cash",(player getVariable "HG_Cash") + _award, false]; ["GotAward",[_award]] call BIS_fnc_showNotification; titleText [format[(localize "STR_HG_DLG_MC"),[player getvariable 'HG_Cash'] call BIS_fnc_numberText],"PLAIN DOWN",1]; }; case (_killed isKindOf "APC") : { _award = 5000; _myName = profileName; player setVariable ["HG_Cash",(player getVariable "HG_Cash") + _award, false]; ["GotAward",[_award]] call BIS_fnc_showNotification; titleText [format[(localize "STR_HG_DLG_MC"),[player getvariable 'HG_Cash'] call BIS_fnc_numberText],"PLAIN DOWN",1]; }; case (_killed isKindOf "Tank") : { _award = 10000; _myName = profileName; player setVariable ["HG_Cash",0,false]; player setVariable ["HG_Cash",(player getVariable "HG_Cash") + _award, false]; ["GotAward",[_award]] call BIS_fnc_showNotification; titleText [format[(localize "STR_HG_DLG_MC"),[player getvariable 'HG_Cash'] call BIS_fnc_numberText],"PLAIN DOWN",1]; }; case (_killed isKindOf "Air") : { _award = 20000; _myName = profileName; player setVariable ["HG_Cash",(player getVariable "HG_Cash") + _award, false]; ["GotAward",[_award]] call BIS_fnc_showNotification; titleText [format[(localize "STR_HG_DLG_MC"),[player getvariable 'HG_Cash'] call BIS_fnc_numberText],"PLAIN DOWN",1]; }; }; }; then in your .init.sqf add this: call compileFinal preprocessFileLineNumbers "functions\global.sqf"; This will give the play a notification when they kill something and add the corresponding amount of money to the variable HG_Cash Hope that helps. -
Hi guys, I have this code in my initServer.sqf, that detects if the player that killed something is still alive and if it is it will reward it, this is to prevent the playing getting money when they die, or respawn. This works perfectly when i "play in MP" in Eden Editor, but when i host the mission myself with TADST and arma3server.exe, this function stops working, what am i doing wrong? Thanks, James. if (isServer) then { addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_killerID"]; if ((isPlayer _killer) && (alive player)) then { _killerID = owner _killer; [_killed] remoteExec ["fnc_addmoneyMP", _killerID, false]; }; }]; };
-
Code working in editor on LAN but not when started with arma3server.exe. Please help!
wozzsta replied to wozzsta's topic in ARMA 3 - MISSION EDITING & SCRIPTING
figure it out: i needed to change: if ((isPlayer _killer) && (alive player)) then to: if ((isPlayer _killer) && (alive _killer)) then i guess the server doesnt know who player is -
Raptors, Zombies and more!
wozzsta replied to bad benson's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Hi guys, i am trying to detect when the raptors are killed that are spawned by the module so i can trigger this code, but i can't see a way to get it to trigger. Any ideas? this addEventHandler ["Killed", { params ["_killed", "_killer", "_killerID"]; if (isPlayer _killer) then { _killerID = owner _killer; [_killed] remoteExec ["fnc_addmoneyMP", _killerID, false]; }; }]; ============================================================ EDIT: I figured it out, just added this to my initServer.sqf if (isServer) then { addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_killerID"]; if (isPlayer _killer) then { if (side _killed != WEST) then { _killerID = owner _killer; [_killed] remoteExec ["fnc_addmoneyMP", _killerID, false]; }; }; }]; }; -
how to detect when AI spawned by the "spawn AI" module are killed.
wozzsta posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi guys, i am trying to detect when the AI are killed that are spawned by the "spawn AI" module so i can trigger this code, but i can't see a way to get it to trigger. Any ideas? this addEventHandler ["Killed", { params ["_killed", "_killer", "_killerID"]; if (isPlayer _killer) then { _killerID = owner _killer; [_killed] remoteExec ["fnc_addmoneyMP", _killerID, false]; }; }]; -
[Release] Arma 3 Server Restarter
wozzsta replied to wozzsta's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Can a mod please move this to: https://forums.bistudio.com/forums/forum/163-arma-3-community-made-utilities/ Thanks. -
Hi guys, Over the last few days i have been working on a program to keep my server alive should anything happen that causes the .exe to close for what ever reason, so i came up with this. This allows you to monitor the .exe every few seconds (you can specify time) and if it isn't running then it will automatically start the server from the .bat file. You will have to manually navigate to the .bat file you want it to use, as the program can also be used to restart any program and it will automatically pick up the .exe when you select a program from the drop-down menu. the working directory path is the path where the .bat file is, i.e. your arma server root, this is need so your .bat is executed correctly. If like me your paranoid about your server going down while your away from home, A3SR also has the option to email you when it restarts your server. It will take a screenshot, attach it to an email and send it to you with the time and date of the restart. I hope this is useful for some people, if it gain traction i will do some more updates if people request it. Download link here: http://www.xdogsoftworks.com/dl/a3sr_1.1.0.rar
-
Errors in RPT with stat saving script.
wozzsta replied to wozzsta's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hmm that's what i thought but that doesnt work, if i just use player everywhere it doesnt work at all. -
the instruction at referenced memory at 0x0000 the memory could not be written
wozzsta posted a topic in ARMA 3 - EDEN EDITOR
Hi Guys, I am trying to open a Exile.ChernarusRedux.pbo in Eden editor, however when ever i go to open it i Arma3 crashes, and i get this message. "the instruction at referenced memory at 0x0000 the memory could not be written" Any ideas ? Thanks. -
[Release] Simple Weapon Shop System
wozzsta replied to hoverguy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
most likely the cash system will save in the profileNameSpace so will be saved locally. i have it setup on my server with this shop system. so you wont be able to give the players cash because you wont have access to their file obviously.