YesNoOk
avatar

Hello, I want to Make Helper's Proj hitbox and effect, anyone help? (Read 7568 times)

Started by plangler, July 29, 2023, 02:33:16 pm
Share this topic:
Hello, I want to Make Helper's Proj hitbox and effect, anyone help?
#1  July 29, 2023, 02:33:16 pm
  • avatar
    • South Korea


Like this, I want to adjust the laser effect and the position of the projectile hitbox almost the same.

https://i.imgur.com/iVowpH0.mp4
(i don't know how can i make gif appear on topic)

But look at that GIF! The hitbox is not moving at all, lazer's hitbox Move only diagonally to the bottom right!
and somehow hitbox will disappear when box hit the ground.
But on the other hand, you'll see that the laser effect continues to soar upward.


The laser is also continuously fired in the same direction, if you see that GIF file.
So even if the Lazer Parant helper is on the left, the laser effect and projectile hitbox still be fired from the right!

What should I do here? Can't i make this rotating laser effect exactly the same as the hittbox position of that rotating laser?

Here is Code for that lazer parant helper and lazer projectile helper.

;lazer parant helper
[Statedef 2444]
type = A
movetype = I
physics = N
anim = 9999 ;<<< 9999 mean "no animation", its blank
sprpriority = 5
velset = 1.5,0

[State ]
type = Veladd
trigger1 = vel X >= 0
x = -0.04

[State ]
type = Veladd
trigger1 = vel Y <= 0
y = 0.05

[State ]
type = Velset
trigger1 = vel X <= 0
x = 0

[State ]
type = Velset
trigger1 = vel Y >= 0
y = 0

[State ]
type = BindToParent
trigger1 = 1
time = 300
pos = 80 * cos( Gametime%240 * pi/120), (-60)+80 * sin( Gametime%240 * pi/120)

[State ]
type = Varset
trigger1 = time = 0
v = 44
value = 9

[State ]
type = Varadd
trigger1 = time = [50,60]
trigger1 = (gametime%2) = 1
v = 44
value = 1

[State ]
type = Varset
trigger1 = time = 0
v = 45
value = 4

[State ]
type = Varadd
trigger1 = time = [50,54]
trigger1 = (gametime%2) = 1
v = 45
value = 1

[State ]
type = Helper
trigger1 = time = [50,130]
trigger1 = (gametime%4) = 1
stateno = 2445
id = 2445
helpertype = normal
pos = 0,0
postype = P1
keyctrl = 0
ownpal = 1

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

[State ]
type = destroyself
trigger1 = time >= 300


[Statedef 2445] ; Lazer Projectile
type = S
movetype = I
physics = N
anim = 8083 ; <<<<< 8083 mean lazer animation, that GIF's Black lazer i means.
velset = 0,0
SprPriority = 4

[State ]
type = AngleDraw
trigger1 = 1
scale = 0.7,0.35

[State ]
type = AngleSet
trigger1 = time = 0
value = -60+(parent,time)
ignorehitpause = 1

[State ]
type = Projectile
trigger1 = time = 0
projID = 6115
projhits = 1
projanim = 6115 ; <<< 6115 mean its just red hitbox only
projremove = 1
projpriority = 1
projhitanim = -1
projremanim = -1
projsprpriority = 5
projshadow = 0,0,0
projremovetime = -1
offset = 0, 0
velocity = (parent,var(44))*1.1,(-30+(parent,var(44)*3))
attr = S, HA
getpower = 1,0
damage = 10,5
animtype = diagup
hitflag = MAFD
guardflag = MA
pausetime = 0,5
sparkno = s7000
guard.sparkno = s7010
SparkXY = 0,0
HitSound = s225,0
GuardSound = s121,0
ground.type = High
ground.slidetime = 55
ground.hittime  = 55
ground.velocity = -1,-2
air.velocity = -1,-2
fall = 1
palfx.time = 50
palfx.add = -50,-50,-50
palfx.sinadd = 170,170,180,5
palfx.color = 0
palfx.invertall = 0
envshake.time = 13
envshake.ampl = 3
envshake.freq = 100

[State ]
type = DestroySelf
trigger1 = animtime = 0


Re: Hello, I want to Make Helper's Proj hitbox and effect, anyone help?
#2  July 30, 2023, 11:36:47 am
  • *****
  • Shame on you!
    • USA
What should I do here? Can't i make this rotating laser effect exactly the same as the hittbox position of that rotating laser?
Yes. There's two different methods to make a hitbox match an animation. The easy way would be to center the effect sprite at 0,0 in the anim. Then put the red box around it. The hit box would appear where ever the sprite goes.

The next method would involve F12 and doing some math. I've had to use this way because there's no other way. When you shrink things down using a scale modifier and a few other techniques, the red box doesn't track the sprites perfectly. You'd need to use F12 to capture screen shots and then make a 2nd animation of the hitboxes with a blank animation. Once you overlay the 2nd animation the sprites and hit boxes would line up.

I'm not exactly sure what you're asking. The images you've made don't really show me what you're trying to do. If you use Fighter factory 3, you can use
the Image Editor to build the images in Paint. Open the Image Editor in Sprites. Then in the pop up box, use Edit>Copy. Then Paste that image into paint. You can build up the image by going to the character? then the laser?

Spoiler, click to toggle visibilty
This shows a ball going down on the left side of P1, then bouncing up-right? Or does it teleport over there?


The image on the left wont be able to be scaled or rotated and have the hit box follow perfectly. The one on the right will.
vVv Ryuko718 Updated 10/31/22 vVv