collapse

Author Topic: HitSpark Explod question  (Read 1930 times)

0 Members and 1 Guest are viewing this topic.

Offline MaverickZr0

  • S-Rank
  • Contributor
  • ****
  • Posts: 2462
  • Country: United States us
  • Last Login:November 25, 2016, 02:18:47 AM
HitSpark Explod question
« on: June 16, 2013, 02:26:19 PM »
Hi guys, I have 2 questions regarding this.

1) When I add hitsparks as explods, how can I make it so that they appear if the character trades. For example, my characters hit each other at the same time and no sparks appear, how can I make it so that sparks do appear?
(click to show/hide)

2) This problem below,

I'm trying to add hitsparks to my character's fierce punch but am having some trouble.

For the standing far fierce punch, I added the hitspark with no problem.
(click to show/hide)

For his standing close fierce, it is a two hit attack. It hits on animelem = 4 and animelem = 5. When I add the explods, both appear on animelem 4 no matter what. nothing appears on the 5th frame which also hits, the sparks just finish out their animation.

(click to show/hide)

Here is my code with the explods in it:
Code: [Select]
; Standing Hard Punch
[Statedef 220]
type    = S
movetype= A
physics = S
juggle  = 4
poweradd= 65
ctrl = 0
velset = 0,0
anim=ifelse(p2bodydist x<30,221+(var(3)=10)*2,220)
sprpriority = -1

[State 220, 1]
type = PlaySnd
trigger1 = Time = 2
value = S0, 3

[State 220, 1]
type = PlaySnd
trigger1 = Animelem = 1 && anim= 220
value = S220, 0

[State 220, 1]
type = PlaySnd
trigger1 = Animelem = 1 && anim = 221
value = S221, 0

[State 0, Explod] ;Spark for standing far heavy
type = Explod
trigger1 = anim = 220
trigger1 = movehit
anim = 8102
ID = 8102
pos = 110,-70
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = .5,.5
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0
ignorehitpause = 1
persistent=0

[State 0, Explod] ;Spark for standing close heavy on the 4th frame
type = Explod
trigger1 = anim = 221
trigger1 = movehit
trigger2 = animelem = 4
trigger2 = movehit
anim = 8102
ID = 8102
pos = 50,-50
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = .5,.5
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0
ignorehitpause = 1
persistent=0

[State 0, Explod] ;Spark for standing close heavy on the 5th frame
type = Explod
trigger1 = anim = 221
trigger1 = movehit
trigger2 = animelem = 5
trigger2 = movehit
anim = 8102
ID = 8102
pos = 65,-80
postype = p1  ;p2,front,back,left,right
facing = 1
vfacing = 1
bindtime = 1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
pausemovetime = 0
scale = .5,.5
sprpriority = 5
ontop = 1
shadow = 0,0,0
ownpal = 0
removeongethit = 0
ignorehitpause = 1
persistent=0

[State 220, 2]
type = HitDef
trigger1 = animelem=5 && anim=220
trigger2 = animelem=4 && anim=221
trigger3 = animelem=5 && anim=221
attr = S, NA
animtype  = Medium
damage    = 50
guardflag = MA
pausetime = 12,12
sparkno = -1
sparkxy = -10,-70
guard.sparkno=s7050
hitsound   = S1,3
guardsound = S1, 9
ground.type = High
ground.slidetime = 12
ground.hittime  = 13
ground.velocity = -5.5
air.velocity = -2.5,-4

[State 220, 4]
type = SprPriority
trigger1 = AnimElem = 5
value = 2

[State 220, 5]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1

What do?



Offline Space (DCL)

  • IMT Content Architect
  • *
  • Posts: 1164
  • Country: United States us
  • Last Login:Today at 10:51:51 AM
  • If you see this, I'm alive!
Re: HitSpark Explod question
« Reply #1 on: June 16, 2013, 04:55:14 PM »
Try this:

trigger1 = movehit=1 && numtarget
trigger1 = enemynear,time<= 0 && enemynear,movetype = H && (enemynear,stateno!= [120,159]) ;Not in Guard States

Then make sure: ignorehitpause = 1

>.<

My bad, try again with the following fixed above...
« Last Edit: June 16, 2013, 05:24:23 PM by DCL »
(click to show/hide)
zzz...I'm top tier...screw you Doom and Wesker...zzz

Offline MaverickZr0

  • S-Rank
  • Contributor
  • ****
  • Posts: 2462
  • Country: United States us
  • Last Login:November 25, 2016, 02:18:47 AM
