collapse

Author Topic: Can someone please help me get the p2 locator to work?  (Read 875 times)

0 Members and 1 Guest are viewing this topic.

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Can someone please help me get the p2 locator to work?
« on: December 28, 2008, 03:15:16 PM »
Sigh, this just keeps being an issue for me, and I need to understand why it isnt working.

Heres the states.

;---------------------------------------------------------------------------
; States that are always executed (use statedef -2)
;---------------------------------------------------------------------------
[Statedef -2]

[State -2, superjump opponent locator]
type = Helper
triggerall = (NumHelper(0) = 0)
trigger1 = (Pos Y < -200) && (P2Dist Y > 50)
ID = 0
pos = 0,-120
postype = p2
stateno = 910
facing = 1
;---------------------------------------------------------------------------
;Super Jump opponent locator
[Statedef 910]
type    = A
physics = N
ctrl = 0
sprpriority = 2

[State 910, arrow]
type = ChangeAnim
trigger1 = IsHelper(0)
;trigger1 = TeamSide = 2
value = 9910

[State 910, destroyself]
type = DestroySelf
triggerall = IsHelper(0)
trigger1 = RootDist Y > 0

;---------------------------------------------------------------------------

Heres the commands

;--------------------------------
;s-jump Up/Fwd
[state -1]
type = changestate
value = 700
triggerall = statetype != a
triggerall = ctrl
trigger1 = command = "superjump"
trigger2 = command = "superjump_fwd"

;s-jump bwd
[state -1]
type = changestate
value = 700
triggerall = statetype != a
triggerall = ctrl
trigger1 = command = "superjump_back"



All the animations are the correct numbers, and Superjump is state 700, this should work. I just dont get it. This is the 3rd time Ive ran into this, and theres never a definitive answer to how it ends up getting fixed. Anyone have an idea?

Please HELP ~X(



Offline O Ilusionista

  • Since 1999 and kicking :)
  • IMT Content Architect
  • *
  • Posts: 12476
  • Country: Brazil br
  • Last Login:November 11, 2024, 12:35:15 PM
  • OpenBOR & Mugen addicted
    • BMT - Brazil Mugen Team
    • Email
Re: Can someone please help me get the p2 locator to work?
« Reply #1 on: December 28, 2008, 03:43:27 PM »
why do you use "trigger1 = IsHelper(0)" ? Try to give another ID to the helper.

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: Can someone please help me get the p2 locator to work?
« Reply #2 on: December 28, 2008, 03:46:49 PM »
why do you use "trigger1 = IsHelper(0)" ? Try to give another ID to the helper.

Sadly Ive tried that as 1045, and 700. Doesnt seem to make a differance

Offline O Ilusionista

  • Since 1999 and kicking :)
  • IMT Content Architect
  • *
  • Posts: 12476
  • Country: Brazil br
  • Last Login:November 11, 2024, 12:35:15 PM
  • OpenBOR & Mugen addicted
    • BMT - Brazil Mugen Team
    • Email
Re: Can someone please help me get the p2 locator to work?
« Reply #3 on: December 28, 2008, 03:50:15 PM »
This is because your helper is destroing itself right on the start:

[State 910, destroyself]
type = DestroySelf
triggerall = IsHelper(0)
trigger1 = RootDist Y > 0

Take rid of this sctrl and see if it appears

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: Can someone please help me get the p2 locator to work?
« Reply #4 on: December 28, 2008, 04:01:17 PM »
This is because your helper is destroing itself right on the start:

[State 910, destroyself]
type = DestroySelf
triggerall = IsHelper(0)
trigger1 = RootDist Y > 0

Take rid of this sctrl and see if it appears

No doesnt make a difference. This is standard Scruffy template stuff, there must be some kind of ste Im missing or something. Its such simple code I cant see what thpough. heres the superjump code

;---{Super Jump}---
[Statedef 700]
type = A
movetype = I
physics = N
anim = 40
velset = 0,0
ctrl = 0

