YesNoOk
avatar

win using p2dist and P2BodyDist only if close or far from the opponent like mk9 (Read 6246 times)

Started by DosKillerFighterTrue, June 24, 2024, 01:20:30 pm
Share this topic:
win using p2dist and P2BodyDist only if close or far from the opponent like mk9
#1  June 24, 2024, 01:20:30 pm
  • avatar
  • *
    • Argentina
Originally I was going to say "trying to make them change win states when it is near or far like in mk9 using p2dist or P2BodyDist, but it doesn't work" but there is a limit to the number of words I can say.

Hello, I was trying to change win states when it is near or far like in mk9 using p2dist and P2BodyDist, but neither of them works. The win status only appears when it is nearby. I can't make it work when it's close or far away.

Code:
; WIN
[Statedef 180]
type = S
ctrl=0

;near
[State 180, Near or Far]
type = ChangeState
value = 183
triggerall = p2bodydist X <= 3
trigger1 = Time = 1

;far
[State 180, Near or Far]
type = ChangeState
value = 181
trigger1 = Time = 1

try several times for example.

(first example).
[State 180, Near or Far]
type = ChangeState
value = 183
triggerall = p2bodydist X <= 3
trigger1 = Time = 1

;far
[State 180, Near or Far]
type = ChangeState
triggerall = p2bodydist X >= 3
value = 181
trigger1 = Time = 1
(second example)
[State 180, Near or Far]
type = ChangeState
value = 183
triggerall = p2dist X <= 3
trigger1 = Time = 1

;far
[State 180, Near or Far]
type = ChangeState
triggerall = p2dist X >= 3
value = 181
trigger1 = Time = 1
(third example)
[State 180, Near or Far]
type = ChangeState
value = 183
triggerall = p2dist X <= 3
trigger1 = Time = 1

;far
[State 180, Near or Far]
type = ChangeState
value = 181
trigger1 = Time = 1

Well, I've already given up. and I was forced to publish it thinking that I could do it alone.

Just in case I show you the video how the zoom in and out would be



If anyone helps me I will appreciate it

(I apologize for my English, I use Google Translator)
Re: win using p2dist and P2BodyDist only if close or far from the opponent like mk9
#2  June 24, 2024, 02:02:55 pm
  • *****
  • Resident Tosspot
  • Pftheh
    • UK
    • plasmoidthunder.neocities.org
p2 triggers stop working on KO. You need to use the enemy or enemynear redirects.

Oh, I want a diagram. I fucking love diagrams.
Re: win using p2dist and P2BodyDist only if close or far from the opponent like mk9
#3  June 24, 2024, 02:22:15 pm
  • avatar
  • *
    • Argentina
Thanks, I didn't know that the solution was to put enemynear, p2BodyDist X <= 3.