Jump to content


Photo

problem with spell book commandset


  • Please log in to reply
11 replies to this topic

#1 Bart

Bart

  • Network Admins
  • 8,524 posts
  • Location:The Netherlands
  • Division:Revora
  • Job:Network Leader

Posted 26 October 2006 - 09:33 PM

i'm trying to add 2 upgrade buttons to the spell book commandset (on the left). see code below. the problem is that the level 3 button shows up (though, correctly, disabled), but the level 2 button doesn't

who can help me?

thanks in advance :dry:

commandbuttons:
CommandButton Command_PurchaseTechLevel2	Command				= PLAYER_UPGRADE	Options				= CANCELABLE HIDE_WHILE_DISABLED	Upgrade				= Upgrade_TechLevel2	TextLabel			= CONTROLBAR:PurchaseTechLevel2	ButtonImage			= BITechLevel2	ButtonBorderType		= UPGRADE	DescriptLabel			= CONTROLBAR:ToolTipPurchaseTechLevel2	Radial			= Yes	InPalantir		= No	DisableOnModelCondition = USER_20EndCommandButton Command_PurchaseTechLevel3	Command				= PLAYER_UPGRADE	Options				= CANCELABLE NEED_UPGRADE HIDE_WHILE_DISABLED	NeededUpgrade		= Upgrade_TechLevel2	Upgrade				= Upgrade_TechLevel3	TextLabel			= CONTROLBAR:PurchaseTechLevel3	ButtonImage			= BITechLevel3	ButtonBorderType		= UPGRADE	DescriptLabel			= CONTROLBAR:ToolTipPurchaseTechLevel3	Radial			= Yes	InPalantir		= No	DisableOnModelCondition = USER_21End;---------------------------------CommandButton Command_PurchaseTechLevel2SpellBook	Command				= SPELL_BOOK	Options				= CANCELABLE HIDE_WHILE_DISABLED	TextLabel			= CONTROLBAR:PurchaseTechLevel2	ButtonImage			= BITechLevel2	ButtonBorderType		= UPGRADE	DescriptLabel			= CONTROLBAR:ToolTipPurchaseTechLevel2	DisableOnModelCondition = USER_20	CommandTrigger		= Command_PurchaseTechLevel2EndCommandButton Command_PurchaseTechLevel3SpellBook	Command				= SPELL_BOOK	Options				= CANCELABLE NEED_UPGRADE HIDE_WHILE_DISABLED	NeededUpgrade		= Upgrade_TechLevel2	TextLabel			= CONTROLBAR:PurchaseTechLevel3	ButtonImage			= BITechLevel3	ButtonBorderType		= UPGRADE	DescriptLabel			= CONTROLBAR:ToolTipPurchaseTechLevel3	DisableOnModelCondition = USER_21	CommandTrigger		= Command_PurchaseTechLevel3End

commandset:
CommandSet MenSpellBookCommandSet
	1 = Command_PurchaseTechLevel2SpellBook
	2 = Command_PurchaseTechLevel3SpellBook
	
	...
End

Edited by 2playgames, 26 October 2006 - 09:34 PM.

bartvh | Join me, make your signature small!
Einstein: "We can’t solve problems by using the same kind of thinking we used when we created them."

#2 Kelso

Kelso

    BFME Admin

  • Project Team
  • 1,467 posts
  • Projects:Rise of Rome, Rise of Rome 2
  •  AWD and T3A Team Chamber Leader
  • Division:BFME
  • Job:Designer: Rise of Rome 1 and 2

Posted 26 October 2006 - 11:06 PM

Um....there needs to be some kind of upgrade to make the level2 button show up. HIDE_WHILE_DISABLED means that an upgrade will enable it. You have no upgrade present.
Posted Image
Posted Image

#3 Bart

Bart

  • Network Admins
  • 8,524 posts
  • Location:The Netherlands
  • Division:Revora
  • Job:Network Leader

Posted 26 October 2006 - 11:46 PM

but it doesn't need an upgrade, so it's not disabled

i've used these buttons in the fortress commandset and they were perfectly fine there
bartvh | Join me, make your signature small!
Einstein: "We can’t solve problems by using the same kind of thinking we used when we created them."

#4 Mr-And3rs0n