; remove any lingering explod from a move with an aircombo follower (460 is one such)
[State 0, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 0
id = 465

[State 0, ]
type = VarSet
trigger1 = Time = 0
v = 0
value = 0

[State 0, ]
type = VarSet
trigger1 = command = "holdfwd"
v = 0
value = 1

[State 0, ]
type = VarSet
trigger1 = command = "holdback"
v = 0
value = -1

[State 0, ]
type = explod
trigger1 = time = 1
anim = F61
postype = p1
pos = 0,0
bindtime = 1
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 1

;===Put in .cns file statedef for sjump
;from wonder woman's sjump
[State 0, a6x]
type = Velset
trigger1 = Var(59) && (prevstateno=460)
x = 6
y = 8

[State 0, ]
type = VelSet
trigger1 = animtime = 0
;x = ifelse(sysvar(1)=0, const(velocity.jump.neu.x), ifelse(sysvar(1)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
x = ifelse(var(0)=0, const(velocity.jump.neu.x), ifelse(var(0)=1, const(velocity.jump.fwd.x), const(velocity.jump.back.x)))
y = const(velocity.jump.y)*1.5

[State 0, ]
type = ChangeState
trigger1 = animtime = 0
value = 701
ctrl = 1

[Statedef 701]
type    = A
physics = A
ctrl = 1
anim = 41
;velset = 0, -15

[State 0, ]
type = explod
trigger1 = time = 0
anim = F700
postype = p1
pos = 0,0 ;const(size.head.pos.y)-40
vel = 0,1
bindtime = 1
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 1

[State 0, ]
type = VarRandom
trigger1 = time >= 0
v = 50
range = -2, 2

[State 0, ]
type = explod
trigger1 = vel y <= -0.5 && numexplod(701) <= 5 && timemod = 3,1
anim = F701
id = 701
postype = p1
pos = const(size.mid.pos.x),const(size.mid.pos.y)-20
random = 20+const(size.air.back)+const(size.air.front),15
vel = var(50),1
bindtime = 1
removetime = -2
ontop = 1
ownpal = 1
removeongethit = 1

[State 0, ]
type = PlaySnd
trigger1 = time = 1
persistent = 0
value = S8,0

[State 0, ]
type = VelAdd
triggerall = Vel X >= -2
trigger1 = command = "holdback"
x = -0.1

[State 0, ]
type = VelAdd
triggerall = Vel X <= 2.5
trigger1 = command = "holdfwd"
x = 0.25

[State 0, ]
type = VelSet
trigger1 = Anim = 42
trigger1 = Time = [0,5]
x = 4

[State 0, ]
type = VelSet
trigger1 = Anim = 43
trigger1 = Time = [0,5]
x = -3.5

[State 0, ]
type = ChangeAnim
trigger1 = Time = 0
value = ifelse((vel x)=0, 41, ifelse((vel x)>0, 42, 43))

[State 0, ]
type = ChangeAnim
trigger1 = Vel y > -2
trigger1 = SelfAnimExist(anim + 3)
persistent = 0
value = Anim + 3

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: Can someone please help me get the p2 locator to work?
« Reply #5 on: December 28, 2008, 05:21:36 PM »
Well I appreciate you trying to help  :-??

Offline O Ilusionista

  • Since 1999 and kicking :)
  • IMT Content Architect
  • *
  • Posts: 12476
  • Country: Brazil br
  • Last Login:November 11, 2024, 12:35:15 PM
  • OpenBOR & Mugen addicted
    • BMT - Brazil Mugen Team
    • Email
Re: Can someone please help me get the p2 locator to work?
« Reply #6 on: December 30, 2008, 08:53:11 AM »
Man....I've added the code you gave me, and it works perfectly




the only thing different is that I'm using it on a state -3 and not -2

Offline O Ilusionista

  • Since 1999 and kicking :)
  • IMT Content Architect
  • *
  • Posts: 12476
  • Country: Brazil br
  • Last Login:November 11, 2024, 12:35:15 PM
  • OpenBOR & Mugen addicted
    • BMT - Brazil Mugen Team
    • Email
Re: Can someone please help me get the p2 locator to work?
« Reply #7 on: December 30, 2008, 09:23:10 AM »
Man, I was taking a look on this code...and it just works if your oponent doesn't move. Plus, its better to you use explods, they are lighter on RAM than Helper.

Here is new code, made by me:

Quote
;======================= Super Jump Enemy Locator by Ilu xD
[State -3, Blue/Red arrow]
type = Explod
triggerall = !NumExplod(9910)
trigger1 = Pos Y < -200 && P2Dist Y > 50
anim = 9910+(TeamSide = 1)
ID = 9910
pos = 0,-120
postype = p2
facing = 1
bindtime = -1
removetime = -1
ontop = 1
removeongethit = 1

[State -3, 1p/2p name]
type = Explod
triggerall = !NumExplod(9912)
trigger1 = Pos Y < -200 && P2Dist Y > 50
anim = 9912+(TeamSide = 1)
ID = 9912
pos = 0,-170
postype = p2
facing = (facing*-1)
bindtime = -1
removetime = -1
ontop = 1
removeongethit = 1

[State 0, RemoveExplod]
type = RemoveExplod
triggerall = NumExplod(9910)
trigger1 = P2Dist Y < 50
id = 9910

[State 0, RemoveExplod]
type = RemoveExplod
triggerall = NumExplod(9912)
trigger1 = P2Dist Y < 50
id = 9912

The anims:

9910 - the blue arrow (like on the previous pic)
9911 - the red version (for the p2)

9912 - 1p name explod
9913 - 2p name explod

If you want, you can add a arrow when p2 just too high

Feel free to comment xD

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: Can someone please help me get the p2 locator to work?
« Reply #8 on: December 30, 2008, 10:09:13 AM »
I will try it out later.

I just wonder if there are external factors that can keep it from working in the commands, its just bizarre because its such simple code. Hopefully though yours will work. There are some strange things in DCvM code that can make things complex. For instance I still dont understand how their hyper BG has differant lengths of time on screen all using the same state when every hyper has differant lengths

Offline O Ilusionista

  • Since 1999 and kicking :)
  • IMT Content Architect
  • *
  • Posts: 12476
  • Country: Brazil br
  • Last Login:November 11, 2024, 12:35:15 PM
  • OpenBOR & Mugen addicted
    • BMT - Brazil Mugen Team
    • Email