Re: HitSpark Explod question
« Reply #2 on: June 16, 2013, 05:18:16 PM »
That caused the 3 sparks to appear at the same time xD

Offline Space (DCL)

  • IMT Content Architect
  • *
  • Posts: 1164
  • Country: United States us
  • Last Login:Today at 10:51:51 AM
  • If you see this, I'm alive!
Re: HitSpark Explod question
« Reply #3 on: June 16, 2013, 09:06:46 PM »
That caused the 3 sparks to appear at the same time xD

I made a mistake, forgot to add something, try it again with the code fixed in my first post...
(click to show/hide)
zzz...I'm top tier...screw you Doom and Wesker...zzz

Offline MaverickZr0

  • S-Rank
  • Contributor
  • ****
  • Posts: 2462
  • Country: United States us
  • Last Login:November 25, 2016, 02:18:47 AM
Re: HitSpark Explod question
« Reply #4 on: June 16, 2013, 10:15:29 PM »
Hmm, still didn't fix it. :(

I'm only coding them as explods so that I can resize the sparks, I am not sure if this is the most efficient way.

Offline Space (DCL)

  • IMT Content Architect
  • *
  • Posts: 1164
  • Country: United States us
  • Last Login:Today at 10:51:51 AM
  • If you see this, I'm alive!
Re: HitSpark Explod question
« Reply #5 on: June 16, 2013, 11:45:40 PM »
Hmm strange, usually i just put -1 on the hitspark parameter, then just put this one explod and it works...

[State 200, Hitspark]
type=Explod
trigger1=movehit=1&&numtarget
trigger1=target,time<=0&&p2movetype=H
anim=S8200
ID=8200
postype=p2
bindtime=1
removetime=-2
sprpriority=100
ownpal=1
ignorehitpause=1
(click to show/hide)
zzz...I'm top tier...screw you Doom and Wesker...zzz

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: HitSpark Explod question
« Reply #6 on: June 17, 2013, 02:40:12 AM »
If you're using 1 explod sctrl only you can use movehit = 1, it will retrigger each hit, but only within the attack, and only if you're not hit during it.

If you want to use 3 alternative hitsparks you need to limit them based on your frame, which you're not doing

Trigger1 = movehit = 1 && animelemtime(4) >= 0 && animelemtime(5) < 0
Will only trigger within animelem 4. If you know how long it is and don't want to write such a long trigger
trigger1 = movehit = 1 && (animelemtime(4) = [0,6])

To get it to trigger regardless of you being knocked out of the state you need to use the helper method. That's where helpers detect parent movecontact and spawn a spark based on a variable set by sparkxy in the hitdef.

sparkno = -1+0*(var(animation) := animation value)
sparkxy = 0*(var(X axis):= x axis), 0*(var(Y axis):= Y axis)

And the helper spawns the explod accordingly in it's own states when parent, movehit = 1. Awkward, wanky.

My preferred method if you're using scaled sparks is to abuse a feature of 1.0. Localcoord resizes everything. cns scale parameters only does character. Use localcoord to double your resolution and then use cns scale to bring the character back up to size. Sparks will still be small, but the character will be normal size. You may need to tweak velocities etc. But it means the sparks are bugless because they're part of a hitdef.

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
[Today at 11:17:34 AM]


Neon Light Force Demo by O Ilusionista
[Today at 11:15:00 AM]


The Spider release + Spider-Man game by GTFoxN6Y
[Today at 01:00:10 AM]


Classic VS : Athena by ELECTRO
[May 15, 2024, 01:25:51 PM]


D2TD VS Showcase Thread by D2TD
[May 12, 2024, 10:20:11 AM]


Ballroom Hallway (1.1 Only/AIGS) by Vegaz by LightFlare
[May 09, 2024, 11:53:48 AM]


Lasombra's IKEMEN Go Interactive Stages' WIP Topic and Releases by Lasombra Demon
[April 21, 2024, 12:09:20 PM]


Ultimate E. Honda + stage by ELECTRO
[April 18, 2024, 09:47:24 PM]


Sunset Beach (1.1 Only/AIGS) by Vegaz by LightFlare
[April 16, 2024, 06:55:00 PM]


Wonder Twins 2.0 by brucewayne74, Shining and Skhsato123 by brucewayne74
[April 05, 2024, 06:07:48 PM]

* IMT Calendar

May 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 31

SimplePortal 2.3.5 © 2008-2012, SimplePortal