Jump to content

Search the Community

Showing results for tags 'rscactivetext'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Arma Reforger
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics
  • Exilemod (Unofficial)'s General Discussion
  • Exilemod (Unofficial)'s Scripts
  • Exilemod (Unofficial)'s Addons
  • Exilemod (Unofficial)'s Problems & Bugs
  • Exilemod (Unofficial)'s Exilemod Tweaks
  • Exilemod (Unofficial)'s Promotion
  • Exilemod (Unofficial)'s Maps - Mission Files
  • TKO's Weferlingen
  • TKO's Green Sea
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • TKO's Cam Lao Nam
  • MSOF A3 Wasteland's Server Game Play Features
  • MSOF A3 Wasteland's Problems & Bugs
  • MSOF A3 Wasteland's Maps in Rotation
  • SOS GAMING's Server
  • SOS GAMING's News on Server
  • SOS GAMING's Regeln / Rules
  • SOS GAMING's Ghost-Town-Team
  • SOS GAMING's Steuerung / Keys
  • SOS GAMING's Div. Infos
  • SOS GAMING's Small Talk
  • NAMC's Topics
  • NTC's New Members
  • NTC's Enlisted Members
  • The STATE's Topics
  • CREATEANDGENERATION's Intoduction
  • CREATEANDGENERATION's HAVEN EMPIRE (NEW CREATORS COMMUNITY)
  • HavenEmpire Gaming community's HavenEmpire Gaming community
  • Polska_Rodzina's Polska_Rodzina-ARGO
  • Carrier command tips and tricks's Tips and tricks
  • Carrier command tips and tricks's Talk about carrier command
  • ItzChaos's Community's Socials
  • Photography club of Arma 3's Epic photos
  • Photography club of Arma 3's Team pics
  • Photography club of Arma 3's Vehicle pics
  • Photography club of Arma 3's Other
  • Spartan Gamers DayZ's Baneados del Servidor
  • Warriors Waging War's Vigor
  • Tales of the Republic's Republic News
  • Operazioni Arma Italia's CHI SIAMO
  • [GER] HUSKY-GAMING.CC / Roleplay at its best!'s Starte deine Reise noch heute!
  • empire brotherhood occult +2349082603448's empire money +2349082603448
  • NET88's Twitter

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 1 result

  1. Hey guys, I've just registered so, many greets to you all:D Allright, here's the idea: Last night I was bored and played some Tropico, then I thought: How about implementing some small economy to the different locations like the lumberjack camps or banana plantations on Tanoa to hire some guys to work for your Team and earn some money with it. It could lead to a persistent rebell mission where you have to buy new weapons and stuff and defend your economy against the local government or something, don't know exactly, just been playing around, but here is my point: I have set up a first dialog that opens at a laptop at the plantation office like this: If you klick on the different inactive buttons (in fact these are pictures, but I will call them buttons from here on), the script will hire some workers, pay them as you want and you will need some trucks to move the stuff your guys harvestet. Example: If no budget button is active, they all have transparency 0.2. If you just hover over it, transparency is set to 1 to indicate to the player that he can click something. In the case of no active buttons, if player for example clicks on budget button #3, all buttons left from #3 including #3 will switch to active, color transparency changes from 0.2 to 1, colorActive transparency switches from 1 to 0.2. Now you are paying some money, right;D If player now clicks on maybe button #2, buttons #2 and #3 will "deactivate" and change transparency back again. Everything is working fine so far, you get the idea, right? So here are the problems, finally: I need a method that allows me to create just one class (inside controls in dialog.hpp) for the "budget buttons", one for the "worker buttons" and just one for "trucks buttons", wich I can access dynamically via some script to set their position and transparency. Right now, every single button has its own class, so just for this dialog i needed to write 17 classes RscActiveText. I did this because I needed to change the transparency of "color[] = ...." and "colorActive[]=..." every time you click on a button and for this I declared three unique variables for every button, makes 51 global variables in total just to change transparency. First one to let the script know if the button is already clicked, and the two other ones to change the transparency of color and colorActive back and forth, depending on the state of the button. Heres a little summary of a part of the dialog.hpp and the script activated by clicking the buttons. The 51 global variables (and more) ar predefined after init. dialog.hpp: class budg_bttn1: RscActiveText { idc = 1601; text = "pics\moneyPile.paa"; x = 0.840312 * safezoneW + safezoneX; y = 0.258 * safezoneH + safezoneY; w = 0.0154688 * safezoneW; h = 0.022 * safezoneH; color[] = {1, 1, 1, missionNamespace getVariable "bttn_col1"}; //global variable#1 for transparency colorActive[] = {1, 1, 1, missionNamespace getVariable "bttn_actCol1"}; //global variable#2 for transparency onMouseButtonClick = "[_this] execVM 'oumere_plantations\moneyBttns.sqf';"; }; class budg_bttn2: RscActiveText { idc = 1602; text = "pics\moneyPile.paa"; x = 0.87125 * safezoneW + safezoneX; y = 0.258 * safezoneH + safezoneY; w = 0.0154688 * safezoneW; h = 0.022 * safezoneH; color[] = {1, 1, 1, missionNamespace getVariable 'bttn_Col2'}; colorActive[] = {1, 1, 1, missionNamespace getVariable 'bttn_actCol2'}; onMouseButtonClick = "[_this] execVM 'oumere_plantations\moneyBttns.sqf';"; }; class budg_bttn3: RscActiveText { idc = 1603; text = "pics\moneyPile.paa"; x = 0.902187 * safezoneW + safezoneX; y = 0.258 * safezoneH + safezoneY; w = 0.0154688 * safezoneW; h = 0.022 * safezoneH; color[] = {1, 1, 1, missionNamespace getVariable 'bttn_Col3'}; colorActive[] = {1, 1, 1, missionNamespace getVariable 'bttn_actCol3'}; onMouseButtonClick = "[_this] execVM 'oumere_plantations\moneyBttns.sqf';"; //..........etc. etc. moneyBttns.sqf: disableSerialization; _display = findDisplay 5000; _control = (_this select 0) select 0; _controls = [_display displayCtrl 1601, _display displayCtrl 1602, _display displayCtrl 1603, _display displayCtrl 1604, _display displayCtrl 1605]; //_activeButtons = []; //_inacitveButtons = []; switch (ctrlIDC _control) do { case 1601: //checks wich button is clicked on { switch (bttn_active1) do //checks, if button is already active. bttn_active1 switches between 0 and 1 { case 0: { missionNamespace setVariable ["plantationIndex", 1, true]; //plantationIndex tells how many buttons are active in total missionNamespace setVariable [format ["bttn_active%1", 1], 1, true];//sets the buttons active state missionNamespace setVariable [format ["bttn_Col%1", 1], 1, true];//changing of transparency, in this case, button will.. missionNamespace setVariable [format ["bttn_actCol%1", 1], 0.2, true];//...appear with transp. if you hover over it (_controls select 0) ctrlSetTextColor [1,1,1, bttn_Col1];//sending transparency state to class (_controls select 0) ctrlSetActiveColor [1,1,1, bttn_actCol1]; if (debug) then {systemChat format ["PlantationIndex = %1", plantationIndex];}; }; case 1: { plantationIndex = 0; missionNamespace setVariable [format ["bttn_active%1", 1], 0, true]; missionNamespace setVariable [format ["bttn_Col%1", 1], 0.2, true]; missionNamespace setVariable [format ["bttn_actCol%1", 1],1, true]; (_controls select 0) ctrlSetTextColor [1,1,1, bttn_Col1]; (_controls select 0) ctrlSetActiveColor [1,1,1, bttn_actCol1]; for "_i" from 1 to 5 do { missionNamespace setVariable [format ["bttn_active%1", _i], 0, true]; missionNamespace setVariable [format ["bttn_Col%1", _i], 0.2, true]; missionNamespace setVariable [format ["bttn_actCol%1", _i], 1, true]; (_controls select (_i-1)) ctrlSetActiveColor [1,1,1, call compile format ["bttn_actCol%1", _i]]; (_controls select (_i-1)) ctrlSetTextColor [1,1,1, call compile format ["bttn_Col%1", _i]]; }; if (debug) then {systemChat format ["PlantationIndex = %1", plantationIndex];}; }; }; }; case 1602: { switch (bttn_active2) do { case 0: { plantationIndex = 2; for "_i" from 1 to 2 do { missionNamespace setVariable [format ["bttn_active%1", _i], 1, true]; missionNamespace setVariable [format ["bttn_Col%1", _i], 1, true]; missionNamespace setVariable [format ["bttn_actCol%1", _i], 0.2, true]; (_controls select (_i-1)) ctrlSetActiveColor [1,1,1, call compile format ["bttn_actCol%1", _i]]; (_controls select (_i-1)) ctrlSetTextColor [1,1,1, call compile format ["bttn_Col%1", _i]]; }; if (debug) then {systemChat format ["PlantationIndex = %1", plantationIndex];}; }; case 1: { plantationIndex = 1; for "_i" from 2 to 5 do { missionNamespace setVariable [format ["bttn_active%1", _i], 0, true]; missionNamespace setVariable [format ["bttn_Col%1", _i], 0.2, true]; missionNamespace setVariable [format ["bttn_actCol%1", _i], 1, true]; (_controls select (_i-1)) ctrlSetActiveColor [1,1,1, call compile format ["bttn_actCol%1", _i]]; (_controls select (_i-1)) ctrlSetTextColor [1,1,1, call compile format ["bttn_Col%1", _i]]; }; if (debug) then {systemChat format ["PlantationIndex = %1", plantationIndex];}; }; }; }; case 1603: { switch (bttn_active3) do { case 0: { plantationIndex = 3; for "_i" from 1 to 3 do { missionNamespace setVariable [format ["bttn_active%1", _i], 1, true]; missionNamespace setVariable [format ["bttn_Col%1", _i], 1, true]; missionNamespace setVariable [format ["bttn_actCol%1", _i], 0.2, true]; (_controls select (_i-1)) ctrlSetActiveColor [1,1,1, call compile format ["bttn_actCol%1", _i]]; (_controls select (_i-1)) ctrlSetTextColor [1,1,1, call compile format ["bttn_Col%1", _i]]; }; if (debug) then {systemChat format ["PlantationIndex = %1", plantationIndex];}; }; case 1: { plantationIndex = 2; for "_i" from 3 to 5 do { missionNamespace setVariable [format ["bttn_active%1", _i], 0, true]; missionNamespace setVariable [format ["bttn_Col%1", _i], 0.2, true]; missionNamespace setVariable [format ["bttn_actCol%1", _i], 1, true]; (_controls select (_i-1)) ctrlSetActiveColor [1,1,1, call compile format ["bttn_actCol%1", _i]]; (_controls select (_i-1)) ctrlSetTextColor [1,1,1, call compile format ["bttn_Col%1", _i]]; }; if (debug) then {systemChat format ["PlantationIndex = %1", plantationIndex];}; }; }; };//....etc.etc. So, can someone imagine a better practice to solve this idea? As you can imagine, if I want to create more businesses on the island, I need to write a huge amount of classes and variables for every location. The problem is, that If I just use one class using the same global vars for the budget buttons, all buttons change transparency even when I just click a single one. I don't really unserstand how to refer between classes and variables using uiNamespace, maybe there's a solution in there? I hope I explained this one well enough and any help is highly appreciatet. Greets from Germany;D
×