Jump to content

complacent_lizard

Member
  • Content Count

    11
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About complacent_lizard

  • Rank
    Private First Class
  1. complacent_lizard

    queue.sqf

    Well that escalated quickly!
  2. complacent_lizard

    queue.sqf

    This is a great little script @M1ke_SK! For the time being I've decided to change to a stationary line because I'm lining the units up in really close quarters (inside a building) and the path finding causes some messy problems! But I can see this script being useful especially when the the orange DLC comes out (maybe for a line of civilians waiting for aid?) Thanks so much! :D
  3. complacent_lizard

    queue.sqf

    Yeah! Something exactly like that! Are you using markers to achieve that @M1ke_SK? And how do you think it would handle 25 units lined up? :P
  4. complacent_lizard

    queue.sqf

    This is going to be one odd request... Here's the situation - I want a line of units to form a queue. The idea is that every 10 seconds the unit at the front of the line moves to the back, and the unit behind him moves forward to take his place. The units are forming the line, and the player is supposed to wait in the line for the scenario. Here's the script I have so far: queue.sqf private ["_front","_back"]; _front = _this select 0; _back = _this select 1; while {true} do{ sleep 10; _back doMove (_front modelToWorld [0,-0.3,0]); }; _front refers to the unit in front of the _back unit in the line. Each unit in the queue executes this script with nul = [civ_1, civ_2] execVM "scripts\queue.sqf"; depending on who is in front of them. The problem with this script is that the units can only form a straight line (not such an issue), but when the unit at the front of the line moves to the back, the unit behind them doesn't move to the front of the line. In essence, the 2nd in line doesn't move and the queue slowly shifts backwards. Any pointers or obvious mistakes I've made? Thanks everyone!
  5. complacent_lizard

    cutRsc and Updating Variables

    Nevermind! I'm a fool! I've replaced uiNamespace getVariable "cashVariable" displayCtrl 564382 ctrlSetText "$"+str(round time); with uiNamespace getVariable "cashVariable" displayCtrl 564382 ctrlSetText "$"+str(cashVariable); and it's all working! A huge thank you to Arkensor and pierremgi!! Couldn't have got it working without you and your advice! If anyone has any pointers for optimising / how much of an idiot I am, feel free to share :P
  6. complacent_lizard

    cutRsc and Updating Variables

    Absolute legend pierremgi! I've almost got it working. I've switched _myRSClayer cutRSC ["cashDisplayTitle",0,false]; for cutRSC ["CashDisplayTitle","PLAIN"]; The issue I've found is that uiNamespace getVariable "cashVariable" displayCtrl 564382 ctrlSetText "$"+str(round time); counts each second as it passes, instead of registering my cashVariable. Could this be because my cashIcon.sqf is called from my init.sqf? Thanks again!
  7. complacent_lizard

    cutRsc and Updating Variables

    Thanks again Arkensor! I've changed the idd for the CashDisplayTitle AND the idc for the CashDisplayControl to 101. init.sqf: cashVariable = 0; cutRsc ["CashDisplayTitle","PLAIN"]; description.ext: class RscTitles { class CashDisplayTitle { idd = 101; duration = 1e+1000; onLoad = _this execVM "cashIcon.sqf"; class controls { class CashDisplayControl { idc = 101; type = 0; style = 0; x = safeZoneXAbs + 1.25; y = safeZoneY - 0.2; w = 1; h = 1; font = "EtelkaNarrowMediumPro"; sizeEx = 0.05; colorBackground[] = {0,0,0,0}; colorText[] = {0,0.6,0,1}; text = "$"; }; }; }; }; cashIcon.sqf: [] spawn { while{true} do { ((findDisplay 101) displayCtrl 101) ctrlSetText "Mmmmmoney"; sleep 0.5; }; }; The "$" correctly displays because of the init.sqf, but nothing else (not even the "Mmmmmoney" part). I'm sure there's something really simple I've got wrong here, but I can't seem to figure it out :/ Is "cashIcon.sqf" a smart way of executing this?
  8. complacent_lizard

    cutRsc and Updating Variables

    Thanks for the advice Arkensor, much appreciated! I've been looking at crtlSetText, and had a feeling that was what I needed to learn. Just to clarify, if I use ((findDisplay) displayCtrl 101) ctrlSetText "Mmmmmoney"; in a separate script that loop/updates, do I need to change the idc to 101 for a particular reason? Or can I leave the rscTitle idc = -1 and use that in my update script? Also, what is the most efficient method for running a script that loops in SP, considering that this variable needs to be basically up to date all the time? I also noticed that "[...]control inside controls group having -1 IDC currently cannot be returned in any way." So it makes me wonder if using the generic "-1" for my idc was a stupid choice :/
  9. Hello! Last time I had an issue the BI community came to my aid, and I know how useful these forums are for everyone else, so here goes... I'm displaying a money variable for the player by using an RscTitle in the top left of the screen - that's all good. The problem is I'm not sure how to go about displaying a variable in that RscTitle that updates so that the amount of "money" the player has is displayed at all times. Here's my description.ext: class RscTitles { class CashDisplayTitle { idd = -1; duration = 1e+1000; class controls { class CashDisplayControl { idc = -1; type = 0; style = 0; x = safeZoneXAbs; y = safeZoneY - 0.45; w = 1; h = 1; font = "EtelkaNarrowMediumPro"; sizeEx = 0.05; colorBackground[] = {0,0,0,0}; colorText[] = {0,0.6,0,1}; text = "$"; }; }; }; }; So I've got 2 minor obstacles - how can I display the cashVariable in my CashDisplayControl, and how can I set up a script which updates that value? If you've got any pointers / links, I'd very much appreciate it! (I have read around, but the examples I've found are very case specific and get a little convoluted) Thanks for reading and for being an outstanding community!
  10. complacent_lizard

    SP Money System

    Cheers Grumpy Old Man! Thanks a lot for your help! I think I've got a grasp of the whole variables thing now, and I suppose you're right about the dialogs! I think I'll stick to hints for now ;)
  11. complacent_lizard

    SP Money System

    Hi! I'll cut to the chase! I'm creating a single player sandbox scenario where I'd like to include a "money system" which allows the player to purchase certain weapons or clothing items after either having money added or subtracted as a result of completing / failing a task. I'd like not only to offer the Arma 3 community a cool scenario, but also a script framework for a SP money system, that other players can use in the future to save time! Trouble is, my scripting ability currently sits somewhere between novice and intermediate; seeing as this is a complex project requiring knowledge of dialogs (for GUIs) as well as scripting variables, I was hoping that you could share the best tutorials, tips and pointers relating to establishing variables for a scenario as well as interactive GUI menus called through an external script! (Also, I have read a number of other threads, and tried out some other player's scripts - believe me, reaching out like this is a last resort!) Thanks for reading, and I hope you can just quickly send some advice my way, and for future readers! Cheers :)
×