Okay for this tutorial, I started with consulting the Stencyl textbook, which has a decent introduction on page 50. I have worked with attributes last year where I followed a tutorial on building a turn based battle system. I actually want to find another tutorial to further expand on my skills as there's a lot involved with attributes.
Anyway attributes are the configuration information that is supplied to a behavior. Attributes can be almost any type of data like number, text, actor type or a list of items.
For the game I worked on last year; "Milk Run", I used the dialogue behavior from the RPG town template found in Stencyl. This had a list attribute that allowed you to add in the dialogue for each block of text. This did lead to some issues where you had to assign this to each character and remove the list completely and start a new one. If you didn't do this and just add on text to the list without removing the whole thing first, it will affect the other actors dialogue behaviour. I didn't know why it did this silly thing but I was very happy to find a way to work around it.
Reading about attributes in the stencyl textbook did help a bit in understanding the overall purpose of an attribute, but I want to work on another tutorial this week. Sunrisekingdom on YouTube makes a lot of tuts on Stencyl especially on attributes, so I'll check out if there's any ones I haven't seen yet.
Okay now on page 159 of the Stencyl text book is a tutorial on creating a game attribute to count lives. I've worked through this short tutorial which demonstrated how to count the lives of an actor. This will display text showing the number of lives which will decrease each time the player dies.
All you need to do is create a game attribute called Lives, then put it under the scoring category, name it as Lives, which will be a number type and set the initial value to 3 and click okay.
Next I went onto the next part where you you go into the manage player collisions actor behaviour and go into the collides with enemies event. Then go into the game attributes category button and find the purple set lives to 0 block which can found under number setters subcategory. You then need to drag this block into the orange when event and must be above the red block.
Next click on the drop down arrow of the set lives and choose the 0-0 in the maths section. Now in this left side of this block, click on the drop down and find lives in game attributes and in the right side type in 1.
Now find the print anything block in the flow flow section of the palette which is under the debug menu. and drag it just below the set lives block.
For the print block, click o the drop down arrow and find text & text in text and basics. Now I could not find this block in the standard Stencyl but it could in the 3x version which this text book is for. i Decided to pick text + text instead.
In the print block first empty space, type in Lives remaining: and the last one find anything as text under the basics menu.
In the as text block, go to the drop down arrow and select lives in game attributes under the number option. Finally test the game to see if it works.
Okay this didn't really work for me as I couldn't find the lives countdown text but this could be due to using text + text instead of text & text. This couldn't be helped due to that block not being in this version of Stencyl I'm currently using but it probably would have worked for Stencyl 3x.
Sunday, 27 April 2014
Saturday, 26 April 2014
Scene behaviors
Okay after some researching into scene behaviors, I realized I've already got a good understanding of this. Technically I already know how to do certain scene behaviors, which include scene change and preventing an actor from going out of bounds.
These behaviors are set up like actor behaviors but must be attached to an actual scene instead of an actor. Scene change is very easy to do and to start setting it up is by putting in a region box in your desired point like for example a door. This method is for moving an actor to a place like a door with s region box on it, which will transition to the next scene if the actor touches it.
Next go into the scene's events editor, add a new event which is in actors-enters or leave region-actor or type. After this go to the event block to choose the actor, if it will enter or exit scene and the region which must be placed in the scene prior to this. You can then choose to add a transition that can be found in the event palette menu under the scene and game flow options. Any transition will work for example try a fade out for 0.5 secs, then choose what scene it will go to and a fade in for the same time. This is a very important step in setting up which scene you change to.
I believe this is a good example of a scene behavior and how I came across this method is from this tutorial:
https://www.youtube.com/watch?v=aGjYpFOIxO8
This was a quick tutorial I discovered last and felt like refreshing my knowledge of it. I haven't found actual tutorial for it in the Stencyl text book but I believe adding a level timer for a scene could count as a scene behavior as with a scene scroll which will move along with the actor. This will be in later tutorials I'll be working on. As for this method of scene transition, I plan to use for any game I make in the future.
These behaviors are set up like actor behaviors but must be attached to an actual scene instead of an actor. Scene change is very easy to do and to start setting it up is by putting in a region box in your desired point like for example a door. This method is for moving an actor to a place like a door with s region box on it, which will transition to the next scene if the actor touches it.
Next go into the scene's events editor, add a new event which is in actors-enters or leave region-actor or type. After this go to the event block to choose the actor, if it will enter or exit scene and the region which must be placed in the scene prior to this. You can then choose to add a transition that can be found in the event palette menu under the scene and game flow options. Any transition will work for example try a fade out for 0.5 secs, then choose what scene it will go to and a fade in for the same time. This is a very important step in setting up which scene you change to.
I believe this is a good example of a scene behavior and how I came across this method is from this tutorial:
https://www.youtube.com/watch?v=aGjYpFOIxO8
This was a quick tutorial I discovered last and felt like refreshing my knowledge of it. I haven't found actual tutorial for it in the Stencyl text book but I believe adding a level timer for a scene could count as a scene behavior as with a scene scroll which will move along with the actor. This will be in later tutorials I'll be working on. As for this method of scene transition, I plan to use for any game I make in the future.
Tuesday, 15 April 2014
Stencyl actor behaviour tutorials.
Actor behaviors requires building a custom behavior like following actor and applying it's own events. These behaviors can then be applied to the actor, who will act on those behaviors and can be applied to more than one actor. This will require a couple of tutorials which the first one is:
https://www.youtube.com/watch?v=vslD_SxxvXM
The next tutorial will be from the "Learning Stencyl 3.X Game Development" textbook. This book has activities to work through and one is behaviors.
Okay I worked through the first two parts of chapter 4 which is about creating behaviors. First thing was to create a custom behavior called collide with collectibles. This enabled the actor to make a collectible fruit disappear when collided with. You have to create the actor behavior, go into the event option which is also the behavior editor.
Next add an event which is the one under the collisions, in any actor collides with and find member of group. Also change the name to collides with collectibles.
A block will appear called when actor hits a...You have to find in the center panel, the actor group selector which you choose an actor group from the list. In this case is the collectibles.
Next you go to the actor button in the instruction block palette at the top of the right-hand panel. Click on the properties panel and go down to kill self block in the Alive/Dead subcategory.You then drag this block to the space in the orange center panel. Locate the blue of group at the top-right of the orange self hits block and drag it into the word self in the blue kill self block.
Finally click on the green attach to actor type button at the top-right of the block palette and pick the monkey in the choose actor type dialogue box. Now test the game to see if it's working.
This demonstrates how to start a custom character behavior and add events in the behavior editor. I actually went a little further in the tutorial and added an event where the actor will die if colliding with an enemy which works similar to colliding with collectibles.
https://www.youtube.com/watch?v=vslD_SxxvXM
The next tutorial will be from the "Learning Stencyl 3.X Game Development" textbook. This book has activities to work through and one is behaviors.
Okay I worked through the first two parts of chapter 4 which is about creating behaviors. First thing was to create a custom behavior called collide with collectibles. This enabled the actor to make a collectible fruit disappear when collided with. You have to create the actor behavior, go into the event option which is also the behavior editor.
Next add an event which is the one under the collisions, in any actor collides with and find member of group. Also change the name to collides with collectibles.
A block will appear called when actor hits a...You have to find in the center panel, the actor group selector which you choose an actor group from the list. In this case is the collectibles.
Next you go to the actor button in the instruction block palette at the top of the right-hand panel. Click on the properties panel and go down to kill self block in the Alive/Dead subcategory.You then drag this block to the space in the orange center panel. Locate the blue of group at the top-right of the orange self hits block and drag it into the word self in the blue kill self block.
Finally click on the green attach to actor type button at the top-right of the block palette and pick the monkey in the choose actor type dialogue box. Now test the game to see if it's working.
This demonstrates how to start a custom character behavior and add events in the behavior editor. I actually went a little further in the tutorial and added an event where the actor will die if colliding with an enemy which works similar to colliding with collectibles.
Sunday, 6 April 2014
Update and next technical skill development.
Okay collisions in Stencyl wasn't a difficult skill to development. Collisions are used in tilesets and actor creation. The collisions appear as shapes that need to be adjusted via points around the object. Actors are slightly different than tilesest where the collisions are shapes like circles but aren't solid. This is because the actor has to be in the center of the collision and can be a number of shapes like a pentagon or square. These collisions prevent any object or actor from going through the other actor. However if making a ghost character, then excluding collisions is a good option as ghosts are usually perceived as transparent.
Next skill to develop is actor behavior which is a bit more technical.
Next skill to develop is actor behavior which is a bit more technical.
Subscribe to:
Comments (Atom)
