Author Topic: More Controls Functions  (Read 3264 times)

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
More Controls Functions
« on: July 19, 2020, 06:28:23 PM »
First of all, more key conditionals
Code: [Select]
if key pressed = left
if key released = right
if key = jump

Second, allow us to put more keybinds
Code: [Select]
if key = custom 1
if key pressed = custom 3

Third, allow us to check for an specific key, not related to a keybind
Code: [Select]
if key pressed = 32 //Space
if key = 48 //Key 0
if key = 88 //X key
if key released = g1 //g means any button from a gamepad, idk which numbers to use for each
The values are from here: https://www.asciitable.com

Fourth, allow us to set, change, etc. keybinds from commands, allowing us to create custom control config menus.
Code: [Select]
player 1 keybind left = [last key] //Set player 1's left keybind to the last keyboard key pressed.
player 2 keybind jump = 88 //Sets player 2's keybind jump to X button from keyboard
player 1 keybind custom 1 = g2 //Sets  player 1's custom keybind with id 1 to the gamepad button with id 2
player 2 keybind shoot = [last button] //Sets default player 2's shoot keybind to the last gamepad button

Obvioulsy this gives us some more bracketings
Code: [Select]
[player (1|2) keybind (keybind name)] //Returns the ascii value of that keybind
[last key] //Last keyboard button pressed by the user
[last button] //Last gamepad button pressed by the user.

//Useful for this
if key pressed = [player 1 keybind custom 1]
{
//Do things
}
//or
if key pressed = custom 1
{
//Do things
}
//But this leaves PB free to choose which player is intended to get the keybind from
Sorry because my English is not very good because I'm Spanish ;) :P

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: More Controls Functions
« Reply #1 on: July 20, 2020, 03:26:29 PM »
This is an example but TingThing should add this or similar to improve PB. I'm not sure how TingThing will do the number system for the keys but I think this is a good base.
« Last Edit: July 20, 2020, 03:27:42 PM by Antikore »
Sorry because my English is not very good because I'm Spanish ;) :P

War

  • "The top player is here!"
  • Level 20: Nobom
  • *
  • Posts: 1490
    • View Profile
    • My website
Re: More Controls Functions
« Reply #2 on: July 30, 2020, 08:33:19 PM »
imagine if we bumped this everyday until tingthing shares his toughts
Hey, wassup wassup? My name is Warrior555MainsGanon (but just call me War) and I'm the main guy behind Megaman Zero Online and the upcoming Matt's Adventure! I don't speak often here but I'm a very friendly lad so if you wanna talk, don't hesitate!

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: More Controls Functions
« Reply #3 on: July 30, 2020, 10:03:10 PM »
imagine if we bumped this everyday until tingthing shares his toughts
Not a bad idea imo xD
Sorry because my English is not very good because I'm Spanish ;) :P

War

  • "The top player is here!"
  • Level 20: Nobom
  • *
  • Posts: 1490
    • View Profile
    • My website
Re: More Controls Functions
« Reply #4 on: August 02, 2020, 08:03:52 PM »
bump 1
Hey, wassup wassup? My name is Warrior555MainsGanon (but just call me War) and I'm the main guy behind Megaman Zero Online and the upcoming Matt's Adventure! I don't speak often here but I'm a very friendly lad so if you wanna talk, don't hesitate!

War

  • "The top player is here!"
  • Level 20: Nobom
  • *
  • Posts: 1490
    • View Profile
    • My website
Re: More Controls Functions
« Reply #5 on: August 03, 2020, 08:08:46 PM »
bump 2
Hey, wassup wassup? My name is Warrior555MainsGanon (but just call me War) and I'm the main guy behind Megaman Zero Online and the upcoming Matt's Adventure! I don't speak often here but I'm a very friendly lad so if you wanna talk, don't hesitate!

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Re: More Controls Functions
« Reply #6 on: August 04, 2020, 01:17:02 AM »
Seriously, Warr?

Mechasaur

  • No Normies Allowed
  • Level 13: Porcuprick
  • *
  • Posts: 346
  • Proud Admin of Plugger's Zone
    • View Profile
Re: More Controls Functions
« Reply #7 on: August 04, 2020, 08:40:02 PM »
bump 3

War

  • "The top player is here!"
  • Level 20: Nobom
  • *
  • Posts: 1490
    • View Profile
    • My website
Re: More Controls Functions
« Reply #8 on: August 05, 2020, 03:11:03 PM »
bump 4
Hey, wassup wassup? My name is Warrior555MainsGanon (but just call me War) and I'm the main guy behind Megaman Zero Online and the upcoming Matt's Adventure! I don't speak often here but I'm a very friendly lad so if you wanna talk, don't hesitate!

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: More Controls Functions
« Reply #9 on: August 07, 2020, 01:34:44 PM »
bump 5
Sorry because my English is not very good because I'm Spanish ;) :P

War

  • "The top player is here!"
  • Level 20: Nobom
  • *
  • Posts: 1490
    • View Profile
    • My website
Re: More Controls Functions
« Reply #10 on: August 09, 2020, 08:44:05 AM »
bump 6
Hey, wassup wassup? My name is Warrior555MainsGanon (but just call me War) and I'm the main guy behind Megaman Zero Online and the upcoming Matt's Adventure! I don't speak often here but I'm a very friendly lad so if you wanna talk, don't hesitate!

Antikore

  • Developing Mortal Theater at day, developing depression at night.
  • Level 22: Trex
  • *
  • Posts: 2020
  • Enjoying Platform Builder from the very start
    • View Profile
    • PBuilder Resources
Re: More Controls Functions
« Reply #11 on: August 10, 2020, 03:14:10 PM »
bump 7
Sorry because my English is not very good because I'm Spanish ;) :P

War

  • "The top player is here!"
  • Level 20: Nobom
  • *
  • Posts: 1490
    • View Profile
    • My website
Re: More Controls Functions
« Reply #12 on: August 10, 2020, 06:49:52 PM »
bump 8
Hey, wassup wassup? My name is Warrior555MainsGanon (but just call me War) and I'm the main guy behind Megaman Zero Online and the upcoming Matt's Adventure! I don't speak often here but I'm a very friendly lad so if you wanna talk, don't hesitate!

War

  • "The top player is here!"
  • Level 20: Nobom
  • *
  • Posts: 1490
    • View Profile
    • My website
Re: More Controls Functions
« Reply #13 on: August 11, 2020, 04:48:53 PM »
bump 9
Hey, wassup wassup? My name is Warrior555MainsGanon (but just call me War) and I'm the main guy behind Megaman Zero Online and the upcoming Matt's Adventure! I don't speak often here but I'm a very friendly lad so if you wanna talk, don't hesitate!

Alley

  • The Blue Leader
  • Level 17: Clanker
  • *
  • Posts: 705
  • Deals with art in PC and acting and drawing
    • View Profile
    • Team Alju5
Re: More Controls Functions
« Reply #14 on: August 11, 2020, 06:50:25 PM »
imagine if we bumped this everyday until tingthing shares his toughts
Why? ??? Should this be some type of pressure? I am sure Ting_Thing already works hard to make even some of the suggestions reality. ::)
Alley (T_Alj5)