Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Teleport Event

Sir

Member

I need some help with a teleport Common event.

This is what i have so far for the comment event + skill


Skill: Teleport

Description: Teleports Player Forward

Occasion: Always

Common Event: Teleport
*************************
Event

@>Conditional Branch: Aluxes is [Teleport Learned
@>Conditional Branch: The R button is being pressed
@>Set Move Route: Player
: : $>Wait: 20 Frame(s)
: : $>Change Opacity: 0
: : $>1 Step Forward
: : $>1 Step Forward
: : $>Wait: 20 frame(s)
: : $>Change Opacity: 255
@>
: Else
@>
: Branch End
@>
: Else
@>
: Branch End
@>

Anyone wanna give me a hand?
 

Kipe

Member

I see nothing wrong with it.

What's the effect that you're trying to achieve? With that system the camera will pan slowly, while the character is invisible. Are you looking to instantly move the character and camera from point A to point B?

Are you having trouble making it work in game? Be sure that you have a trigger switch on your Common event, and that it's set to Parallel Process. On your map, use an event to turn the switch on.

Are you not satisfied with how it looks? I recommend using an instant camera transition from point A to point B, and include an animation.

Point A to Point B Event System:
You need
1 Switch (You'll just turn it on whenever you want the player to be able to teleport)
1 Event on the Map
6 Variables

Teleport Event on the Map
This event is used as a dummy event, to check passable tiles, before teleporting the player to it's position.
(Precondition Switch: (if) Teleport is ON)
(Parallel Process)

Control Variables: Hero SP =(set to) Hero's SP
Control Variables: Map ID =(set to) Map ID
Control Variables: Hero X =(set to) Hero's Map X
Control Variables: Hero Y =(set to) Hero's Map Y

Conditional Branch: Aluxes is [Teleport Learned]
Conditional Branch: (if) The R button is being pressed
Conditional Branch: (if) Variable: Hero SP >=(greater than or equal to) x

Change SP: Aluxes -x
Show Animation: This Event, [Animation Name]
Set Event Location: This Event, [Hero X], [Hero Y]

Conditional Branch: (if) Player is Facing Up
Set Move Route: Player
:: Change Opacity, 0
Set Move Route: This Event
:: Move Up
:: Move Up
Else
Conditional Branch: if Player is Facing Down
Set Move Route: Player
:: Change Opacity, 0
Set Move Route: This Event
:: Move Down
:: Move Down
Else
Conditional Branch: if Player is Facing Left
Set Move Route: Player
:: Change Opacity, 0
Set Move Route: This Event
:: Move Left
:: Move Left
Else
Conditional Branch: if Player is Facing Right
Set Move Route: Player
:: Change Opacity, 0
Set Move Route: This Event
:: Move Right
:: Move Right
Wait for Moves Completion
Wait 5 Frames
Control Variables: Teleport Event X =(set to) this Event's Map X
Control Variables: Teleport Event Y =(set to) this Event's Map Y

Transfer Player: Appoint with Variables [Map ID], [Teleport Event X], [Teleport Event Y], No Fade
Set Move Route: Player
:: Change Opacity, 255
 

Sir

Member

Basically, the effect i am trying to achieve, that once the character gains the teleport skill, they can instantly anytime (if enough SP is available) teleport two blocks ahead of where they were

I will try your event see whats the go

That's perfect, exactly what i was looking for, thanks alot mate!
 

Sir

Member

Actually, there is one problem, i have made it so the character dissapears and reapears when the character teleports, however that also makes the animation disapear, also it CAN teleport off the map making it unplayable and having to restart the game.

Know anyway around those two mate?

Haha thanks for the thought, but i'm not a total newbie my friend, i knew that R didn't actually mean R :P
 

Kipe

Member

K, it's done.
I'll post a more detailed instruction format for implementing it into your game, in another thread.
http://rmrk.net/index.php?action=dlatta ... tach=18093

Threads:
http://rmrk.net/index.php/topic,35099.0.html
or
viewtopic.php?f=173&t=67828

But for now, just make sure your Variable number is greater than 563, and your switch number greater than 807. Then you can just copy and paste it into any map you want. Also, I used a modified animation. So you can copy that and paste it from the demo, and into your game. And I added a new skill on slot 81 (which you'll have to do too).

Instructions are located within the event itself.
 

Sir

Member

Alright, your a legend mate, thanks alot. I'll check this out and throw ya what i think!


Ok, that was excellent, truly great. It has everything i wanted.

However, there is one thing i just was thinking (If this isn't to much trouble, you've helped me enough as it is so don't feel obligated to)

Is there anyway to use that to make it so the hero can teleport, say over water? Except if the water is to big (Meaning the person would land in the water rather then the other side) it won't allow teleportation?
 

Sir

Member

Killer man, also just to let you know, with your help on the teleporting event, i've now made a working fully functional (But small as anything i think it's got like 5 commands haha) and am working on a step by step healing process. but i'll probably get stuck with that one to haha. but i'm sure with what i have learned i can figure it out
 

Kipe

Member

Just wanted to let you know that I'm still working on it for you, and I'm almost done with it.

The only thing that you'll need to do is go into the tileset editor and change the Terrain tag of everything that's an X(or impassible) to 1.

ATM it teleports 8 squares away, but I'll put comments in there to tell you how to make it more or less.
 
Kipe":7wn4kpf3 said:
It's done!

KDawg08":7wn4kpf3 said:
is there a way to make this work for going through a wall as long as there is a floor on the other side? not just in one spot but on multiple maps/areas?

Yes, this updated event system will do just that.

http://rmrk.net/index.php/topic,35099.m ... #msg423651

Just be sure to read the instructions, and comments located within the event itself.

Sweet, thanks for that, now i just gotta figure out my switches (light switches and such)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top