Before I get to the things that I've done, recently I've been receiving this error :
I searched for solutions and came across this forum which solved my problem :
I have to disable this feature to stop my game from crashing all the time :
And now it works perfectly fine!
END SCENE :
Okay, moving on, I've included an end scene where after Bawang Putih meets the last Onion, she enters her house and finds Bawang Merah trying to cook her magical fish.
And she threw one of Bawang Merah's onions towards Bawang Merah and she saved her fish and lived happily ever after.
ONSCREEN ARROW KEYS
I've also added on screen arrows. It's quite confusing at first to understand how to make the screen arrows to work. I still dont know if it will work on touch if it's on the ipad, but it does work on the screen so far.
What I did was, I created the arrows and placed them into the same group as my buttons. I wanted the arrows to follow the screen and not be fixed on the screen. And I found out about this feature while looking through the forums :
It's called anchoring self to screen. So, the object or actor, if this feature is used, it will follow the screen.
Then I set the arrow to simulate keyboard controls. I found out about the simulation here :
And I attached these behaviours to my left, right, and up arrow. I've attached the anchoring to the pause button but not the simulation.
Now it follows the screen whenever the player moves :
SOUNDS
Now that the arrows are done, I moved on to do sound effects. For Stencyl , I only can use mp3 files to add in sound. It doesn't support wav files so far in my Stencyl's version. Perhaps in the future it might be able to support different formats.
I haven't finish adding the sounds and music, it's in progress. Nevertheless, this is how I add in the sounds :
First, I import the files:
Then I go to the behaviours where I want the sound to be played and include this code in the behaviour:
There are options to loop or stop the sound when changing scenes. Sound effects and music are quite simple to be placed into the codes in Stencyl.
PAUSE GAME
In my levels, I have a pause button which allows players to pause their game. The pausing part is the main issue for me as it is quite hard. My pause button still does not work but I can pause the game using the "enter" on the keyboard.
Anyway, I followed this tutorial here :
For pausing, I have to create a behaviour for the scene, in this case level 1 and level 2,
In the Pause Game 1 behaviour are these codes:
The codes mean, if I pressed Enter on my keyboard, if game is paused, then unpaused the game. If not, show the two buttons and pause the game.
The two buttons I've created in the actor types section. And each button have their own behaviour, the menu button will fade the screen and go back to menu. Whereas, the play button will resume the game. (unpausing the game)
And I replaced the keyboard features to touch feature for mobile, but I can't test the touch features because it wouldn't work on the keyboard. So, I temporary disabled the touch features to continue my desktop testing.
Here's the results so far :
Sunday, 1 December 2013