YesNoOk
avatar

Return the actual stage edge dist instead of the back edge dist ? (Read 6759 times)

Started by nissouma55, October 15, 2017, 08:10:55 pm
Share this topic:
Return the actual stage edge dist instead of the back edge dist ?
#1  October 15, 2017, 08:10:55 pm
  • *
Hello guys, another question...
How can I return the actual dist between player and stage wall instead of the camera wall ??? I tried number of stuff but didnt found anything...
And I didnt know how to use that camera pos X formula so...
Sorry if im asking a lot im making my first character from scratch...

The BackEdgeDist returns the dist between player and screen wall not stage wall so thats not the trigger that is gonna help me here
Last Edit: October 19, 2017, 05:49:33 pm by nissouma55
Re: Return the actual stage edge dist instead of the back edge dist ?
#2  October 16, 2017, 08:05:22 pm
  • *
Still waiting for an answer plz
Re: Return the actual stage edge dist instead of the back edge dist ?
#3  October 18, 2017, 03:10:59 pm
  • ******
    • www.justnopoint.com/
To make sure a teleport goes behind P2 while they are at the edge of the screen you can use a helper to push P2

Here is an example from my Piccolo

Code:
;----------------------------------------
;Push P2
[Statedef 1546]
type = S
physics = S
movetype = I
anim = 1542

[State 0, VelSet]
type = VelSet
trigger1 = !Time
x = -20

[State 0, PosAdd]
type = PosAdd
trigger1 = root, anim=1801
trigger1 = enemy,BackEdgeBodyDist <=80
x = enemy, Pos X -30

[State 0, NotHitBy]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1

[State 0, Width]
type = Width
trigger1 = Time < 2
player = 100,100

[State 0, PlayerPush]
type = PlayerPush
trigger1 = Time < 6
value = 1

[State 1500]
type = DestroySelf
trigger1 = !AnimTime
trigger2 = root, anim=1801
trigger2 = enemy,BackEdgeBodyDist >80
Re: Return the actual stage edge dist instead of the back edge dist ?
#4  October 18, 2017, 10:11:50 pm
  • *
How am i supposed to put p2 in that state ?? Through a hit ???
And thx a lot I finally got a solution :)
Re: Return the actual stage edge dist instead of the back edge dist ?
#5  October 19, 2017, 03:27:03 am
  • ******
    • www.justnopoint.com/
You don't put P2 in a state at all. You make a helper that has CLSN2 boxes to push P2 out of the way if they are too close to the edge of the screen when you need to appear there.
Re: Return the actual stage edge dist instead of the back edge dist ?
#6  October 19, 2017, 05:49:27 pm
  • *
Ooooh ok I understand now thanks !!!