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.

Key-press transfer

Is it possible to perhaps use a common event to make it so whenever a player presses a certain key, lets say, Z, they are transfered to another map? Or would I have to use a different method, such a scripting?
 
k, i did what you said and it worked perfectly! However, i forgot to include the other part of my question (slaps self) Once you are transfered to the map, i want you to be able to press Z again, and return to where you were. Is this possible with events as well?
 
Yeah, you can do this with three new variables and a switch. Try something like:

Code:
@>Conditional Branch: Button "A" is Down
  @>Conditional Branch: Switch [Teleported] == Off
    @>Control Variables: [Player X] = Player's Map X
    @>Control Variables: [Player Y] = Player's Map Y
    @>Control Variables: [Player Map] = Map ID
    @>Transfer Player: [New Map, (X,Y)]
    @>Control Switches: [Teleported] = ON
   : Else
    @>Transfer Player: [Variable(Player Map), Coordinates(Player X, Player Y)]
    @>Control Switches: [Teleported] = OFF
   : End Processing
  @>Wait: 20 frames
 : End Processing
@>Wait: 1 frame

What it does is stores the player's previous location/coordinates to 3 variables before you go to the new map. Good luck with it!
 
Ran into another problem. The conditional branch only works when i use up, down, left, and right for the condition. If i use A, B, C, X, Y, Z, R, or L, the parallel process event won't work, why?
 
You're probably pressing the wrong keys. The buttons correspond to different keyboard keys.

Here's the layout:
A-> Shift, Z
B-> X, Esc, Numpad 0
C-> Space, Enter, C
X-> A
Y-> S
Z-> D
L-> Q
R-> W
 
haha, thats kinda funny, i posted this thread with your ability grid in mind. I wanted to be able to teleport there at any time, from anywhere. Anyway, thanks for the system. I already had it down, but yours looks more professional, i might implement it if my game is ever released.
 
You know, you can change what keys go to what buttons. Change it during a play or playtest.

However, what I don't know is if the settings are saved next time you power on the game.
 
Rey_J":2lfc8i6s said:
You know, you can change what keys go to what buttons. Change it during a play or playtest.

However, what I don't know is if the settings are saved next time you power on the game.

Hmmm, it seems like the button settings would be saved, but it would be pointless to change the settings in my position, because I have a few friends that playtest it for me, and i already have the Ability Grid transfer information in the game, where they can read what to do to get to the ability grid, and it could be a pain to have to remind them that I changed the buttons every time they play lol >.<
 

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