Ladder Implement in Game

Attached Files

The following files have been attached to this tutorial:

.capx

demoladders.capx

Download now 707 KB

Stats

917 visits, 1,910 views

Translations

This tutorial hasn't been translated.

Tools

Please understand this that I am not expert but, I will try my best to help anyone. Now someone asked me while back how to make use of ladders in C2 game. Here is little Demo that you can learn from. Let’s start

1. Create new and name it as Ladders

2. Set size as you wish

3. Set Windows size to 480 X 320 or whatever your choice

4. Name layer to Background and add tile background of your choice

5. Add new layer and name it as Platform

6. Add layer and Name it as Player

Now lock player layer and Background layer. Add sprite and name it Platformstand. Set to Solid. Something like below

Now add ladder sprite like below

No need to set behavior for ladder.

Insert KEYBOARD for movements

Once you finished designing your layout, unlock player layer and lock the Platformstand layer.

You have to design animation as you wish or see my demo.

Now let us give be behavior to player

1. 8 Direction

2. Platform

3. Scroll to

Now we need to give player Instance Variables so we can manipulate player by is near ladders or on ladders. If player is on ladder then we can use Instance Variables to tell player what to do and what not to do. Ok so now click on Instance Variables and add these:

1. PlayerClimbLadders set Boolean to true

2. PlayeronLadders Boolean to false

Now open events Editors add some line of code

Start of Layout

Player movement with Keyboard

Is Player on Ladder

If he is then

Well this is end of my tutorial. Happy learning C2

.CAPX

demoladders.capx

Download now 707 KB
  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!