Positioning Help

Started by Hadoabuser, November 01, 2009, 08:36:03 PM

Previous topic - Next topic

Hadoabuser

I don't understand why the position of an explod moves even tho the root is in the same area, can somebody explain this.

Starting Pos:


Move Starts:


Move Kills:


Portal in first Pics:
;Dimensional Transport (FP)
[Statedef 2032]
type = U
movetype = A
physics = N
anim = 2031
sprpriority = 2

[State 2033, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 2032, HitDef]
type = HitDef
trigger1 = !Time
attr = S,HA
hitflag = MAF
guardflag = M-
animtype = light
air.animtype = light
priority = 9,Hit
damage = 0,0
pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = 0,0
guardsound = 0,0
ground.type = High
ground.slidetime = 0
ground.hittime = 0
air.hittime = 20
p1stateno = 2034
p2stateno = 2033

[State 2032, DestroySelf]
type = DestroySelf
trigger1 = Time = 60
trigger1 = (!MoveContact)

;PreBG
[Statedef 2034]
type = U
movetype = A
physics = N
anim = 8200
sprpriority = -2

[State 2034, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = nobardisplay
flag2 = noBG
flag3 = noFG

[State 2034, Explod]
type = Explod
trigger1 = !Time
anim = 8205
ID = 2035
pos = 0,-20
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 99999
scale = 1.2,1.4
sprpriority = 5

[State 2034, RemoveExplod]
type = RemoveExplod
triggerall = !Win
trigger1 = Time = 210
id = 2035

[State 2034, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 2034]
type = Turn
triggerall = !Win
trigger1 = Root,Facing = -1
persistent = 0

[State 2034, StopSnd]
type = StopSnd
trigger1 = !Time
channel = 9

[State 2034, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = S22,0
volume = 0
channel = -1

[State 2034, PlaySnd]
type = PlaySnd
trigger1 = !Time
value = 2030,0
volume = 0
channel = 2

[State 2034, EnvShake]
type = EnvShake
trigger1 = Time = 20
time = 190
freq = 110
ampl = 5
phase = 90

[State 2034, PlaySnd]
type = PlaySnd
trigger1 = Time = 20
value = S22,1
volume = 0
channel = 1

[State 2034]
type = TargetLifeAdd
triggerall = !Win
trigger1 = 1
value = ifelse(!Time,-60,-2)

[State 2034]
type = AngleDraw
trigger1 = 1
scale = 3.4,3.6

[State 2034]
type = PosSet
trigger1 = !Time
y = -38
x = 0

[State 2034, Explod]
type = Explod
triggerall = Time <= 210 && Root,Facing = 1 && !Win
trigger1 = (Time%8=0)
ID = 2034
anim = 8201+(Random%3)
pos = -70,210-Random%25
postype = Left
facing = 1
vfacing = 1
bindtime = 1
vel = 3+Random%3,0
removetime = 200
scale = 1,1
sprpriority = 2

[State 2034, Explod]
type = Explod
triggerall = Time <= 210 && Root,Facing = -1 && !Win
trigger1 = (Time%8=0)
ID = 2034
anim = 8201+(Random%3)
pos = 70,210-Random%25
postype = Right
facing = -1
vfacing = 1
bindtime = 1
vel = -3-Random%3,0
removetime = 200
scale = 1,1
sprpriority = 2

[State 2034, Explod]
type = Explod
triggerall = Root,Facing = 1 && Time < 209
trigger1 = !Win
ID = 2034
anim = 8204
pos = ifelse(Time<30,0+Time,Random%150),190
postype = Left
vel = 0,0
facing = -1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1.9,1.9+(Random%5/10)
sprpriority = 4

[State 2034, Explod]
type = Explod
triggerall = Time > 50 && Root,Facing = 1 && Time < 209
trigger1 = !Win
ID = 2034
anim = 8204
pos = -210+Random%150,190
postype = Right
vel = 0,0
facing = -1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1.9,1.9+(Random%5/10)
sprpriority = 4

[State 2034, Explod]
type = Explod
triggerall = Time > 78 && Root,Facing = 1 && Time < 209
trigger1 = !Win
ID = 2034
anim = 8204
pos = -130+Random%150,190
postype = Right
vel = 0,0
facing = -1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1.9,1.9+(Random%5/10)
sprpriority = 4

[State 2034, Explod]
type = Explod
triggerall = Root,Facing = -1 && Time < 209
trigger1 = !Win
ID = 2034
anim = 8204
pos = ifelse(Time<30,0-Time,-1*Random%150),190
postype = Right
vel = 0,0
facing = -1
vfacing = 1
bindtime = -1
removetime = -2
scale = 1.9,1.9+(Random%5/10)
sprpriority = 4

[State 2034, Explod]
type = Explod
triggerall = Time > 55 && Root,Facing = -1 && Time < 209
trigger1 = !Win
ID = 2034
anim = 8204
pos = ifelse(Time<90,210-(Time+Random%100),Random%150),190
postype = Left
vel = 0,0
facing = -1
vfacing = 1
bindtime = 1
removetime = -2
scale = 1.9,1.9+(Random%5/10)
sprpriority = 4

[State 2034, RemoveExplod]
type = RemoveExplod
trigger1 = Time = 210
id = 2034

[State 2034]
type = HitAdd
triggerall = Time > 20 && !Win
trigger1 = (Time%2=0)
value = 1

[State 2034, HitDef]
type = HitDef
triggerall = !Win
trigger1 = Time = 210
attr = S,SA       
hitflag = MAF       
guardflag = MA         
getpower = 0,0
givepower = 0,0
animtype = light         
air.animtype = light
priority = 9,Hit
damage = 1,0
pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = 0,0
guardsound = 0,0
ground.type = High     
ground.slidetime = 0
ground.hittime = 0
air.hittime = 80
air.velocity = 0,0
numhits = 0
fall = 1
fall.recovery = 0

[State 2034, TargetBind]
type = TargetBind
triggerall = !Win
trigger1 = Time = 208
time = 1
id = -1
pos = 140*Root,Facing,-80

[State 2034]
type = Explod
triggerall = !Win
trigger1 = Time = 210
anim = 8040
ID = 8161
pos = 80,-70
postype = p2
facing = -1
vfacing = 1
bindtime = 1
removetime = -2
scale = .4,.4
sprpriority = 2

[State 2034, StopSnd]
type = StopSnd
trigger1 = MoveHit
trigger2 = Win
channel = 1

[State 2034, StopSnd]
type = StopSnd
trigger1 = NumExplod(2034)=0
channel = 2

[State 2034, DestroySelf]
type = DestroySelf
trigger1 = MoveHit


EnemyState:
[Statedef 2033]
type = U
movetype = H
physics = N
velset = 0,0
sprpriority = 1

[State 2033, ScreenBound]
type = ScreenBound
trigger1 = 1
value = 0
movecamera = 0,0

[State 2033]
type = Explod
trigger1 = !Time
anim = 8040
ID = 8161
pos = 60,-75
postype = p1
facing = -1
vfacing = 1
bindtime = 1
removetime = 40
scale = .35,.35
sprpriority = 2

[State 2033, PosAdd]
type = PosSet
trigger1 = !Time
x = 110*Facing
y = -110

[State 2033, ChangeAnim2]
type = ChangeAnim2
trigger1 = !Time
value = 5050

[State 2033]
type = Gravity
trigger1 = Time <= 15

[State 2033, ChangeState]
type = ChangeAnim2
trigger1 = Pos y >= -1
value = 5120
persistent = 0

[State 2033]
type = VelSet
trigger1 = Pos y >= 0
trigger2 = Time = 40
y = 0
x = 0

[State 2033]
type = PlaySnd
trigger1 = Anim = 5120
value = F7, 2
persistent = 0

[State 2033]
type = ChangeAnim2
trigger1 = Time = 30
value = 2033

[State 2033]
type = VelSet
trigger1 = Time = 30
x = -1

[State 2034]
type = Explod
trigger1 = Life = 0
anim = 5110
ID = 8205
pos = -140,10
postype = p2
facing = -1
vfacing = 1
bindtime = 1
removetime = 420
ownpal = 1
scale = const(size.xscale)*1.7,const(size.yscale)/1.7
sprpriority = 0
persistent = 0

[State 2033, PalFXWiz]
type = PalFX
trigger1 = Life = 0
time = 999
add = 100,100,180
mul = 20,100,20
sinadd = 0,0,0,0
invertall = 0
color = 256

[State 2034]
type = Explod
trigger1 = Life = 0
anim = 5110
ID = 8205
pos = -140,10
postype = p2
facing = -1
vfacing = 1
bindtime = 1
removetime = -1
ownpal = 0
scale = const(size.xscale)*1.7,const(size.yscale)/1.7
sprpriority = 0
persistent = 0

[State 2033]
type = SelfState
trigger1 = Life = 0
value = 5150


TFS's place in all of this.
;Falcon Punch
[Statedef 2030]
type = S
movetype = A
physics = S
anim = 2030
sprpriority = 2
ctrl = 0

[State 2030, Explod]
type = Explod
trigger1 = !Time
anim = 8002
ID = 8002
pos = 140,150
postype = left
facing = 1
vfacing = 1
bindtime = 1
removetime = 48
supermovetime = 90
pausemovetime = 90
scale = .5,.5
sprpriority = -2

[State 2030, Explod]
type = Explod
trigger1 = !Time
anim = 8003
ID = 8003
pos = 140,150
postype = left
facing = 1
vfacing = 1
bindtime = 1
removetime = 48
supermovetime = 90
pausemovetime = 90
scale = .5,.5
sprpriority = -2

[State 2030, Explod]
type = Explod
trigger1 = !Time
anim = 80031
ID = 80031
pos = 160,150
postype = left
vel = 0,0
facing = 1
vfacing = 1
bindtime = 1
removetime = 48
supermovetime = 90
pausemovetime = 90
scale = .5,.5
sprpriority = -2

[State 2030, Explod]
type = Explod
triggerall = Time < 49
trigger1 = (Time%4=0)
anim = 8550
ID = 8550
pos = 0,-40
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 4
supermovetime = 90
pausemovetime = 90
scale = ((90-Time)*.01),((90-Time)*.01)
sprpriority = 3

[State 2030, SuperPause]
type = SuperPause
trigger1 = !Time
time = 48
anim = -1
sound = S24,0
pos = 0,0
darken = 1
movetime = 48
p2defmul = 0
poweradd = -3000
unhittable = 1

[State 2030, Explod]
type = Explod
triggerall = !NumHelper(2032)
trigger1 = AnimElem = 2
anim = 8551
ID = 8551
pos = 0,-40
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = 20
scale = .5,.5
sprpriority = 3

[State 2030, HitDef]
type = HitDef
trigger1 = !Time
attr = S,HA
hitflag = MAF
guardflag = MA
getpower = 0,0
givepower = 120
animtype = hard
air.animtype = hard
priority = 9,Hit
damage = 70,30
pausetime = 0,0
sparkno = -1
guard.sparkno = -1
sparkxy = 0,0
hitsound = S24,1
guardsound = 0,0
ground.type = High
ground.slidetime = 20
ground.hittime = 20
air.hittime = 20
ground.velocity = -8,-5
air.velocity = -8,-3
fall = 1
kill = ifelse(enemynear,Life != 0,0,1)
palfx.time = 20
palfx.mul = 250,189,120
palfx.add = 240,38,0
persistent = 0
envshake.ampl = 6
envshake.freq = 178
envshake.time = 15

[State 2030]
type = TargetState
trigger1 = MoveHit = 1
value = 2031
persistent = 0

[State 2030, HitSpark]
type = Explod
trigger1 = MoveGuarded
anim = 8901
ID = 8901
pos = enemy,const(size.ground.front),(target,const(size.mid.pos.y))
postype = p2
facing = -1
vfacing = 1
bindtime = 1
removetime = -2
scale = .5,.5
sprpriority = 6
ignorehitpause = 1
persistent = 0

[State 2030]
type = Helper
triggerall = NumTarget
trigger1 = Target,Life != 0
trigger1 = MoveHit = 20
helpertype = normal
name = "D_Rip"
ID = 2032
stateno = 2032
pos = 0,-120
postype = front
facing = -1
keyctrl = 0
ownpal = 0
size.xscale = .35
size.yscale = .35
persistent = 0

[State 2030]
type = PlayerPush
trigger1 = NumHelper(2032)
value = 0

[State 2030, AssertSpecial]
type = AssertSpecial
trigger1 = NumHelper(2032)
flag = invisible

[State 2030, NotHitBy]
type = NotHitBy
trigger1 = NumHelper(2032)
value = SCA,NA,SA,HA,NP,SP,HP,NT,ST,HT
time = 1

[State 2030]
type = ChangeState
triggerall = NumHelper(2032)
trigger1 = Win && Helper(2032),NumExplod(2034) = 0
value = 0
ctrl = 1

[State 2030, ChangeState]
type = ChangeState
trigger1 = AnimTime = 0 && !NumHelper(2032)
trigger2 = Time > 100 && !NumHelper(2032)
value = 0
ctrl = 1

[color=red]Changes to State 2035 for win pose is the Dino Bg is present[/color]

;Win
[Statedef 2035]
type = S
movetype = I
physics = N
anim = 8203
velset = 2,0
sprpriority = 2

[State 2035]
type = AngleDraw
trigger1 = 1
scale = 1.6,1.6

[State 2035]
type = Turn
trigger1 = 0

[State 2035]
type = PosSet
trigger1 = !Time && Facing = 1
y = 35
x = -200

[State 2035]
type = PosSet
trigger1 = !Time && Facing = -1
y = 35
x = 200

[State 2035]
type = PlaySnd
trigger1 = !Time
value = 2030,1

[State 2035, Explod]
type = Explod
trigger1 = !Time
ID = 2035
anim = 2035
pos = 0,-70
postype = p1
facing = 1
vfacing = 1
bindtime = -1
removetime = 600
scale = .6,.6
sprpriority = 3

[State 2035]
type = ScreenBound
trigger1 = NumHelper(2032)
value = 0
movecamera = 0,0

[State 2035]
type = PlaySnd
trigger1 = Time = 150
value = 2030,2

[State 2035]
type = PlaySnd
trigger1 = Time = 250
value = 2030,3

[State 2035]
type = CHangeAnim
trigger1 = Time = [150,380]
value = 8203
elem = 2

[State 2035, Explod]
type = Explod
triggerall = Time = [250,300]
trigger1 = (Time%8=0)
anim = 8206
ID = 8206
pos = -60,-70
postype = p1
facing = 1
vfacing = 1
bindtime = 1
vel = 0,-1
random = 20,20
removetime = -2
scale = 1,1
sprpriority = 1

[State 2035]
type = VelSet
trigger1 = Time = 151
x = 0

[State 2035]
type = VelSet
trigger1 = Time = 381
x = 2

[State 2035]
type = AssertSpecial
trigger1 = FrontEdgeBodyDist > -170
flag = RoundNotOver
Card Sagas Wars > what ever you like.
Quote from: Cybaster on February 19, 2010, 05:27:30 PM
POTS has his name in 50% of characters' readme. I shall have 50% too, but for stages ! :ninja: ;D

Byakko

All this time and you still haven't learned you have to post your code if you want anyone to help you ?
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Hadoabuser

&gt;_&gt; Yea, I keep 4getting. I'm used to just reading issues and going from there, without code.

Editing first post.
Card Sagas Wars > what ever you like.
Quote from: Cybaster on February 19, 2010, 05:27:30 PM
POTS has his name in 50% of characters' readme. I shall have 50% too, but for stages ! :ninja: ;D

Hadoabuser

Ok here goes.

For what I'm saying to make sense plz watch.
Falcon Punch

As u see in the end when/if p2 dies an explod is made using the liedead animaiton and TFS riding the dino animation happens, the last set of pics show why the position is a problem.

The way I asked in the first post was just for somebody to explain to me why an explod's position shifts even tho the player that created it always ends up in the same spot. The first pics show p2's screen position b4 getting put into a custom state. The second shows where p2 is at the start of the custom state.
Card Sagas Wars > what ever you like.
Quote from: Cybaster on February 19, 2010, 05:27:30 PM
POTS has his name in 50% of characters' readme. I shall have 50% too, but for stages ! :ninja: ;D

Cyanide

well, your description of the actual fault still leaves a bit to be desired as that's still reading as gibberish to me. WHICH explod is broken? the falcon? the dinosaurs? the sonic riding a dinosaur? the flat sonic? the giant BG image?

[State 2033, PosAdd]
type = PosSet
trigger1 = !Time
x = 110*Facing
y = -110
If you're facing to the left, this will always put you in the same place on the X axis. Anything else you're going to need to describe your fault a little more concisely.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Hadoabuser

#5
Crap still not making sense.

The explod at the end, the one made by p2 (the flat sonic). The position of this is the problem.


[color=red]Explod that doesn't have Palfx applied[/color]
[State 2034]
type = Explod
trigger1 = Life = 0
anim = 5110
ID = 8205
pos = -140,10
postype = p2
facing = -1
vfacing = 1
bindtime = 1
removetime = 420
ownpal = 1
scale = const(size.xscale)*1.7,const(size.yscale)/1.7
sprpriority = 0
persistent = 0

[State 2033, PalFXWiz]
type = PalFX
trigger1 = Life = 0
time = 999
add = 100,100,180
mul = 20,100,20
sinadd = 0,0,0,0
invertall = 0
color = 256

[color=red]Explod that has Palfx applied[/color]
[State 2034]
type = Explod
trigger1 = Life = 0
anim = 5110
ID = 8205
pos = -140,10
postype = p2
facing = -1
vfacing = 1
bindtime = 1
removetime = -1
ownpal = 0
scale = const(size.xscale)*1.7,const(size.yscale)/1.7
sprpriority = 0
persistent = 0


The position of this seems to change depending on where p2 is at the start of the move. Thats what I'm not understanding.
Card Sagas Wars > what ever you like.
Quote from: Cybaster on February 19, 2010, 05:27:30 PM
POTS has his name in 50% of characters' readme. I shall have 50% too, but for stages ! :ninja: ;D

Cyanide

Left, right, up, down? If you're unsure of which direction it's going, please confirm that with some smaller numbers on it's position. X would be my bet.

P2 is always in the same place no matter what according to the code. X will be -110 or 110. Does anim 2033 make him disappear?


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Hadoabuser

#7
Great idea. It moved about 300-330 pixels to the left, somewhere around there.  :-\ Well now that I know the position isn't random I can use either an ifelse statement or some equation to make it act correctly, I'll try tomorrow.

Yea thats why I'm not getting why the explod moves, and no its the "getting stomped on" animation, just sprites 5040,0 and 5040,20 in a loop.


Turns out I was so focused on the position "shifting" I failed to notice that the problem was the postype, it needed to be p1 instead of p2.
Card Sagas Wars > what ever you like.
Quote from: Cybaster on February 19, 2010, 05:27:30 PM
POTS has his name in 50% of characters' readme. I shall have 50% too, but for stages ! :ninja: ;D