YesNoOk
avatar

Projectile limited to four hits (Read 3137 times)

Started by Creamy_Goodness, January 12, 2022, 01:22:21 PM
Share this topic:
Projectile limited to four hits
#1  January 12, 2022, 01:22:21 PM
  • ***
    • USA
    • creamyg.jdluke.com/

> I'm trying to code a projectile that hits up to ten times. However, the number of hits is being limited to only four hits, and try as I might, I can't get the projectile to deal any more hits. Here is the hitdef for the projectile in question...

[State 1000, 1]
type = Projectile
trigger1 = AnimElem = 4
projanim = 3100
projhitanim = 3100
projcancelanim = -1
projpriority = 1
projheightbound = 103,-64
projedgebound = 100
projscreenbound = 100
projhits = 10
projremovetime = 50
projremove = 0
offset = 0,0
attr = S, HP
damage = 20, 0
animtype = heavy
guardflag = MA
hitflag = MAFDP
pausetime = 10,10
hitsound   = S1,1
sparkno = S99999
sparkxy = 107, -20
guard.sparkno = S3190
guardsound = 6,0
ground.type = Low
ground.slidetime = 25
ground.hittime  = 25
ground.velocity = 0, 0
air.animtype = Back
air.velocity = 0, 0
air.juggle = 3
air.fall = 0
down.velocity = 0, 0
down.hittime = 30
down.bounce = 0
velocity = 0, 0
palfx.time = 40
palfx.add = 30,-40,-140
palfx.sinadd = 60,60,50,10
palfx.color = 0
palfx.invertall = 1
fall = 0
fall.recover = 0
= = = = = = = = = =
Jason "Creamy Goodness" Tenn
http://creamyg.jdluke.com/
Last Edit: January 13, 2022, 09:10:15 PM by Creamy_Goodness
Re: Projectile limited to four hits
#2  January 12, 2022, 01:26:38 PM
  • ***
    • Vietnam
Nothing seems wrong with the code. How many ticks are there in your 4th animelem ?
Re: Projectile limited to four hits
New #3  January 12, 2022, 10:11:30 PM
  • ***
    • USA
    • creamyg.jdluke.com/

@Ichida

"Nothing seems wrong with the code. How many ticks are there in your 4th animelem ?"

> The fourth frame of the character's animation has three ticks. I'm not sure if this will help, but here's the code for the animation in the AIR file...

;
[Begin Action 1200]
Clsn2: 1
  Clsn2[0] = -12, -46, 10, -2
1040,0, 0,0, 2
Clsn2: 1
  Clsn2[0] = -21, -44, 4, -1
1040,1, 0,0, 2
Clsn2: 1
  Clsn2[0] = -26, -41, 6, -3
1040,2, 0,0, 5
Clsn2: 1
  Clsn2[0] = -6, -42, 14, 2
1040,3, 0,0, 3
Clsn2: 1
  Clsn2[0] = -9, -42, 17, -2
Loopstart
1040,4, 0,0, 4
Clsn2: 1
  Clsn2[0] = -5, -41, 15, -3
1040,5, 0,0, 4
= = = = = = = = = =
Jason "Creamy Goodness" Tenn
http://creamyg.jdluke.com/
Last Edit: January 13, 2022, 09:20:26 PM by Creamy_Goodness
Re: Projectile limited to four hits
#4  January 13, 2022, 01:05:27 AM
  • ***
    • Vietnam

Code:
[Begin Action 1200]
Clsn2: 1
  Clsn2[0] = -12, -46, 10, -2
1040,0, 0,0, 2
Clsn2: 1
  Clsn2[0] = -21, -44, 4, -1
1040,1, 0,0, 2
Clsn2: 1
  Clsn2[0] = -26, -41, 6, -3
1040,2, 0,0, 5
Clsn2: 1
  Clsn2[0] = -6, -42, 14, 2
1040,3, 0,0, 3
Clsn2: 1
  Clsn2[0] = -9, -42, 17, -2
Loopstart
1040,4, 0,0, 4
Clsn2: 1
  Clsn2[0] = -5, -41, 15, -3
1040,5, 0,0, 4

The character's animation has nothing to do with the projectile. What was I talking about was the animation no. 3100 tho. The animation no. 1200 has no hitboxes, so I assume that it belongs to the character himself/herself.
Re: Projectile limited to four hits
New #5  January 13, 2022, 12:25:29 PM
  • ***
    • USA
    • creamyg.jdluke.com/

@Ichida

"The character's animation has nothing to do with the projectile. What was I talking about was the animation no. 3100 tho. The animation no. 1200 has no hitboxes, so I assume that it belongs to the character himself/herself."

> Sorry for the misunderstanding. Here's the animation code for the projectile...

;
[Begin Action 3100]
Clsn1: 1
  Clsn1[0] = 32, -36, 89, -17
3060,0, 0,0, 2
Clsn1: 1
  Clsn1[0] = 33, -46, 154, -7
