Made for a user on the forums this example shows how to make an arrow point towards another object. While this may seem pretty trivial the two objects are on 2 different layers with 2 different parallax settings.
The example makes use of the System Expressions LayerToCanvasX and LayerToCanvasY.
A quick example for a user on the forums. In this example the movement of a platform character is controller by the left stick while the right stick is used to aim (like mouse aim). The character will always face in the direction of aiming.
Created for a user on the forums but never actually posted because I was ninja’d.
This example has an array of names, each time space bar is pressed, a random name is chosen and moved to a new array. That name is then removed from the original array so the names are never repeated.
Here’s a quick example of counting how many times a certain value appears in an Array. Made for a user on the forums it counts the number of times “dog” and “cat” appears in the array and can easily be expanded to check for more values or different values depending on your project.
Here’s a basic example of a Mario style coinbox. This is the type of box that you’d jump at from underneath and bump your head on and a coin comes out of the top.
- Left & Right Arrows – Move
- Up Arrow – Jump
While working on a personal project I was thinking about the control scheme. It was going to be an 8 Directional shooter with Twin Stick controls. I came up with 2 versions so I though I’d share them here.
The example has 2 groups that hold the events. Simply activate one and deactivate the other to try each version.
Type 1 – You move with left stick but always face the direction the right stick is/was held in.
Type 2 – This is my preferred version. You can move with left stick and you always face the direction of movement until you use the right stick when you’ll face in the right stick direction but move in any direction.
Another older example that I never posted here. Created for a user on the forums it shows how you can use image points rather than detector sprites for detecting sword hits on an enemy. This is useful if you use sword swing animations rather than a sword object in your game. It can of course be used in other situations.