Textfield3 upgrade

squeeb

  • Posts: 1617
i am using this behavior from forge..Textfield3  upgrade..search textfield.. and you can find it.. says attach to actor.. and set attributes..  what attributes need to be set and what type are they?

mdotedot

  • Posts: 1654
The upgrade is based on one of my TextField behaviors.

the Attributes are supplied with you when you attach the behavior to an actor:
* Background color
* theFont (Create a font beforehand)
* isPassword (if you want * instead of text showing)

Setting the value: [set actor value [Value] for [Actor] to [YOUR_VALUE] ]
Getting the value: [get actor value [Value] for [Actor] ]
Use for instance in combination with a [ for each [actor of type] [ActorType] ]

Hope this helps.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

squeeb

  • Posts: 1617
i appreciate the help!! i am close to getting it to work i think.. would you be able to give me  a simple example stencyl file with it working so i can see how its done?

mdotedot

  • Posts: 1654
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

squeeb

  • Posts: 1617
perfect!! thank you.. i got it working :)  ill post again if i run into trouble using it

squeeb

  • Posts: 1617
haha.. and another question..
i need to get what was typed in the box and do logic with it..
"box one" multiplied by "box two" will draw text "answer"..

squeeb

  • Posts: 1617
if i take the "STF_InputValue" and set my text with that attribute.. i see it change.. however i need more boxes.. would i need to duplicate the text field behavior for each input box actor and change the attribute name??

mdotedot

  • Posts: 1654
Don't know for the _upgrade version but for 'regular' textfield you use the [get actor value [Value] for [actor] ] with a for each actor type and you create a box per input.
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

squeeb

  • Posts: 1617
where can i find those at? the upgrade version looks like yours with more features.

mdotedot

  • Posts: 1654
Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

squeeb

  • Posts: 1617
at first i was like why are you pointing me there.. then i realized it was a specific block you said to use.. i thought an attribute from the textfield behavior..
 i got it now.. however i get NaN where the text should draw.. at one point in me trying i got gross to multiply itself....
its in an updating block.. does that matter? i want the text to update after typing

« Last Edit: November 09, 2015, 01:39:08 am by squeeb »