Author Topic: X and Y placeholders and commands  (Read 2030 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
X and Y placeholders and commands
« on: January 22, 2019, 09:52:31 AM »
In any game engine, the x and the y control is very important fact. These are cool ideas for commands involving x and y.
X and Y command
Code: [Select]
x + 100This will modify the position of the current object holding the command. This will add 100 to x of the current player.
object X and Y
Code: [Select]
item 5 y + 5This will move an specific object in the X and Y. This exampl will move up the item 5 by 5 pixels. (In GML, +y is down and -y is up. TingThing should make inverted in Platform Builder to make it more logical.)
Player X and Y
Code: [Select]
player 1 x = 1You know yet
Place object at x and y
area var local_yp = [player 1 y]
area var local_yp + 8
Code: [Select]
place enemy 1 = [player 1 x], [area var local_yp]This creates something at the given coordinates (place (object) (id) = (x) (y)). This creates an enemy with ID 1, 8 pixels over the players actual position.

- Another command like the over it, but teleporting all objects of the same type to a coordinate.

Thanks you for reading.
Sorry because my English is not very good because I'm Spanish ;) :P

Gizgord

  • average
  • Level 18: Statix
  • *
  • Posts: 835
    • View Profile
Re: X and Y placeholders and commands
« Reply #1 on: January 23, 2019, 12:41:54 PM »
ehh. it's a bit of an overkill, don't you think?
besides, it'd be more fitting to program something like this yourself in UPE

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Re: X and Y placeholders and commands
« Reply #2 on: January 23, 2019, 05:35:31 PM »
Yeah. It's beyond me.

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: X and Y placeholders and commands
« Reply #3 on: January 24, 2019, 04:20:19 PM »
TingThing should add this but in a way easy to understand for everyone :D
Sorry because my English is not very good because I'm Spanish ;) :P

Gizgord

  • average
  • Level 18: Statix
  • *
  • Posts: 835
    • View Profile
Re: X and Y placeholders and commands
« Reply #4 on: January 24, 2019, 11:05:08 PM »
TingThing should add this but in a way easy to understand for everyone :D
it could be, I guess.
I'd change the units from pixels to normal 32x32 tiles (x + 2, that would be 32*2), to simplify.
still, even this is a bit excessive :P

CGM

  • Christian, 3D artist, former Platform Builder gamdev
  • Master Builder
  • *
  • Posts: 3836
    • View Profile
Re: X and Y placeholders and commands
« Reply #5 on: January 25, 2019, 12:54:56 AM »
I thought it was 32x32 boxes. Not individual pixels. And, that is simply way too much. But I would like to spawn anything next to objects, or on them. This would be cool! In fact, I need this for some things.