YesNoOk
avatar

The X position is in the middle but why not the Y position? (Read 2832 times)

Started by GTFoxN6Y, June 07, 2020, 05:23:57 pm
Share this topic:
The X position is in the middle but why not the Y position?
#1  June 07, 2020, 05:23:57 pm
  • **
  • GTFoxN6Y0899
    • USA
    • gtfoxn6y.constantcontactsites.com/
I was trying to make a hyper combo Finnish background go in the middle, but when the player jumps up, the background STILL on the ground and not in the middle completely.

I tried this code:

[State 0, PosAdd]
type = PosAdd
trigger1 = 1
x = 0
y = 0
;ignorehitpause = 1

but that`s don`t work. Can you show me how to put the Y position in the middle just like the X position is in the middle?
Re: The X position is in the middle but why not the Y position?
#2  August 04, 2020, 06:55:55 pm
  • avatar
  • **
    • USA
y=0 is on the ground, put in a negative number to go above
Re: The X position is in the middle but why not the Y position?
#3  August 07, 2020, 03:44:07 am
  • **
  • GTFoxN6Y0899
    • USA
    • gtfoxn6y.constantcontactsites.com/
Re: The X position is in the middle but why not the Y position?
#4  August 07, 2020, 08:48:06 am
  • avatar
  • **
    • USA
try using PosSet instead
Re: The X position is in the middle but why not the Y position?
#5  August 07, 2020, 09:24:00 am
  • **
  • GTFoxN6Y0899
    • USA
    • gtfoxn6y.constantcontactsites.com/
Re: The X position is in the middle but why not the Y position?
New #6  August 07, 2020, 04:31:16 pm
  • ****
1st
are you coding for 1.0 (older) or 1.1?
code are different

need to use explod not changeanim
2nd
if 1.1
the BG picture need to be displayed on screen level not stage level.
screen level means, won't be affected by player or zoom
0 = the top of the screen, no matter how high the player is
trigger "Screenheight" will give you the value of bottom of the screen
since some one use 16:9 and some one use 4:3 so screen size is not a fixed value.
if you want to put it in middle of the screen you need
y = Floor(Screenheight*0.5)
if you want to put it at 20% of height
y = Floor(Screenheight*0.2)

use it in this way no matter player jump or zoom or change screenratio your BG won't be off placed.


stage level means normal. if 0 means ground where player is standing...


if 1.0 or older
the BG picture need to be use explod and postype need to be left or right back or front
but it will have problem when played in 1.1
when zoomed or change screen ratio it will be displayed wrongly.

Last Edit: August 07, 2020, 04:39:59 pm by beterhans