I have now sorted out all of the characters animations and sounds and sorted my scene design and behavours it was time to make a start on the start screen. I feel for the design I am going to use the desert background from the first scene as it looks good, and is my favourite background, I am also thinking of having an image of the main character jumping on the bad guy so you nkow exactly what to expect when you start the game. To create this image I would have to actually create two new characters, so I created a main character with one frame, and set the physics to non movable, I then had to repeat this for the bad guy and just put the crushed animation and set the physics to non movable. This allowed me to have an image of the main character crushing the bad character on the main screen.
To create the behaviour for starting the game I had to create an actor behaviour named "Start Game". Firstly I had to use the "Always" block and drag in the "if" block, within this section is a mouse click behaviour which sets the start screen to fade to scene one after 0.3 seconds. Secondly I had to use the "When Drawing" block to create the animation for the start button itself, and use the behaviour "If mouse is over self" "Switch Animation to 1 for 'Self' ". And then do the opposite behaviour below it which reads "IF not mouse is over 'Self' " "Switch animation 0 for 'self' ". This animation behaviour will make the start button swap images and look more of a clickable button.
 |
| The code for the behaviour |
For this behaviour to work I then had to create a start button actor to use the behaviour. To do this I created a button on Photoshop and added it as a frame for a character as "Animation 0" and then I created the image I would want it swapped with and name a new frame as "Animation 1". When the "Start Game" behaviour has been added to this actor the button will fully work and switch the scene to the start of the game.
 |
| Original start button image |
 |
| Replaced image when scrolled over |
No comments:
Post a Comment