3060,1, 0,0, 3
Clsn1: 1
  Clsn1[0] = 33, -46, 186, -7
3060,2, 0,0, 3
Clsn1: 3
  Clsn1[0] = 33, -59, 147, -17
  Clsn1[1] = 165, -52, 263, -4
  Clsn1[2] = 146, -59, 166, -4
3060,3, 0,0, 3
Clsn1: 3
  Clsn1[0] = 34, -51, 91, -17
  Clsn1[1] = 231, -75, 259, -20
  Clsn1[2] = 90, -100, 232, -13
3060,4, 0,0, 3
Clsn1: 4
  Clsn1[0] = 231, -95, 269, -22
  Clsn1[1] = 89, -104, 232, -13
  Clsn1[2] = 33, -47, 77, -17
  Clsn1[3] = 76, -56, 90, -13
3060,5, 0,0, 3
Clsn1: 4
  Clsn1[0] = 219, -104, 256, -33
  Clsn1[1] = 126, -104, 220, -11
  Clsn1[2] = 33, -38, 68, -19
  Clsn1[3] = 67, -80, 127, -13
3060,6, 0,0, 3
Clsn1: 4
  Clsn1[0] = 212, -104, 248, -75
  Clsn1[1] = 33, -39, 67, -19
  Clsn1[2] = 66, -80, 127, -16
  Clsn1[3] = 126, -104, 213, -12
3060,7, 0,0, 3
Clsn1: 5
  Clsn1[0] = 239, -84, 246, -72
  Clsn1[1] = 143, -104, 230, -81
  Clsn1[2] = 143, -82, 225, -15
  Clsn1[3] = 33, -48, 84, -18
  Clsn1[4] = 83, -87, 144, -13
3060,8, 0,0, 3
Clsn1: 5
  Clsn1[0] = 95, -89, 152, -13
  Clsn1[1] = 151, -100, 185, -15
  Clsn1[2] = 33, -52, 96, -15
  Clsn1[3] = 185, -104, 253, -96
  Clsn1[4] = 184, -71, 239, -17
3060,9, 0,0, 3
Clsn1: 4
  Clsn1[0] = 97, -87, 136, -10
  Clsn1[1] = 186, -76, 248, -18
  Clsn1[2] = 33, -54, 98, -17
  Clsn1[3] = 135, -103, 187, -13
3060,10, 0,0, 3
Clsn1: 5
  Clsn1[0] = 193, -134, 255, -87
  Clsn1[1] = 143, -104, 227, -15
  Clsn1[2] = 99, -84, 144, -13
  Clsn1[3] = 250, -92, 273, -47
  Clsn1[4] = 226, -51, 259, -33
3060,11, 0,0, 3
Clsn1: 3
  Clsn1[0] = 126, -118, 233, -22
  Clsn1[1] = 202, -129, 253, -99
  Clsn1[2] = 244, -92, 262, -79
3060,12, 0,0, 3
Clsn1: 3
  Clsn1[0] = 252, -82, 258, -73
  Clsn1[1] = 224, -120, 259, -97
  Clsn1[2] = 142, -124, 225, -37
3060,13, 0,0, 3
Clsn1: 2
  Clsn1[0] = 224, -122, 264, -99
  Clsn1[1] = 157, -111, 215, -53
3060,14, 0,0, 3
Clsn1: 1
  Clsn1[0] = 165, -87, 195, -67
3060,15, 0,0, 3
3060,16, 0,0, 3
3060,17, 0,0, -1
= = = = = = = = = =
Jason "Creamy Goodness" Tenn
http://creamyg.jdluke.com/
Last Edit: January 13, 2022, 09:19:28 PM by Creamy_Goodness
Re: Projectile limited to four hits
#6  January 13, 2022, 03:34:13 PM
  • ***
    • Vietnam
Took a quick test with your provided code. First of all, the projectile hit five times for me. Since you said that it hit four times for you, I think this issue could be related to specific characters with different size of collision boxes. My training dummy has large collision boxes. So when the projectile appears, it gets hit for five times. And second, you may want to reduce your pausetime to 5,5 or so. In order to lay more hits for the projectile. The animation is 50 ticks in total devide it into 10 per each hit and ultimately you have 5 hits as the final result (or four depending on the opponent's collision boxes).
Re: Projectile limited to four hits
New #7  January 13, 2022, 09:10:08 PM
  • ***
    • USA
    • creamyg.jdluke.com/

@Ichida

"And second, you may want to reduce your pausetime to 5,5 or so. In order to lay more hits for the projectile."

> Hey what do you know, it worked! I changed the pausetime from 10, 10 to 0, 5, and when I did, I was able to land all 10 hits. Thank you very much for your help, and I can now mark this thread as Solved.
= = = = = = = = = =
Jason "Creamy Goodness" Tenn
http://creamyg.jdluke.com/
Last Edit: January 13, 2022, 09:19:54 PM by Creamy_Goodness