Stencyl: upgrade and downgrade

 introduction: this 2 behavior involve in 2 actor types, 1 for upgrade button and another for downgrade button, but they still share the same game attributes

it was inspired by GemCraft chasing Shadows
 http://armorgames.com/play/15760/gemcraft-chasing-shadows

updated, and this time with a new way to fill the game attribute blank
for upgrade button

1)when created: t
- create the downgrade button and set its stats (this behavior does not apply to the downgrade button), 
- make self always active - to insure that the upgrade button and downgrade button will not disappear when it is half-way off the screen(optional if the scene is no bigger the screen)
 the "when created" event that applies to the upgrade button(above), and downgrade button below:
however, it can be inversely applied, which is the upgrade button will be created below the downgrade button

 bring to front to prevent other upgrades from blocking the info panel
 drawing (applies to both upgrade and downgrade buttons)
- info panel
---with in-game info panel adjustment systems

- info text

inf adjustment and y-text adjustment (applies to both upgrade button and downgrade button)



 upgrade and downgrade
-applies to upgrade button:



-applies to downgrade button:
note: the 0.1 is the cost increment per level



old version::::::::::
upgrade for the upgrade actor:
applies to upgrade actors
then create downgrade actor

downgrade behavior for the downgrade actor:


applies to downgrade actor
legends:
inf width - info panel width
inf height - info panel height

optional event:
- when drawing 

to simplify (it may degrade the quality but it still works as properly as before)
- for the drawing as info panel you can remove the "[]+[[0.5]x[[inf width]-[get text[text]width using current font]]"
- fix the info panel and info text on screen 

if not working properly:
- take note that they both upgrade and downgrade actors shares the same game attributes
- check the game attribute used as currency
- you may re-arange blocks
- both skill effects increment are the same (opposite if both uses + or - the same way) 


One actor type upgrades and down grades

 - one actor type upgrades, 
1 - upper half - click to upgrade
2 - lower half - click to downgrade



if mouse 


* bring self to front not included,
* keeping the info panel within screen not included,
for more on info panels: http://stencyl-nator.blogspot.my/p/stencyl-info-panel.html






No comments:

Post a Comment