Author Topic: More Controls Functions  (Read 473 times)

Antikore

  • YouTuber, Gamer and the developer of Castle Chamber.
  • Level 21: Magmus
  • *
  • Posts: 1658
  • Total likes: 70
  • 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

  • YouTuber, Gamer and the developer of Castle Chamber.
  • Level 21: Magmus
  • *
  • Posts: 1658
  • Total likes: 70
  • 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

warrior

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

Antikore

  • YouTuber, Gamer and the developer of Castle Chamber.
  • Level 21: Magmus
  • *
  • Posts: 1658
  • Total likes: 70
  • 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

warrior

Re: More Controls Functions
« Reply #4 on: August 02, 2020, 08:03:52 PM »
bump 1

warrior

Re: More Controls Functions
« Reply #5 on: August 03, 2020, 08:08:46 PM »
bump 2

Christian Game Maker (CGM)

  • Christian, videogame dev hobbyist. Servant of Jesus Christ.
  • Master Builder
  • *
  • Posts: 3788
  • Total likes: 41
  • The way of the Cross leads home.
    • View Profile
    • The Adventures of Super Mike Website (ASM)
Re: More Controls Functions
« Reply #6 on: August 04, 2020, 01:17:02 AM »
Seriously, Warr?

Mechasaur

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

warrior

Re: More Controls Functions
« Reply #8 on: August 05, 2020, 03:11:03 PM »
bump 4

Antikore

  • YouTuber, Gamer and the developer of Castle Chamber.
  • Level 21: Magmus
  • *
  • Posts: 1658
  • Total likes: 70
  • 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

warrior

Re: More Controls Functions
« Reply #10 on: August 09, 2020, 08:44:05 AM »
bump 6

Antikore

  • YouTuber, Gamer and the developer of Castle Chamber.
  • Level 21: Magmus
  • *
  • Posts: 1658
  • Total likes: 70
  • 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

warrior

Re: More Controls Functions
« Reply #12 on: August 10, 2020, 06:49:52 PM »
bump 8

warrior

Re: More Controls Functions
« Reply #13 on: August 11, 2020, 04:48:53 PM »
bump 9

Alley

  • The Blue Leader
  • Level 16: Spike
  • *
  • Posts: 679
  • Total likes: 1
  • 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)