Update FMP: New mechanic

teleportCircle.png

 

I have implemented a new mechanic in with this gfroad graphics, which can be found here.

teleport graphics

The basic idea of this mechanic is to get the player from point A to point B in an instant or with a little delay.

When using the teleport mechanic in a feature a problem occurred, which was an infinite loop, which crashed the game. To fix this was easy, but did require some tweaking. Here is the solution.

The first screenshot will only allow the player to teleport if Teleporting = False, which it does at default. After that Teleporting turns to True (forgot to include in screenshot). The screenshot on the right is the short delay before the variable Teleporting turns off. The reason it is 0.5s instead of 0.1s or lower is because, the player needs time to get out of the way, otherwise the error will continue over and over again.

 

Summary

I am glad that I added in a new mechanic and if I get more time, then I will build on top upon it.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s