Checkpoints

Joni
Posts
1
Karma
1
Joni posted this 28 January 2016

Teleportation works in a similar way to checkpoints. All u need to do is this:

 

code for an object at the start of the level there can only be 1! Very important

also make sure your character is creatable, and that only 1 can spawn at a time.

when:                                         Do:

scored | score c | equals | 0.      Create | (your character) | (colour if you want)

<indent>.                                    Set score | score C | 1

 

Main character that you play as: 

all your controls etc

when:                                          Do:

health | equals | 0.                       Subtract | score c | 1

bump | tower | (colour)                            Eat

 

tower which you eat to set your spawn point:

when:                                                                         Do: 

bumped | (your character) | (colour if you want).       Add | score c | 1

<indent>.                                                                    Vanish | it

 

all other objects that act as a spawn point: 

When:                                                     Do:

Scored | score c | equals | (eg 2).           Create | (your character) | (colour if you want)

<indent>.                                                 Set score | (1 number above the one that you chose at the start of the "all other objects" code) 

 

the number would keep on increasing as long as you code it correctly, this means that you can keep making checkpoints until you run out of room in your world

 

it would be great if they made this a simple thing to do

by the way I have not yet tested it, it is just a theory that I came up with after learning teleportation

 

 

 

 

 

 

Post Edited 28 January 2016

0
Stephen
Posts
568
Karma
588
Admin
Stephen posted this 29 January 2016

This looks like it should work great.  A while ago I made a maze game with teleporting using some kode very similar to this.  It takes a bit of experimenting to get working right but is a fairly powerful tool for cool games.

 

What would help make this simpler?  In general, we only try to add new features to the Kodu language that can be used for multiple things.  We want feratures with flexibility instead of a single specific use.

0