Jump to content

treoctone

Member
  • Content Count

    13
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

1 Follower

About treoctone

  • Rank
    Private First Class

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. treoctone

    Timer Script Question

    Thanks or that JShock it helps out a lot. Sorry for such a delayed response though, it has been a hectic last couple of days.
  2. treoctone

    Timer Script Question

    @austin_medic thanks for poinitng me in the direction of BIS_FNC_timetostring. I messed around with it a little and will definitely use it when I just need to manipulate daytime time. I didn't mention that my future goal is to be able to save record time to profilenamespace and display that in the mission. The BIS function unfortunately will not allow me to do that since it is only a string. @DreadedEntity I like your code more than mine and have added it to my code. I wish there was an easier way to save the whole string to profilenamespace without having to save each _hour, _minute, and _second to individual profilenamespace variables and then convert them to spring after using getvariable, but it doesn't look like that is possible. I appreciate both replies.
  3. I have written this timer script to display throughout the duration of a mission I am working on. I have read through and tried to determine how I could make a lot of the topics that already cover this subject(usually with laps) work, but in the end wrote it myself. The question I have is whether or not there is an easier way to do this without so much code? Thanks for any help and if anything someone else will be able to benefit from this. //timer script [] spawn { if (isServer) then { _seconds = 0; _minutes = 0; _hours = 0; my_Timer = format ["0" + "%1" +":0"+ "%2" +":0"+ "%3", _hours, _minutes, _seconds ]; disableSerialization; "myuniquelayer" call BIS_fnc_rscLayer cutRSC ["TreoHUD", "PLAIN"]; waitUntil {!isNull (uiNameSpace getVariable "TreoHUD")}; _display = uiNameSpace getVariable "TreoHUD"; _setText = _display displayCtrl 1003; while {true} do { _setText ctrlSetStructuredText (parseText format ["%1", my_Timer]); _setText ctrlSetBackgroundColor [0,0,0,0.5]; _seconds = _seconds + 1; sleep 1; if (_seconds <=9 && _minutes <= 9 && _hours <= 9) then { my_Timer = format ["0" + "%1" +":0"+ "%2" +":0"+ "%3", _hours, _minutes, _seconds ]; }; if (_seconds >=10 && _minutes <= 9 && _hours <= 9) then { my_Timer = format ["0" + "%1" +":0"+ "%2" +":"+ "%3", _hours, _minutes, _seconds]; }; if (_seconds >=10 && _minutes >= 10 && _hours <= 9) then { my_Timer = format ["0" + "%1" +":"+ "%2" +":"+ "%3", _hours, _minutes, _seconds]; }; if (_seconds >=10 && _minutes >= 10 && _hours >= 10) then { my_Timer = format ["%1" +":"+ "%2" +":"+ "%3", _hours, _minutes, _seconds]; }; if (_seconds >= 60) then { _minutes = _minutes + 1; _seconds = 0; if (_minutes >= 60) then { _hours = _hours + 1; _minutes = 0; }; }; }; }; }; //dialogs class RscTitles { class Default { idd = -1; fadein = 0; fadeout = 0; duration = 0; }; class TreoHUD { idd = 1000000; movingEnable = 0; enableSimulation = 1; enableDisplay = 1; duration = 1e+1000; fadein = 0.1; fadeout = 2; name = "TreoHUD"; onLoad = "with uiNameSpace do { TreoHUD = _this select 0 }"; class controls { class RTA_Timer { access = 0; type = 13; idc = 1003; style = 0x00; lineSpacing = 1; x = 0.40 * safezoneW + safezoneX; y = 0.025 * safezoneH + safezoneY; w = 0.10 * safezoneW; h = 0.040 * safezoneH; size = 0.020; colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,1}; text = ""; font = "PuristaSemiBold"; class Attributes { font = "PuristaSemiBold"; color = "#FFFFFF"; align = "CENTER"; valign = "top"; shadow = false; shadowColor = "#000000"; underline = false; size = "2"; }; }; }; }; };
  4. Have you tried adding colorText[] = {} to your class? { idc = 1547; text = "Select Range"; //--- ToDo: Localize; x = 0.329844 * safezoneW + safezoneX; y = 0.324 * safezoneH + safezoneY; w = 0.345469 * safezoneW; h = 0.308 * safezoneH; colorText[] = {0, 1, 0, 0.5}; };
  5. I'm using this code from Techlethal for my single player mission, but it might help you with yours or at least get you on the right track. It's pretty much the same, but the if (isPlayer _killer) might need to be changed. TL_fnc_enemyKilled = { _victim = _this select 0; _attacker = _this select 1; // Only increase the kill count if the kill was made by the player if(_attacker == player) then { call TL_fnc_updateKillCount; }; }; Edit: I realize now that this probably won't help you at all. If I could delete this post I would.
  6. Thanks for the reply Larrow. I tested this out removing the endmission from the start of the BIS_fnc_EndMission and placing it in init.sqf, but without it when my player dies it just gives me the default "you died" screen. Putting the below code into init.sqf gives me the same result as it did before. I'll mess around with it some more, but this mission is being coded to end on the players death which is why i have the eventhandler added. //init.sqf player addEventHandler ["HandleDamage", { if (_this select 2 >= 1) then { endmission "enddeath" call BIS_fnc_endmission }; }]; Edit: I finally got it to work. I needed to add the missionnamespace setvariable into a while {true} loop since my intention is to be able to change that variable depending on kills any way. I had originally had a killz = 0 variable in my init.sqf, but realized with the below code it was not necessary. Updated and working code below. //SQF file killz = 0; if (isDedicated) exitWith {}; waitUntil {!(isNull player)}; player addEventHandler ["HandleDamage", { if (_this select 2 >= 1) then { endmission"enddeath" call BIS_fnc_endmission }; }]; while {true} do { missionnamespace setvariable ["killzSet", str(killz)]; sleep 1; }; //Description class cfgDebriefing { class Enddeath { title = "Defeat"; Description = "blah"; }; }; class CfgDebriefingSections { class Loot { title = "Total number of kills"; variable = "killzSet"; }; };
  7. I found this. Hope it helps. https://forums.arma.su/forum/main-category/main-forum/18498-sa-matra-wasteland-chernarous-weapons-guide edit: I realize that the link I provided does not have their class names, but the below has a list of assets with classes for the RHS mod. http://doc.rhsmods.org/index.php/Main_Page You can also load the mods and find the weapons you are looking for in virtual arsenal and use Ctrl+shift+c to copy to it to clipboard and paste in notepad to get the weapon. I found the M60e4(hlc_lmg_M60E4) class name that way. It is in @WSWeapons by the way.
  8. Have you tried setting your mod parameters to load the @WSweapons? I think they may even use some mods from @WSRHS. You can add them through the launcher in the parameters and then they will be available in the editor. http://zk-clan.de/styles/pop_nobly/template/image/Arma%20III%20Launcher.png (729 kB)
  9. I have been stuck on this and have exhausted what I feel like is every different scenario. I am trying to have a variable display in the endmission debriefing, but nothing is working. As always any help is greatly appreciated. I feel the result is easy, but I can't wrap my noob head around it. This guy got it to work, but how is a mystery to me. SQF killz = 4; player addEventHandler ["HandleDamage", { if (_this select 2 >= 1) then { endMission "enddeath" call BIS_fnc_endMission; }; // tried "Loot" instead of endeath and it gives mission completed. }]; missionnamespace setvariable ["killz", str(killz)]; getkillz = missionNameSpace getvariable "killz"; // tried using both local and global variables for killz and getkillz. Description class cfgDebriefing { class Enddeath { title = "Defeat"; Description = "blah" ; }; class CfgDebriefingSections { class Loot //tried changing this to enddeath as well. { title = "Total number of kills"; getkillz = missionNameSpace getvariable str(killz); //tried this as variable = missionnam... }; }; };
  10. Thanks Killzone_Kid for your reply and awesome tutorials. I added the sleep to the while true loop. Also, thank you Senshi for the BIS_fnc suggestion. I have implemented both and it appears to be working, but I will not be able to test it completely until later this evening.
  11. I'm stuck on this one and can't seem to figure it out. I have my duration set to 1e+1000 and have tried a series of 10+ 9's, but every time I hit the 5 minute mark it disappears. I am new to this so I apologize if this is a noob question. Any help is appreciated. PHP Code: disableSerialization; 1 cutRSC ["TreoHUD", "PLAIN"]; waitUntil {!isNull (uiNameSpace getVariable "TreoHUD")}; _display = uiNameSpace getVariable "TreoHUD"; _setText = _display displayCtrl 1001; while {true} do { _setText ctrlSetStructuredText (parseText format ["Kills: %1",TL_KillCount]); _setText ctrlSetBackgroundColor [0,0,1,1]; }; Dialogs: class RscTitles { class Default { idd = -1; fadein = 0; fadeout = 0; duration = 0; }; class TreoHUD { idd = 1000000; movingEnable = 0; enableSimulation = 1; enableDisplay = 1; duration = 1e+1000; fadein = 0.1; fadeout = 2; name = "TreoHUD"; onLoad = "with uiNameSpace do { TreoHUD = _this select 0 }"; class controls { class structuredText { access = 0; type = 13; idc = 1001; style = 0x00; lineSpacing = 1; x = 0.84 * safezoneW + safezoneX; y = 0.83 * safezoneH + safezoneY; w = 0.18 * safezoneW; h = 0.040 * safezoneH; size = 0.020; colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,1}; text = ""; font = "PuristaSemiBold"; class Attributes{ font = "PuristaSemiBold"; color = "#FFFFFF"; align = "LEFT"; valign = "top"; shadow = false; shadowColor = "#000000"; underline = false; size = "2"; }; }; }; }; };
  12. What's up everyone? I am 35 and live on the East Coast of the US. I usually play for a couple of hours every night around 9:30pm-12:00am, and would like to know if there are any squads or anyone that would like to team up. I generally play KOTH, Wasteland, or Overpoch but am down for anything. I have a working mic and have started messing around with creating missions. Hit me up if interested.
  13. treoctone

    The Newcomers' Introduction Thread

    I am new to the community and scripting in Arma 3. Looking forward to learning and hopefully answering/asking some questions along the way. I am currently working on my first Arma 3 mission so wish me luck.
×