Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - bernard

Pages: 1 2
Ask a Question / Android SDK already installed...why again in Stencyl?
« on: February 09, 2015, 08:24:56 pm »
I already have the complete SDK for Android installed on my computer and is being used by other apps like AppInventor2 and Android Studio, to compile APK's.
Do I really have to install another version just for Stencyl?

Most apps have a setting where I can just point my app to where the SDK is already installed and it will download only the missing files and use this location in future. I don't really want to have multiple versions of the huge SDK so is this an option I can use?

Ask a Question / Where are the sample games in Stencyl 3
« on: February 22, 2014, 07:25:32 pm »
I d/l and installed the latest version of Stencyl 3.0 but when I started it, there were no sample games like in Stencyl 2.
Are there samples somewhere or do I have to open each version 2.2 game in Stencyl 3 first and save?

Ask a Question / Trying out Custom Terrain Collisions
« on: July 18, 2013, 11:08:45 pm »

I recently read about using Custom Terrain Collisions in Stencly.

So to test these out I created a Web only game and in the scene editor I could right click on the "Add Terrain" button and a menu popped up to add a Box, circle and polygon. So far everything is fine.
See image3,jpg attached

Next I created a new Web+Mobile game and tried the same thing. However only the Box and Circle Custom Terrain was available. No Polygon.
See image2.jpg attached

Is this a bug or is this described somewhere because I searched thru the Stencylpedia as well as the forums and could find nothing about there being NO Polygon Custom Terrain for Mobile+Web games and this being only available for Web games exclusively.

All I found in Stencylpedia was this:
see image41.jpg attached


I am trying to make a sort of hidden image game and have crated a 640x480 Web game.
I added a background which is exactly 640x480 pixels.
I created a scene and accepted all defaults and added the above background to the scene. I then clicked the "Show Background" button and the background is shown.

See Image1.jpg

I want to precisely place an actor on the scene at the bottom right so I need to Zoom in there. In the Scene Editor I click the Zoom (+ Magnify) icon and Stencyl Editor shows me a Transparent Rectangle for where I want to Zoom.

See Image2.jpg

I click the mouse to Zoom and the area is Zoomed, but the Background has moved and is showing the Top-Left so I cannot place the Actor precisely where I want it in the Bottom Left. Only way is to Zoom out but placement is then not precise.

See Image3.jpg

Is this a bug in the Scene Editor or is there any way I can Zoom in to the Bottom Right while still showing the background in the correct place so that I can place an actor precisely?


I want to know if it is at all possible to read an actor animation from disk at runtime.

I have created an actor and an animation for it. I can add the actor to a scene but it appears as a "!" in a white triangle surrounded by red. At runtime nothing is displayed.

I want to know if I can do this and at runtime read a .PNG from disk and assign it as the animation frame for the actor.

Is it possible to use this block to set the frame for an Actors animation. [See attached image]. The documentation is not clear as to how to use this:

 Set Actor Value


Actor values are like attributes that are specific to a type of actor and not just a Behavior. This block sets the actor value to the specified data, which can be anything (a number, text, other data types, etc).


I am attempting a Tower defense game and this game has sprite turrets that rotate and then fire in range. Some of these turrets use a sprite sheet which when imported into stencyl have 32 frames.

On the import dialogs, when first creating the sprite, I cannot see cany way to change the default duration from 100ms to something else - say 30ms.

Only after the Actor is created, the only way I have found is to edit every frame and change the Duration individually. This becomes tedious after a while, having to edit each frame.

Another way I found was to open the data.xml in the resources folder and manually search& replace the instances there like this:




but in a large game with many sprites even this becomes tedious and could lead to errors.

So is there a built in way to change this duration for each sprite at the time the actor is created?


I came across this problem when trying to make a Level Select for a game.

As you know it is not always possible to get images that are scaled to the correct game size in relation to the other images/Actors. So in the Game Editor Stencyl allows us to scale the images to attain the proper scale in relation to other actors.

In this scene I have imported an image of size 321x360 and its collision shape is shown in attached image(image1.jpg)

In the scene editor I have added an actor at its imported original size and also another same actor but this has been resized to .3 of the original. See attached image (image2.jpg)

However what I noticed is that at runtime, the collision bounds for the smaller resized actor remains the same - i.e. its collision bounds remain at 321x360. I see this when I attach the built-in "Debug" behaviour. This is seen in attached (image3.jpg)

While this is not such a problem because most Actors are usually the same size, the problem is in determining the actual size of the resized image to set the collision bounds correctly.

The main problem stems from the fact that in the scene editor if you resize your actor, the collision editor does not know the resized Actor size and therefore setting an accurate collision shape is almost impossible. This is also because the Scene Editor uses a percentage to resize e.g. it uses Scaling so since I have scaled the actor to .3 of the original size, I have no way of knowing it's current resized dimensions.

The collision Editor only allows sizing the bounds by pixels and the Scene editor only allows "scaling" by a certain amount.

These 2 different methods of sizing are the root cause of the problem, and I have found no way to accurately create an accurate collision bounds box for a resized actor.

