Problems with another hyper

Started by TrinitroRoy, April 28, 2013, 02:24:42 PM

Previous topic - Next topic

TrinitroRoy

Hello again.
I'm coding a new hyper, but I get problems with the projectile helpers:

;Polaris Large Star
[Statedef 2201]
Type = A
Movetype= A
Physics = N
Ctrl = 0
Sprpriority = 5
anim = 2201

[State 2201]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 2201]
type = AngleDraw
trigger1 = 1
scale = 1.5,1.5
ignorehitpause = 1

[State 2201]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 2201, HitOverride]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP,AT
time = -1
stateno = 1002
ignorehitpause = 1

[State 2201, hitby]
type = hitby
trigger1 = 1
value = SCA,AP
time = -1

[State 2201, var]
type = varset
trigger1 = movecontact
var(0) = 1+(moveguarded!=0)

[State 2201]
type = velset
trigger1 = 1
X = 1

[State 2201]
type= HitDef
trigger1 = !Movecontact
attr = A, SP
hitflag = MAF
guardflag = MA
damage = 100, 50
animtype = Medium
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 0, 1
sparkno = S8050*10**(random%4)
guard.sparkno = S8030
sparkxy = -30+random%10,-28+random%10
hitsound   = s1,10
guardsound = s2,0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity = -8, 0
guard.velocity = -8
air.velocity = -4,-5
airguard.velocity= -4,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 0
fall.recover = 1
fall.recovertime = 39
air.fall = 1
yaccel = 0.4
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

;[State 2201, ChangeState]
;type = changestate
;trigger1 = var(0)
;value = 1203

[State 2100]
type = Helper
trigger1 = movecontact
trigger2 = time = 299
stateno = 22010
name = "Polaris Small Star"
ID = 2201
pos = (helper, pos x), (helper, pos y+48)
postype = p1
;bindtime = 1
;removetime = -2
ownpal = 1
;sprpriority = 5
facing = 1
ignorehitpause = 1

[State 2201]
type = DestroySelf
trigger1 = movecontact
trigger2 = time = 300
trigger3 = FrontEdgeBodyDist <= -42

;---------------------------
;Polaris Small Star 1
[Statedef 22010]
Type = A
Movetype= A
Physics = N
Ctrl = 0
Sprpriority = 5
anim = 2202

[State 2201]
type = AssertSpecial
trigger1 = 1
flag = noshadow
ignorehitpause = 1

[State 2201]
type = AngleDraw
trigger1 = 1
scale = 1,1
ignorehitpause = 1

[State 2201]
type = Trans
trigger1 = 1
trans = addalpha
alpha = 256, 256
ignorehitpause = 1

[State 2201, HitOverride]
type = hitoverride
trigger1 = 1
attr = SCA,AA,AP,AT
time = -1
stateno = 1002
ignorehitpause = 1

[State 2201, hitby]
type = hitby
trigger1 = 1
value = SCA,AP
time = -1

[State 2201, var]
type = varset
trigger1 = movecontact
var(0) = 1+(moveguarded!=0)

[State 2201]
type = velset
trigger1 = 1
X = 4

[State 2201]
type = velset
trigger1 = time = 20
X = 2

[State 2201]
type= HitDef
trigger1 = !Movecontact
attr = A, SP
hitflag = MAF
guardflag = MA
damage = 50, 25
animtype = Medium
air.animtype = Back
ground.type = High
priority = 6, Hit
pausetime = 0, 1
sparkno = S8050*10**(random%4)
guard.sparkno = S8030
sparkxy = -30+random%10,-28+random%10
hitsound   = s1,10
guardsound = s2,0
ground.slidetime = 23
ground.hittime = 23
guard.hittime = 21
air.hittime = 23
guard.ctrltime = 21
airguard.ctrltime = 21
ground.velocity = -8, 0
guard.velocity = -8
air.velocity = -4,-5
airguard.velocity= -4,-5
ground.cornerpush.veloff = 0
air.cornerpush.veloff = 0
down.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
airguard.cornerpush.veloff = 0
fall = 0
fall.recover = 1
fall.recovertime = 39
air.fall = 1
yaccel = 0.4
envshake.time = 10
envshake.freq = 90
envshake.ampl = 5

[State 2201]
type = DestroySelf
trigger1 = FrontEdgeBodyDist <= -42

1. Polaris Small Star doesn't change its speed. SOLVED!
2. Polaris Small Star sometimes appear misaligned. I'm trying to simulate the the spliting of the Polaris Large Star.
Anyone can help there? Thanks in advance!
===My discord servers===
Unlimited Force HQ: https://discord.gg/hnyK7JZ
Mega Man Megamix Engine Help Server: https://discord.gg/Wjm9GYU

Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
Quote from: bitter nothings on April 30, 2010, 09:35:51 PM
you are all small and can't grow manly sideburns

Cybaster


[State 2201]
type = velset
trigger1 = 1
X = 4

[State 2201]
type = velset
trigger1 = time = 20
X = 2

The 2nd one sets the vel to 2 at time=20, but the first one sets the vel to 4 every single tick.

TrinitroRoy

Quote from: Cybaster on April 28, 2013, 02:30:11 PM

[State 2201]
type = velset
trigger1 = 1
X = 4

[State 2201]
type = velset
trigger1 = time = 20
X = 2

The 2nd one sets the vel to 2 at time=20, but the first one sets the vel to 4 every single tick.
Whoops. Gotta fix it.
EDIT: Fixed, and the speed problem is solved. The misalignment problem, however...
===My discord servers===
Unlimited Force HQ: https://discord.gg/hnyK7JZ
Mega Man Megamix Engine Help Server: https://discord.gg/Wjm9GYU

Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
Quote from: bitter nothings on April 30, 2010, 09:35:51 PM
you are all small and can't grow manly sideburns

Seravy

[State 2100]
type = Helper
trigger1 = movecontact
trigger2 = time = 299
stateno = 22010
name = "Polaris Small Star"
ID = 2201
pos = (helper, pos x), (helper, pos y+48)
postype = p1
;bindtime = 1
;removetime = -2
ownpal = 1
;sprpriority = 5
facing = 1
ignorehitpause = 1


It should be pos=0,48.
postype=p1 already means it's relative to the position of the one creating it.
Besides helper,pos x would use the position of a random helper instead of itself, the position of itself would be pos x without a redirection.

TrinitroRoy

Okay, tried that.
It then always appeared below.
However, when I changed the 48 to 0, it then appeared like it should.
Thanks, Seravy. You're helping me a lot.
===My discord servers===
Unlimited Force HQ: https://discord.gg/hnyK7JZ
Mega Man Megamix Engine Help Server: https://discord.gg/Wjm9GYU

Touhou database (by Ryouchi):
http://mugenfreeforall.com/index.php?/topic/8257-touhou-project/
Quote from: bitter nothings on April 30, 2010, 09:35:51 PM
you are all small and can't grow manly sideburns