IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Removing the "This upgrade has been purchased" message on upgrades that was already purchased
nikitazero678
post 18 May 2015, 13:51
Post #1



Group Icon

Group: Members
Posts: 162
Joined: 11 July 2014
From: Bandung, Indonesia
Member No.: 10536



As the title suggest, I just want to know how it can be done like in ROTR for the development of my ShockWave fan patch.
Go to the top of the page
 
+Quote Post
SiR Chaff
post 18 May 2015, 16:02
Post #2


umu
Group Icon

Group: Members
Posts: 322
Joined: 17 October 2014
From: Water Mexico
Member No.: 10691
No more.



Its easy. Just add "PurchasedLabel = X" line inside the upgrade command button, with X being the same tooltip entry from the "DescriptLabel" line

To better illustrate it, here's both the codes for the upgrade button for the USA Chemical Suits upgrade from ZH and ROTR.

ZH Code:

CODE
CommandButton Command_UpgradeAmericaChemicalSuits
  Command       = PLAYER_UPGRADE
  Upgrade       = Upgrade_AmericaChemicalSuits
  TextLabel     = CONTROLBAR:UpgradeAmericaChemicalSuits
  ButtonImage   = SAChemsuit
  ButtonBorderType        = UPGRADE; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:TooltipUSAUpgradeChemicalSuits
End


ROTR Code:

CODE
CommandButton Command_UpgradeAmericaChemicalSuits
  Command       = PLAYER_UPGRADE
  UnitSpecificSound = MoneyWithdraw
  Upgrade       = Upgrade_AmericaChemicalSuits
  TextLabel     = CONTROLBAR:UpgradeAmericaChemicalSuits
  ButtonImage   = SSChemSuits
  ButtonBorderType        = UPGRADE; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:TooltipUSAUpgradeChemicalSuits
  PurchasedLabel           = CONTROLBAR:TooltipUSAUpgradeChemicalSuits
End


That should do it.

This post has been edited by SiR Chaff: 18 May 2015, 16:03
Go to the top of the page
 
+Quote Post
nikitazero678
post 20 May 2015, 5:43
Post #3



Group Icon

Group: Members
Posts: 162
Joined: 11 July 2014
From: Bandung, Indonesia
Member No.: 10536



It worked like a charm. Thanks for the info.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 24 April 2024 - 12:56