The attached image(image2.jpg) is only for reference. The problem can be seen here where ALL actors have been resized to the same size.(image4.jpg)

When the game is run the Collision bounds can be see to overlap and to remain at the original size, causing problems with collisions and clicks.(image5.jpg)

This is also a gotcha of sorts where you expect your collision bounds to resize to the same scale as the actor has been resized, but they remain the same. This makes the resizing of Actors in the Stencyl Editor redundant because accurate collisions cannot be made and accurate collision bounds cannot be created easily without much trial and error and using the debug to test at runtime.

IMHO, the intuitive way would be that Stencyl also resizes the collision bounds of an actor when it is resized in the editor and make different collision bounds an exception that can be changed in the "Customize" section of an individual actor.

If anyone has a way around this problem please let me know.

Ask a Question / How do I access the attributes like ID of an Actor
« on: June 06, 2012, 10:45:14 pm »
I am trying to make a Level Select Scene by following the tutorial here:

The actor used for clicking on is the same actor which has a behaviour that when clicked, the scene should change.

The author says to place a number of the SAME actor's on the scene and then to change the Attributes of each actor from the scene as in this screen:

However in Stencyl 2.1 which I have, Rt. clicking does not show the "Customize Behavior..." menu item so I cannot change the scene attributes for each actor individually.

All I can change is the Attributes for the Actor and I get a screen like the attached image below in Image2.jpg

How is this possible in Stencyl 2.1?

Also as per the attached image below(Image1.jpg) , in the scene editor, clicking an individual Actor, shows some other attributes like

LevelIcon  15 (ID:15) and it's x and y position. How do I access these attributes in a behavior using blocks?

Ask a Question / Where fo I find the "the actor" block?
« on: May 28, 2012, 08:18:39 pm »
I am following a tutorial where I need to add a "the actor" block.

Please see the attached image for number reference for the behavior I am creating.

1. This is the final behavior to be created. Note that the Actor Kill block is used and a "the actor" block added.

2. I was only able to find the "kill self" block under actors.

3. I can only change this to "kill actor" by choosing the Attribute and selecting "actor"

4. This is the block that I need. I have dragged it out from the "when" above to duplicate it.
However when I Rt. Click on it and select "Find in Palette" nothing happens and it is not found.
Rt. Click and "View Help" also is of no use.

5. This is the final block with the duplicated "the actor" added to the actor "kill" block

My question is:

Is there such a block as "the actor" - 4 in image) in the palette or is it the same as the "kill self" (2 in image) block? Can I use the "kill self" block found in the palette changing it to "kill actor" (3 in image) or is this "the actor" (4 in image) block missing from the palette?


There is an annoying bug in the Stencly "About" window in the windows version.

To experience it, start up Stencyl and from the menu select Help-> About Stencyl. The Stencyl splash screen appears with the logo and version etc.

Now click anywhere on the Main Stencyl window (not on the About window) and the About window disappears(it actually goes behing the main window). However you now cannot click on anything in the Stencly main window and clicking anywhere just beeps. The only way out of this is to re- activate the Stencil window from the task bar, whereupon the About window re-appears and you now need to click on it to make it disappear.

This is NOT normal behavior for a window. The About Dialog is Modal and should remain on top of the main window, even if clicking away.

The correct behavior that should be implemented when the About window is open is:

1. Clicking away on the main window automatically closes the "About" window
2. Or Clicking away on the main window has no effect on the About window - it does NOT go behind the main window but remains on top.

Resolved Questions / How do I get an Actor's Animation?[Solved]
« on: January 26, 2012, 08:44:56 pm »

I have an actor with 10 animations named "Animation 0", "Animation 1", "Animation 2" etc upto "Animation 9"

See attached "Actors.jpg"

When the scene is created I create 10 of these actors and assign each an animation from 0 to 9
so I get 10 actors lined up on the screen, each with a different animation. All that is working fine.

The scene behaviour is as attached "Image1.jpg"

and when I test it it displays as attached "scene.jpg"

I have a Game (global) Attribute called "cButtonAnim"

In the Actor behaviour Always event, I have:

If Mouse was released -> do something -> loop
See attached "image2.jpg"

What I expect to happen is I click on a button and the Animation of that button is assigned to cButtonAnim so it's value becomes "Animation 1" or "Animation 2" or "Animation 3" etc.

However when I click any button cAnimButtom is always set to "Animation 9"

So how do I assign the clicked actor's animation number to the global attribute in this loop?

Old Bugs (1.x/2.x) / Bug in Actor Tweening Behaviour - Slide
« on: December 21, 2011, 09:04:35 pm »
While trying to create a sliding switch I came across this weird error in the Actor Tweening Behaviour.

Basically my behaviour code looks like the attached image - moveredbutton.jpg

If I use "BackIn", "BounceIn" or "StrongIn" as the tween, then for this attached behaviour the red button does not return to the original position when the button is clicked for the second time. The greater the move in the x/y direction the greater the difference.

As shown, when I click the bottom red button, the top red button will move left and down by 50  pixels and when I click again it should return to the exact original position.

