Stencyl 3.4.0 is now out. Get it now!

GUI Extension [Unsupported]

mdotedot

  • *
  • Posts: 1224
Hi TwistedIdentity,

Thanks for the feedback.

I have it working, but you need to change the code on different parts of the code.
I would need to catch up on all the nightly builts to create extensions for each of the builts that changes the stuff I'm using.
And since the 3.1 version will be heavy on the graphics stuff that means propably a change every few weeks.

So I won't be making specific nighty-build versions. But I will point out what changed and how to fix it yourself.

1. BitmapAnimation ( Used frequently in GUI.hx)
After the number of frames there are two fields for frames-across and frames down.
In GUI we need 1,1 so one frame across, one frame down. On the line you mention there is a 1,   add 1,1  so it reads 1,1,1 and you are fine. There are lots of different places in the GUI.hx where you have to do the same.

2. Animation
In Animation there is a frame count between durations and framesAcross
Before the Animation line add this:
Code: [Select]
framecount=1;And put that between like this:
Code: [Select]
durations, framecount, framesAcross
Hope that helps.

Best regards from
M.E.

Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

Josenil

  • Posts: 5
I have problem
Thanks if you help me

« Last Edit: April 17, 2014, 10:58:37 am by Josenil »

mdotedot

  • *
  • Posts: 1224
Hello Josenil,

That file you post is almost identical to the demonstration program. It opens and runs without an error.
Please post logs (Debug->Logs->Generate Logs) when running the game to indicate what the problem is.

If you are using the OpenFL version of Stencyl, please follow all the adjustments to the GUI Extension in this thread!

Edit: We spoke on IRC.

This was in the logs:
"Source/scripts/SceneEvents_0.hx:32: characters 7-46 : Class not found : com.eclecticdesignstudio.motion.Actuate"

Please follow advice from this threat: http://community.stencyl.com/index.php/topic,25610.msg147092.html#msg147092

Basically do a Clean project.
The GuiDemo was made with the pre-OpenFL version of Stencyl. I strongly advice you to use only the blocks needed for input if you are trying to get input in your game. Do not open the .stencyl file and try to remove things that you don't need to end up with what you do need.

Steps:
- Create an Actor attribute (inputactor)
And make this 'when created block'


If you want to get the value after the user has entered it use the [for [inputactor] get property [value] ] block

Hope this helps.

Best regards from
M.E.

« Last Edit: April 17, 2014, 11:27:56 am by mdotedot »
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

mdotedot

  • *
  • Posts: 1224
Hello,

Due to popular demand, I created a behavior for Text Input.
It is in Stencyl Forge. Search for TextField

Only for 3.1 users as the behavior uses the Image API!

You don't need this extension to use the behavior, only Stencyl 3.1!

Best regards from
M.E.
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

ertandert

  • Posts: 3
I'm having some trouble currently whenever I switch to a scene with a "Create Actor" block. I have a "set inputactor to Create Actor" and a "For input actor create TextField" block in my "When created" event which works perfectly fine when I run the scene for the first time.

However, when I come back to that scene, I get a "TypeError: Error #1009: Cannot access a property or method of a null object reference.". Any ideas what might be causing this?

The stencyl log shows
[LOG] [Flash] GUI#createActor(98): [Extension: GUI]   CreateActor:(Actor3) exists, so returning that one!
[LOG] [Flash] GUI#setWidthHeight(319): Image is null: create image!

Thanks for the help!

mdotedot

  • *
  • Posts: 1224
Hello Ertandert,

Indeed, switching scenes will make the created actor invalid.
If you are looking just for input I would advice the TextField behavior from StencylForge which I created using the 3.1 version.
For 3.0 you could use the TextInput behavior.
You could workaround it using one scene and use boolean attributes to define what to show and what not to show.

Hope this helps a bit!

Best regards from
M.E.

Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

ertandert

  • Posts: 3
Thanks for the quick response!

I'll see what I can do.

filsdd

  • *
  • Posts: 71
Hi,

I cant find the behavior "TextField" on Forge. I'm using 3.1 and tried searching for many words. I just found the other behavior, TextInput.

Thanks. :]

mdotedot

  • *
  • Posts: 1224
Hi Filsdd,

The reason you couldn't find it, is that I made it private. It only works on 3.1 which isn't public and it is fairly easy to create.

I enabled it again so you should find it. Usually you attach the behavior to a transparent actor and set the values of the behavior. Good luck.

Best regards from
M.E.
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/

monica89

  • Posts: 11
Hi mdotedot,
Got a bit of a n00b question here.
I'm using your textbox and it works great. But i'm wondering if you can help with something. I'm making a quiz game and I'm trying to figure out how to take the user input and see if it matches the correct answer. I assume I just store them as variables.
But I'm not sure how to 'get' what's been typed in the textbox. Will I have to edit your behaviour? Or do I create a new event elsewhere?
Any help would be greatly appreciated.

monica89

  • Posts: 11
Never mind I got it. Thanks for the behaviour btw. It's so easy to use

I think I may be having an issue with this because I exported from 3.2. I am using a text field to enter in an IP address. When I try to run from Xcode I get this error.

Design_79_79_TextField.hx
-Shell Script Invocation error (flash.display.bitmap should be com.stencyl.graphics.bitmapwrapper
-For Function argument 'img'

Any idea what that is?

letmethink

  • *
  • Posts: 2530
Presumably something to do with flash.bitmap.display is obsolete with 3.2 and has been replaced with com.stencyl.graphics.bitmapwrapper and you should replace any entries with that.
~Letmethink

Presumably something to do with flash.bitmap.display is obsolete with 3.2 and has been replaced with com.stencyl.graphics.bitmapwrapper and you should replace any entries with that.

Great, is this something that could potentially be fixed with a find and replace?

mdotedot

  • *
  • Posts: 1224
Hello TheCloudMediaGroup,

The extension became obsolete since Stencyl 3.1. All that you need is in the Image API and with regular blocks from Stencyl.
Since this extension taps right into the core engine there might be lots of places that you have to find the new code. This happened twice already with newer builds. That is why it is obsolete.

I was trying to suggest the stencylForge behavior TextField and ListBox but apparently there is still some code used in these behaviors that prevent them to be used in the 3.2 version. That comes from using internal Stencyl functions!

Maybe that I'm looking into it at a later time to create a non-code version of the behaviors, but at this moment I have too many things on my plate!


Best regards from
M.E.

« Last Edit: November 20, 2014, 10:46:09 pm by mdotedot »
Best regards from
M.E.
Hanging out in the Chat:  http://www.stencyl.com/chat/