code mode - get Game Attributes

For Stencyl 2.x 
get Game attributes in code mode

boolean - getGameAttribute("") as Boolean
list - getGameAttribute("") as Array 
number -getGameAttribute("") as Number
text- getGameAttribute("") as String 

Example: g.setFontColor(Util.RGBToHex((getGameAttribure("colorPower1") as Number),(getGameAttribute("colorPower3") as Number),(getGameAttribute("colorPower2") as Number)));

source: add game attribute into a blank then see preview code

For Stencyl 4.0 or later
Engine.engine.getGameAttribute("your game attribute");

No comments:

Post a Comment