Mr-And3rs0n
  • Members
  • 30 posts
  • Location:UK
  • Projects:(TC)Urban Wars, (TC) (TBA)

Posted 27 October 2006 - 01:02 PM

i reckon u dont need to hide or disable level2, since u prolly have lv1, and need to see lv2 to get it

#5 Bart

Bart

  • Network Admins
  • 8,524 posts
  • Location:The Netherlands
  • Division:Revora
  • Job:Network Leader

Posted 27 October 2006 - 01:23 PM

the button for level 2 will be disabled when it has been bought (hence the DisabledOnModelCondition property). however, hiding buttons won't work in anything other than the radial commandsets, so it doesn't really matter here
bartvh | Join me, make your signature small!
Einstein: "We can’t solve problems by using the same kind of thinking we used when we created them."

#6 Mr-And3rs0n

Mr-And3rs0n
  • Members
  • 30 posts
  • Location:UK
  • Projects:(TC)Urban Wars, (TC) (TBA)

Posted 27 October 2006 - 01:35 PM

..ah.. tidy, i like it
is the button image ok, possibly the button is fine, just not the art... but u say it works fine in a building, hmm
maybe beyond me, sorry

#7 Bart

Bart

  • Network Admins
  • 8,524 posts
  • Location:The Netherlands
  • Division:Revora
  • Job:Network Leader

Posted 27 October 2006 - 01:45 PM

huh? this is even weirder. when i upgrade to level 2 with the old button in the fortress, the level 3 button on the left disappears too
bartvh | Join me, make your signature small!
Einstein: "We can’t solve problems by using the same kind of thinking we used when we created them."

#8 Mr-And3rs0n

Mr-And3rs0n
  • Members
  • 30 posts
  • Location:UK
  • Projects:(TC)Urban Wars, (TC) (TBA)

Posted 27 October 2006 - 01:50 PM

im prolbably way off, but i am guessing the 1st 2 buttons wont be shown anywhere, since they are activated by the spellbook buttons.
Maybe they should always be ready for activation, try taking out your disables for just the player_upgrades

#9 Kelso

Kelso

    BFME Admin

  • Project Team
  • 1,467 posts
  • Projects:Rise of Rome, Rise of Rome 2
  •  AWD and T3A Team Chamber Leader
  • Division:BFME
  • Job:Designer: Rise of Rome 1 and 2

Posted 27 October 2006 - 09:41 PM

Are you trying to upgrade the commandset for the spellbook commandset? Dunno if it can work that way.
Posted Image
Posted Image

#10 Bart

Bart

  • Network Admins
  • 8,524 posts
  • Location:The Netherlands
  • Division:Revora
  • Job:Network Leader

Posted 27 October 2006 - 10:28 PM

Are you trying to upgrade the commandset for the spellbook commandset?

no. where'd you get that idea? :D
bartvh | Join me, make your signature small!
Einstein: "We can’t solve problems by using the same kind of thinking we used when we created them."

#11 Phil

Phil

    Force Majeure

  • Network Leaders
  • 7,971 posts
  • Location:Switzerland
  • Projects:Revora, C&C:Online
  •  Thought Police
  • Division:Revora
  • Job:Network Leader
  • Donated
  • Association

Posted 27 October 2006 - 10:31 PM

How about another approach: use a power to set a certain modelcondition and use lua to give yourself and upgrade (or use an AM)... that way it upgrades but doesn't work with an upgrade button... maybe it's worth a try when everything else fails.

revorapresident.jpg
My Political Compass

Sieben Elefanten hatte Herr Dschin
Und da war dann noch der achte.
Sieben waren wild und der achte war zahm
Und der achte war's, der sie bewachte.


#12 Bart

Bart

  • Network Admins
  • 8,524 posts
  • Location:The Netherlands
  • Division:Revora
  • Job:Network Leader

Posted 27 October 2006 - 10:40 PM

i thought about using a power button (only without lua but using a commandtrigger), but that's not a good way because of the cost thing

edit: oh never mind, i just realised that's true for this way also.. guess i'll just need to give up on this

Edited by 2playgames, 27 October 2006 - 10:42 PM.

bartvh | Join me, make your signature small!
Einstein: "We can’t solve problems by using the same kind of thinking we used when we created them."




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users