Jump to content

wozzsta

Member
  • Content Count

    56
  • Joined

  • Last visited

  • Medals

Community Reputation

16 Good

About wozzsta

  • Rank
    Lance Corporal

Recent Profile Visitors

838 profile views
  1. 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]; }; };
  2. 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.
  3. wozzsta

    Need Help Making Simple Money System

    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 :)
  4. wozzsta

    Need Help Making Simple Money System

    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.
  5. 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.
  6. try exporting it to MP first then open the exported mission and play MP from that?
  7. 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.
  8. 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?
  9. something like if (missionNamespace getVariable ['var_canUse', false, true] then { hint "please wait until server restart before trying again!" } else{ execVM "functions\wavetrigger.sqf" };
  10. 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!
  11. wozzsta

    Need Help Making Simple Money System

    no worries mate, i come from a C# background myself, it's a steep learning curving not having intelesense to rely on.
  12. wozzsta

    Need Help Making Simple Money System

    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.
  13. wozzsta

    Need Help Making Simple Money System

    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] }; }];
  14. 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.
  15. wozzsta

    Need Help Making Simple Money System

    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.
×