Micro C.H.I.P is a 2D platformer shooter, survival, puzzle game made back in January 2020. It is mostly targeted towards skill and memory based gamers.
Applying the camera movement of the scene to be attached to the player actor. I used this because the game has a wide width game scene and I wanted a smooth transition throughout the scene rather than switching scenes.
Simple code to add in an explosion actor and a delay before the game scene is reloaded. It is easier than using presets explosion behaviour.
I manually added the Metal Rect actor into the game scene after a player collides with the Trigger Cube because I wanted the Metal Rect to appear at specific locations throughout the map.
I wanted the player to collect 10 Cubox (Tiny Cube) to destroy the Laser Gate and so, I set the scoreTarget to 10.
This code is attached to an actor, in this case, an enemy actor. The first IF-statement basically allows the enemy actor to flip direction according to where the Player Actor is at.
The second IF-statement is the enemy actor's attack code. It only allows the attack to happen if the Player Actor is at the same y value of the enemy actor, only then would the Enemy Bullet be spawn at 30 force in the x direction from x and y center of the enemy actor. An attack delay of 2 seconds and a switch animation is included as well.
When the player actor collides with an Enemy Bullet, it gets a 5 health damage and if the health of the player actor is less or equals to 0, it dies.
Here, when the player actor collides with a Micro Chip, it increases 5 health points and if the current health of the player actor is more or equals to 70, it remains at 70. This is because I want the player actor to have a maximum health of 70.
The minutes is set minutes to floor of Timer/60, to indicate the intervals of which it will be converted into the "minutes" attribute as there is no time function in Stencyl. Next, set second to floor of remainder of Timer/60 is basically the remainder numbers that has not been converted into "minutes" will be shown as the "second" attribute.
I used a game attribute (purple block) with the same name and set it to the attribute of the same name, because I wanted to carry over the Timer into another game scene. An attribute (blue block) can only be used in the same scene it is created in, while a game attribute can be used in all scenes in the game.
When the player holds down the Z button, and the shoot attribute is true, the player can shoot. I set the direction of the bullet depending on where the player is currently facing by checking for the current animations used. There is also a delay of 0.3 seconds, before the player can shoot again.
I set the trigger event under the name ChangeTarget in when created event, to start the behaviour every time the scene is executed.
This code is attached to an actor, I set it to the gears in my game. It is used to move the actor to any coordination in the game scene and back to their original starting point.
This is to check when an actor is at the starting point, it then triggers the behaviour and moves to the coordinates configured and if the actor has reach their configured coordinates, then trigger the behaviour again to move them back to the starting point.
Once the script is attached to an actor, the main coordination will be configured in the scene itself.
This was also added into the Patrol Behaviour. I wanted the gear actor in my game, to disappear once it is collided with a player actor and I want to configure the time of each actor myself, so with the code above, I am able to configure the time in the scene for each individual actor.
I made a player movement from scratch, because the preset walk movements from Stencyl is giving me sliding problems and I did not want the player to slide around especially with my game having circle collision shapes.
The jump movement actually gave me the most issues during development, I have fixed all the issues but just to help you visualize it, below are some problems I have encountered.
Comments