Re: Can someone please help me get the p2 locator to work?
« Reply #9 on: December 30, 2008, 01:38:19 PM »
this is simply:

type = destroyself (or RemoveExplod)
trigger1 = stateno > 2999 (if 3000 and over are hyper states)
trigger2 = MoveType = H

I used the same trick on my EOH chars.

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: Can someone please help me get the p2 locator to work?
« Reply #10 on: December 30, 2008, 01:43:33 PM »
this is simply:

type = destroyself (or RemoveExplod)
trigger1 = stateno > 2999 (if 3000 and over are hyper states)
trigger2 = MoveType = H

I used the same trick on my EOH chars.

It works as a helper, and not an explod though, thats why its odd

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: Can someone please help me get the p2 locator to work?
« Reply #11 on: December 31, 2008, 01:07:24 AM »
Man, I was taking a look on this code...and it just works if your oponent doesn't move. Plus, its better to you use explods, they are lighter on RAM than Helper.

Here is new code, made by me:

The anims:

9910 - the blue arrow (like on the previous pic)
9911 - the red version (for the p2)

9912 - 1p name explod
9913 - 2p name explod

If you want, you can add a arrow when p2 just too high

Feel free to comment xD

So am I using the previous state 9110 for this? what attaches this to the Superjump, or maybe thats state 0??

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: Can someone please help me get the p2 locator to work?
« Reply #12 on: December 31, 2008, 12:43:05 PM »
Man, I was taking a look on this code...and it just works if your oponent doesn't move. Plus, its better to you use explods, they are lighter on RAM than Helper.

Here is new code, made by me:

The anims:

9910 - the blue arrow (like on the previous pic)
9911 - the red version (for the p2)

9912 - 1p name explod
9913 - 2p name explod

If you want, you can add a arrow when p2 just too high

Feel free to comment xD

Okay it does work, but theres one weird thing.

If I superjump it doesnt come on, it only comes on if I super jump, and then jump up another step in the air. Weird, theres something interfering with it from working but I cant tell from where. any ideas?

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: Can someone please help me get the p2 locator to work?
« Reply #13 on: December 31, 2008, 01:13:38 PM »
NEVERMIND!

I got it  :w00t: :w00t:

The problem was in the velocity, and movent, but its your code that helped me find it. The old SJ, was a up,up step type style superjump, It was screwing with the indicator.

Thank you for all the help O".

I put the arrow code in Black cat btw, just for fun

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

D2TD VS Showcase Thread by D2TD
[November 17, 2024, 08:36:39 AM]


Barkley Shut Up and Jam! Stages by Vegaz by LightFlare
[November 12, 2024, 11:26:21 AM]


[BOR] _Avengers United Battle Force_ by O Ilusionista
[November 11, 2024, 12:35:24 PM]


Eternal Lament Stage 1.1 & 1.0 by O Ilusionista
[November 11, 2024, 12:34:54 PM]


MatreroG's Stages W.I.P. Concepts by MatreroG
[November 11, 2024, 07:00:56 AM]


Marvel vs. Capcom: Eternity of Heroes REMAKE Game Update 1.3.0 - N.A.O.H. by ExShadow
[November 02, 2024, 04:54:41 AM]


Spooky House(1.1 Only/AIGS) by Vegaz by LightFlare
[October 31, 2024, 11:31:36 AM]


Rooftop Skyline(1.1 Only/AIGS) by Vegaz by LightFlare
[October 21, 2024, 12:13:37 PM]


Secluded Base(1.1 Only/AIGS) by Vegaz by LightFlare
[October 17, 2024, 01:21:06 PM]


Ultimate Balrog + stage by ELECTRO
[October 17, 2024, 05:40:31 AM]

* IMT Calendar

November 2024
Sun Mon Tue Wed Thu Fri Sat
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 [18] 19 20 21 22 23
24 25 26 27 28 29 30

SimplePortal 2.3.5 © 2008-2012, SimplePortal