This works fine for ALL the other tweens except for the 3 "In" tweens mentioned above.

This is more noticeable the greater the x movement is, so changing the x movement to a larger number (-50,+50)  shows a greater difference only in those 3 tweens.

It is the same problem with those 3 when you change the Y as well.

Attached also is my test project where you can change the tweens and see the queer result.

Please check and fix.


When I create actors for a game, at creation time I may not know what to call it, till after I import the animation.

So I start off by adding an actor and call it Anim1
I then import the animation and before saving and closing the actor I go to the "Properties" tab and give the actor an appropriate name  - Bert1 - and click the "Rename actor" button. The actor tab as well as the actor in the game center shows the new name.

However when I go to create another actor and name this one Anim1 as well, Stencyl says that the name is in use and will not allow it, although I have renamed the other actor and nowhere in Stencyl does an Actor called Anim appear.

I searched the game folder and found a reference to Anim1 in the data.xml file.
Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <sprite atlasID="0" default="0" desc="" height="120" id="1" name="anim1" shared="false" width="100">
        <anim across="5" atlasID="-1" down="1" durations="100,100,100,100,100" height="120" id="0" loop="true" name="Animation 0" numframes="5" originx="50" originy="60" width="500">
            <poly data="4,0,0,100,0,100,120,0,120" density="0.1" fric="0.2" gid="-1000" id="0" name="Animation 0" rest="0.0" sensor="false"/>
    <actor adamp="0.0" ascale="true" atlasID="0" bodytype="2" continuous="true" desc="" fixedrot="false" fric="0.2" gid="3" id="0" ignoreg="false" inertia="1.0" ldamp="0.0" lw="false" mass="1.0" name="Bert1" oid="-1" pausable="true" rest="0.0" shared="false" sprite="1" static="false" touchable="true">

As you can see, renaming the Actor does not change this line which uses the old name:

Code: [Select]
<sprite atlasID="0" default="0" desc="" height="120" id="1" name="anim1"...
The new name is correctly changed in the actor block:

Code: [Select]
<actor adamp="0.0" ascale="true" atlasID="0" bodytype="2" continuous="true" desc="" fixedrot="false" fric="0.2" gid="3" id="0" ignoreg="false" inertia="1.0" ldamp="0.0" lw="false" mass="1.0" name="Bert1"
So I edited the XML and changed the name="anim1" in the sprite block to name="Bert1" saved the file and reopened the game in Stencly with no problems.

I was now able to re-use the Anim1 name.

When I click the Rename button and save, the name should be changed in the sprite block as well as the actor block.

This should be an easy fix.

Old Bugs (1.x/2.x) / Bug in Stencyl with iPhone app running on iPad
« on: December 12, 2011, 05:02:17 am »
I have discovered a bug in the way apps created with iStencyl runs on an iPad.

I compiled the sample game Drop Block which is written for the iPhone. It runs correctly(almost) on the iPhone Sim.

Steps to Repro.

Note: These screen dumps were done on my iPad

1) Next I compiled for my Device which is my Ipad v1. I ran the game on the iPad and it opened up small as all iPhone apps do on the iPad. I clicked the small 2X button and it opened fullscreen. So far it has run correctly. See attached Image dump1.jpg.

2)I closed it and Quit from it and re ran it and this is what appears on my iPad screen. See attached image dump2.jpg

Notice that it is now showing up small like an iPhone screen although the last time I ran it it ran fullscreen. The button is showing 2X??

3)So I click the 2X button and instead of becoming fullscreen, it shrinks even further with the button still showiing 2X (normally it changes to 1x after making an iPhone app fullscreen)See attached image dump3.jpg

4)So I click the 2x button again, it changes to 1x and the screen now expands but not to the proper size. See attached dump4.jpg.

This happens EVERYTIME. If I run any iStencyl iPhone App and press the 2X button and quit, the next time I open the app I get the same sequence as described above.

If I do not expand the iPhone app fullscreen then this does not happen the next time I run it.

I suspect this is something to do with the Trial Splash screen because when I follow the same sequence as above on the iPad Simulator Step 1 & Step 2, the grey and white default "Replace Me" splash screen shows Full Screen and then the Trial Splash screen shows and the whole screen shrinks.

Can someone else test this on an iPad and see.

This is a serious bug which must be fixed though I am not sure if it is actually the Trial Splash screen that is the culprit.

Old Bugs (1.x/2.x) / Why does Stencyl always ask me to save?
« on: December 11, 2011, 07:10:45 pm »
Whenever I open an actor behavior or actor or any of the Stencly objects, even if I make no changes, Stencyl asks me if I want to save every time.

I know that Stencyl keeps track of whether a change has been made because if any change is made the tab for that object has a star. In that case if it asks me to save then it is ok.

But Stencly asks to save for any object opened whether it has changed or not and when examining multiple objects in a project this becomes frustrating, having to answer the save dialog when no changes have been made and no save is needed.

Because of the current Stencly memory issue, I have got used to closing and opening objects rather than keeping them open in tabs.

Could you either make this a setting in preferences or fix it so that it asks to save only when changes have been made?


Pages: 1 2