YesNoOk
avatar

BackEdge, FrontEdge, LeftEdge, RightEdge, TopEdge & BottomEdge (Triggers) 1.1b  (Read 8149 times)

Started by JustNoPoint, October 28, 2015, 03:45:45 pm
Share this topic:
BackEdge, FrontEdge, LeftEdge, RightEdge, TopEdge & BottomEdge (Triggers) 1.1b
New #1  October 28, 2015, 03:45:45 pm
  • ******
    • www.justnopoint.com/
BackEdge returns the x position of the edge of the screen that is behind the player, in absolute stage coordinates.
FrontEdge returns the x position of the edge of the screen that is in front the player, in absolute stage coordinates.

LeftEdge returns the x position of the left edge of the screen, in absolute stage coordinates.
RightEdge returns the x position of the right edge of the screen, in absolute stage coordinates.

TopEdge returns the y position of the top edge of the screen, in absolute stage coordinates.
BottomEdge returns the y position of the bottom edge of the screen, in absolute stage coordinates.

Format:
    1.) BackEdge
    2.) FrontEdge
    3.) LeftEdge
    4.) RightEdge
    5.) TopEdge
    6.) BottomEdge

Arguments:
none

Return type:
float

Error conditions:
none

Notes:
    1.) BackEdge
This trigger is equivalent to the expression "ifelse(facing = 1, LeftEdge, RightEdge)".
    2.) FrontEdge
This trigger is equivalent to the expression "ifelse(facing = 1, RightEdge, LeftEdge)".
    3.) LeftEdge
This trigger is equivalent to the expression "CameraPos X - GameWidth / 2".
    4.) RightEdge
This trigger is equivalent to the expression "CameraPos X + GameWidth / 2".
    5.) TopEdge
This trigger is equivalent to the expression "Pos Y - ScreenPos Y".
    6.) BottomEdge
This trigger is equivalent to the expression "Pos Y - ScreenPos Y + GameHeight".

Example:

Code:
trigger1 = Pos X + CameraPos X < BackEdge
  Triggers if the player is to the left of the back edge of the screen.

trigger1 = facing * (Pos X + CameraPos X) < facing * (FrontEdge)
  Triggers if the player is behind the front edge of the screen.

trigger1 = Pos X + CameraPos X < LeftEdge
  Triggers if the player is to the left of the left edge of the screen.

trigger1 = Pos X + CameraPos X > RightEdge
  Triggers if the player is to the right of the right edge of the screen.

trigger1 = Pos Y > TopEdge
  Triggers if the player is below the top edge of the screen.

trigger1 = Pos Y < BottomEdge
  Triggers if the player is above the bottom edge of the screen.
Last Edit: March 03, 2019, 08:43:33 pm by Odb718
Re: BackEdge, FrontEdge, LeftEdge, RightEdge, TopEdge & BottomEdge (Triggers) 1.1b
#2  November 13, 2015, 01:00:26 am
  • ***
  • Mega Man Classic
  • pachirisu is sexy af
    • Canada
    • anoobtroll@gmail.com
What would be a better replacement for these edge triggers in 1.0 and Winmugen?
Pokecommunity account (Will start learning about romhacking): http://www.pokecommunity.com/member.php?u=553303

Why are there some people here trying to go into their ways into trying to ruin my Mugen hobby here and make me look like bad?



https://www.youtube.com/watch?v=3_TMrr6eqQc
Re: BackEdge, FrontEdge, LeftEdge, RightEdge, TopEdge & BottomEdge (Triggers) 1.1b
#3  November 13, 2015, 01:43:51 am
  • ******
  • Loyal to the Game
    • USA
    • http://jesuszilla.trinitymugen.net/
You can't.
Re: BackEdge, FrontEdge, LeftEdge, RightEdge, TopEdge & BottomEdge (Triggers) 1.1b
#4  November 22, 2015, 12:28:22 am
  • *****
  • Shame on you!
    • USA
Yeah I'd say just refer to the Notes. You can still get the info you need, you just have to use the longer version.
vVv Ryuko718 Updated 10/31/22 vVv