collapse

Author Topic: Oddball position issue  (Read 407 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
Oddball position issue
« on: February 01, 2010, 12:16:00 PM »
This is the end of a move where p1 (anim 3303) bounces off of p2, and recovers. It works perfect if the move is performed by p1 on the left side of the screen. However if performed on the right side it still jumps off in the wrong direction as if the move was preformed on the left. I have used the code on other stuff and it works correctly, but here it wont. It's in state 3212, anybody see something I am missing?


;------------------------------------------------------------------
[statedef 3210]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 8730

[state 0]
type = velset
trigger1 = time = 1
y = 17
x = 0

[State 0, PosAdd]
type = PosAdd
trigger1 = !time
x = -40

[state 0]
type = envcolor
trigger1 = movehit
value = 255,255,255
time = 1
ignorehitpause = 1
persistent = 0

[state 0]
type = hitdef
trigger1 = !time
attr = A, HA
animtype  = High
damage    = 10,15
priority  = 7
guarDFlag = MA
pausetime = 0,0
sparkno = s3350
guard.sparkno = s679
sparkxy = -10,-150
hitsound   = s5,2
guardsound = 6,0
ground.type = low
ground.slidetime = 30
ground.hittime  = 50
ground.velocity = 4,20
guard.velocity = -2
airguard.velocity = -2
air.velocity = 2,20
fall = 1
fall.recover = 0
p1stateno = 3211
p2stateno = 3213
kill = 0

[state 0]
type = screenbound
trigger1 = 1
value = 0
movecamera = 0,0
persistent = 1

[State 0, ChangeState]
type = ChangeState
trigger1 = Pos Y >=0
value = 3212
ctrl = 0

;------------------------------------------------------------------
; Grab
[Statedef 3211]
type = A
movetype = A
physics = N
anim = 3300

[State 0, Turn]
type = Turn
trigger1 = facing = 1

[State 0, PosAdd]
type = PosAdd
trigger1 = time = 0
x = -40
y = 0

[State 0, Explod] ;hitspark
type = Explod
trigger1 = time = 0
anim =350
pos = 0,-50
postype = p1
facing = 1
vfacing = 1
bindtime = 1
sprpriority = 3
ontop = 1
shadow = 0,0,0
ownpal = 1
removeongethit = 1

[State 3116, PlaySnd]
type = PlaySnd
trigger1 = time = 0
value = S3000,4
volume = 255
channel = 2

[state 3300, velset]
type = velset
trigger1 = time >= 0
x = 1
y = -3

[state 3515, 1]
type = velset
trigger1 = time >= 20
x = 2
y = 15

[State 3515, 2]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 100

[State 3515, 3]
type = PlayerPush
trigger1 = Time >= 0
value = 0

[State 3515, 4]
type = TargetBind
trigger1 = 1;  AnimElemTime(1) >= 0 && AnimElemTime(4) < 0
pos =ceil(const(size.xscale)+5),ceil(const(size.yscale)-40)


[State 3302, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = Pos Y >= 0
value = -120
ID = -1
kill = 1
absolute = 0

[State 0, TargetDrop]
type = TargetDrop
trigger1 = Pos Y >= 00

[State 0, ChangeState]
type = ChangeState
trigger1 = Pos Y >=0
value = 3212




;------------------------------------------------------------------
[statedef 3212]
type    = A
movetype= A
physics = N
ctrl = 0
anim = 3303
velset = 0,0
sprpriority = -2

[State 0, PosSet]
type = PosSet
trigger1 = !time
y = 0

[State 0,Envshake]
type = envshake
trigger1 = !time
freq = 100
ampl = -40
time = 20


[State 0, TargetBind]
type = TargetBind
trigger1 = AnimElem = 1
time = 20
pos = 0,0

[State 0, TargetState]
type = TargetState
trigger1 = AnimElem = 1
value = 3214

[State 0, TargetLifeAdd]
type = TargetLifeAdd
trigger1 = !time
value = -50
kill = 1

[State 0, VelSet]
type = VelSet
trigger1 = AnimElem = 2
x = -6
y = -10

[State 0, StateTypeSet]
type = StateTypeSet
trigger1 = AnimElem = 4
physics = A

;------------------------------------------------------------------
;
[statedef 3213]
type = A
movetype = H
physics = N
ctrl = 0

[State 0, Turn]
type = null; Turn
trigger1 = facing = 1

[State 3302, 1]
type = ChangeAnim2
trigger1 = Time = 0
value = 33302

[State 3302, 2]
type = NotHitBy
trigger1 = Time = 0
value = SCA
time = 100

[State 3302, SelfState]
type = changeState
trigger1 = AnimElemTime(4) > 0
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 3304

;=================================================================================
[Statedef 3304]
type    = A
movetype= H
physics = N
velset = 0,0

[State 0, Turn]
type = null; Turn
trigger1 = facing = 1

[State 3304, 1]
type = ChangeAnim2
Trigger1 = Time = 0
value = 3304

[State 820, Vel]
type = VelSet
trigger1 = time = 0
x = 9
y = -6

[State 3304, Vel]
type = veladd
trigger1 = AnimElemTime(3) >= 0
y = 0.49

[State 3304, EnvShake]
type = null;EnvShake
trigger1 = time = 0
freq = 150
ampl = 30
phase = 200
time = 10

[State 3304, SelfState]
type = SelfState
trigger1 = AnimElemTime(5) > 0
trigger1 = Vel Y > 0
trigger1 = Pos Y >= 0
value = 5100
;------------------------------------------------------------------
[statedef 3214]
type    = A
movetype= H
physics = N
ctrl = 0

[State 0, ChangeAnim2]
type = ChangeAnim2
trigger1 = !time
value = 8746

[State 0, SelfState]
type = SelfState
trigger1 = !AnimTime
value = 5100



Offline Excursion

  • Webmaster
  • Infinity Administrator
  • *
  • Posts: 2803
  • Country: United States us
  • Last Login:May 28, 2024, 12:10:06 AM
    • Excursion's Corner
    • Email
Re: Oddball position issue
« Reply #1 on: February 04, 2010, 09:03:12 AM »
Hmm.. I see a couple spots in there that maybe the problem, but unless I test the code out myself, I cannot verify it. Let me pass this on and see if I can get you an answer.

Offline Acey

  • Infinity Administrator
  • *
  • Posts: 9579
  • Country: United States us
  • Last Login:December 05, 2022, 10:43:15 PM
  • "Victory means nothing, the fight is everything."
    • Infinity Wiki - Acey
    • Email
Re: Oddball position issue
« Reply #2 on: February 04, 2010, 09:50:44 AM »
Actually if you send over the char it can be tested and properly figured out but I'm 99% sure that the problem is in the "Turn code"

Code: [Select]
[State 0, Turn]
type = Turn
trigger1 = facing = 1

try removing it, then if that doesn't work change it to -1, guess and check you know. The fact that this code works in other characters probably has something to do with the direction the charater ends up facing or even how relaxed the code is considering the direction in the beginning of the move.

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: Oddball position issue
« Reply #3 on: February 04, 2010, 10:07:09 AM »
I figured it out.

It was a bit of code I reused from the older version of the move I used from open source code. It had 2 seperate p1stateno's that allowed for it to bounce off in differant directions. Pretty odd to code it that way so I just fixed state# 3211 to do both directions, and now its working properly.

Thanx for looking though :)

Offline Acey

  • Infinity Administrator
  • *
  • Posts: 9579
  • Country: United States us
  • Last Login:December 05, 2022, 10:43:15 PM
  • "Victory means nothing, the fight is everything."
    • Infinity Wiki - Acey
    • Email
Re: Oddball position issue
« Reply #4 on: February 04, 2010, 10:15:34 AM »
Sure, thank will be $500.00.

Offline Alexziq

  • Infinite Loyalist
  • *****
  • Posts: 2624
  • Last Login:November 10, 2017, 01:10:16 PM
    • Email
Re: Oddball position issue
« Reply #5 on: February 04, 2010, 11:15:39 AM »
As Jack Burton would say:

Have you paid your dues Jack?

Yes sir, the check is in the mail.

 ::salute::

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

[WIP] Pocket Dimensional Clash 2 by O Ilusionista
[June 03, 2024, 03:18:12 PM]


[BOR] _Avengers United Battle Force_ by O Ilusionista
[June 03, 2024, 03:13:51 PM]


Mega Man & Bass - Dynamo Man by Sir Rousseau by O Ilusionista
[June 03, 2024, 03:09:50 PM]


D2TD VS Showcase Thread by D2TD
[May 31, 2024, 11:44:23 AM]


Lasombra's IKEMEN Go Interactive Stages' WIP Topic and Releases by Lasombra Demon
[May 26, 2024, 07:39:11 PM]


TMNT Hong Kong Stage for 1.0 & 1.1 Re-Release by LightFlare
[May 24, 2024, 01:44:07 PM]


Captain Commando Stage Pack by Vegaz by LightFlare
[May 24, 2024, 09:20:05 AM]


Street Fighter 1 Ultimate Ryu by ELECTRO
[May 22, 2024, 03:58:25 PM]


China Town (Revenge of Shinobi) by Lord_Enemil
[May 22, 2024, 03:02:10 PM]


Neon Light Force Demo by Uche_of_IMT
[May 22, 2024, 10:21:37 AM]

* IMT Calendar

June 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