Sunday, 25 May 2014

Stencyl event editor 3

While experimenting with Stencyl's event editor for the platformer template, I decided to create a monster who floats around and follows the player character. This worked out fine from looking back on a tutorial for creating a follow character behavior. I then set up an event for the enemy to kill player character upon collision. This works well in scene 1, which was included in the template. However for the scene 2 I added myself, the player won't die or if they do die, there's no reloading back to the start.
I honesty don't know whats causing this and knowing my luck it's something ridiculously simple. I've decided to leave this for now and focus on other events.
Currently I've started on creating an inventory system from a list and have a mechanic where  as the player takes damage, it will be displayed on a smiley face. The smiley has four emotions: Happy (yellow)-Displeased (green) -Sick (blue)-Dear death (red). This is the order of progression to represent how much health the player has remaining. I've added the smiley at the top of the screen below the counter or I could place it above the actors head. It's just a matter of working out how to set this up appropriately and I've been thinking that a custom event and trigger might be worth a try.

Update is so far this plan isn't working but I found a web page on creating a health system through the drawing events.

http://photongamedev.wordpress.com/stencyl-corner/quest-pals/quest-pals-tutorial-3-health-set-up-and-drawing/

I won't be using at present but it's still got some useful tips on other ways to go about it.
I also did some more searching and found a thread in the Stencyl forums:

 http://community.stencyl.com/index.php?topic=7429.0
This is about someone trying to solve the issues on communication between actors and the threads author is attempting to do something with making an actor represent health and have a animation change every time a player loses health. This is what I'm trying to do with the health smiley face actor. I'm gonna read this as a reference to point me in the right direction.






 Sunrisekingdom's event setup for a Mega man health bar.

My attempt at a actor health bar.

Sunday, 18 May 2014

Stencyl event editor 2

Okay in regards to coding in stencyl with the event editor, my main challenge is building more advanced events. I have followed a tutorial last year on building the basic set up for a turn-based battle system. This was reasonably long and was successful, but what I need to attempt is building a more advanced event without the assistance of resources.
From what I've noticed with Stencyl is it does require some mathematics skills. Okay in my case this throws a challenge at my face because Maths is one of my weaknesses. I do know somethings like how to use the greater than or less than block. I'm hoping this won't be much of an issue as I discover different event block combinations.
So far I'm starting small and building events, attributes and behaviors I've done before from tutorials either from last year or this year. I've set up health points for the player actor, countdown timer for the top of the screen and to even have the health points number on the screen. At the moment it's just a matter of getting these number elements to show up on the screen and even follow the actor as they progress through the level.
I'll do a small tutorial this week to include in the post but right now I just want to apply these skills I've gained without any help from tutorials.
On the bright side I can navigate well enough in Stencyl so it's now a matter of developing my coding skills with the events editor.



Sunday, 11 May 2014

Stencyl custom events


Today I focused on creating custom events. These events are for creating a set of instructions that will be set off by a trigger that the developer can specify. The tutorial I used is from the Stencyl textbook on page 126 to 127. For this exercise I made a custom event called Relocate actor and this will be started by event called Restartlevel (Caps and no spaces is important to remember).
It is very vital make sure the event name is typed exactly the same as it in the custom event. If this isn't done, then the trigger won't happen.
Technically in the custom block it states "When RestartLevel happens" two blocks with the contents "set x or y to the coordinates in the scene for self". So in other words it's another method to make an actor restart from the level start after death.
Before this I had to make a behavior called health which the event "RestartLevel" must trigger in for the actor.
For this activity I used the stencyl platformer template, which I've been using for experimenting with different behaviors, events and attributes.
Therefore, I gained a new understanding of custom events, which I never tried last year. For now on, I'll be using custom events in developing games.

Stencyl coding with event editor.

Okay last week I went ahead and watched  a three part video tutorial on coding in stencyl.

Part1: https://www.youtube.com/watch?v=G5SUIfXrRP8
Part2: https://www.youtube.com/watch?v=LHU7kfo2Ey4
Part3: https://www.youtube.com/watch?v=Rbao383WrUM

I could have found a tutorial from the text book, but I remember this tutorial from last year and figured it would be a good plan to actually learn from it properly. Anyway instead of following this tutorial step by step, I'm going to apply what I gained from it in one of the text books game files.
While in the process of working through this, I discovered some other tutorials for Stencyl here:
 http://www.kongregate.com/games/abigayl/stencyl-tutorial-first-game
This is part of a series of interactive tutorials made be abigayl for stencyl. I watched through the first couple of tutorials and gained some skills from it. I even picked up on making custom event blocks in the event editor. I believe this will allow for more flexibility in building events especially ones for specific controls or for controlling when actor animations will occur. I plan to keep working this technical skill for a bit longer as coding event blocks is a big part of building a game in Stencyl, which is used for many aspects like controls, attributes, behaviors and animations.
If I don't keep building up on my skills for this then it will make building games in Stencyl very difficult and limited.
Anyway one of the things I did in regards to applying this in a test, was setting up controls for the player character's speed in right and left directions. For example by pressing shift in the right direction, the player actor will speed up and can even do longer jumps from this.