YesNoOk
avatar

need some code (Read 317 times)

Started by vgames, May 10, 2013, 01:12:18 pm
Share this topic:
need some code
#1  May 10, 2013, 01:12:18 pm
  • **
  • Genan Shiranui forever!!!
    • USA
    • johncrystal00@embarqmail.com
Does anybody have any bit of code that would be good for making blood particles fly through the air smoothly? The animation sequence that i found in the mortal kombat project v4.1 is not all that great. thanks.
Recreating Samurai Shodown to make it bloodier.
Re: need some code
#2  May 10, 2013, 01:19:19 pm
  • ****
  • 8-bit - MS Paint spriter and mugen programmer
    • Bosnia and Herzegovina
    • jubinkoduckssbestfriendsevers@gmail.com
    • www.geocities.ws/duckss/

  • Online
Only what you need is to creeate a explod to p2 when you atack him...
I'm Making someting very fucked up >:)
Extreme Sula Progress:
81 of 100 attacks are created
Re: need some code
#3  May 10, 2013, 04:36:03 pm
  • **
  • Genan Shiranui forever!!!
    • USA
    • johncrystal00@embarqmail.com
Oh yeah i got that far already. the blood shows up and everything. but i was wondering if there was a better set up for the actual path that the blood flies. i see that its done by positioning the blood sprites to make it look like theyre flying through the air via the action that i made for them in the fightfx script file. so is their code with better positioning out there?

Also would there be a way to make the blood an actual projectile like a fireball would be that could interact with the floor and characters when it hits them? at this point using the method up above it seems that the only way to make the blood look like its splatting on the floor is by timing its animation and not actually having it make a separate sprite for the blood splat when its done flying through the air and has hit the floor.
Recreating Samurai Shodown to make it bloodier.
Re: need some code
#4  May 10, 2013, 04:41:34 pm
  • ****
  • 8-bit - MS Paint spriter and mugen programmer
    • Bosnia and Herzegovina
    • jubinkoduckssbestfriendsevers@gmail.com
    • www.geocities.ws/duckss/

  • Online
if you know the projectile code and sprite the blood ball everything can be ok...
I'm Making someting very fucked up >:)
Extreme Sula Progress:
81 of 100 attacks are created
Re: need some code
#5  May 10, 2013, 04:45:25 pm
  • **
  • Genan Shiranui forever!!!
    • USA
    • johncrystal00@embarqmail.com
Are u saying i should look at how the blood ball is coded in mkproject?
Recreating Samurai Shodown to make it bloodier.
Re: need some code
#6  May 10, 2013, 04:46:49 pm
  • ****
    • USA
    • taybearmugenstuff.webs.com/
are you asking if its possible to make the blood like, land on a character when its knocked out of them? it's possible but you have to create sprites of the blood hitting and landing on the character. and to make it a "projectile" are you saying it hurts the other character when knocked out? if so i guess that's possible but would be really annoying to code. and the splatting is more of the animation rather than coding. the coding would just be it coming out and going down. the animation part the more frames you have the smoother it looks.
Re: need some code
#7  May 10, 2013, 04:50:14 pm
  • ****
  • 8-bit - MS Paint spriter and mugen programmer
    • Bosnia and Herzegovina
    • jubinkoduckssbestfriendsevers@gmail.com
    • www.geocities.ws/duckss/

  • Online
no, if you want a most simple code here:
Code:
[Statedef 1570]
type    = S
movetype= A
physics = S
juggle  = 5
velset = 0,0
anim = 4555
ctrl = 0
sprpriority = 2

[State 184, 2]
type = Projectile
trigger1 = AnimElem = 4   <=== element of first anim (you character)
projanim = 4556
projremanim = 4557 <=== remove anim
projhits = 9
projremovetime = 20
projhitanim - 4558 <======= hit anim
projid = 4556
velocity = 3,0           <============ a projectile moving   x,y
offset = 48,-35   <=== offset
attr = S, HP
damage   = 25,10
animtype = heavy
getpower = 0,0
guardflag = MAF
hitflag = MAFD
pausetime = 5,3
hitsound = S5,4
sparkno = S8008
sparkxy = 120,0
guard.sparkno = S8030
guardsound = S1,7
ground.type = Low
ground.slidetime = 25
ground.hittime  = 25
ground.velocity = -10,-6
air.animtype = Back
air.velocity = -10,-6
air.juggle = 3
down.velocity = -10
down.hittime = 30
down.bounce = 0
fall = 1

[State 1020, 7]
type = ChangeState
trigger1 = AnimTime = 0
value = 0
ctrl = 1
I'm Making someting very fucked up >:)
Extreme Sula Progress:
81 of 100 attacks are created
Last Edit: May 10, 2013, 04:54:10 pm by The DuckSS
Re: need some code
#8  May 10, 2013, 04:58:12 pm
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
Why are you post random code ?

The easiest way is to have an explod with a nice blood animation flying through the air. However, that won't give you much control over it.

To get the best control over it, create a helper and give it various vels/veladd in order to create some sort of gravity.
Change the animation when the helper reaches the ground.
You can even have a different helper being boided to P2 if your blood helper touches P2, using dist triggers, in order to simulate P2 being full of blood. However, this won't look very good most of the time, especially when P2 starts fighting again afterwards.
Re: need some code
#9  May 10, 2013, 05:04:47 pm
  • **
  • Genan Shiranui forever!!!
    • USA
    • johncrystal00@embarqmail.com
What i want is a blood drop to spawn and fly through the air. when it hits the floor i want it to make a blood splat. forget it hitting the characters too. is there a way to do this or can it only be done using the way its done in mk project via actions and animations.
Recreating Samurai Shodown to make it bloodier.
Re: need some code
#10  May 10, 2013, 05:17:45 pm
  • ****
  • 8-bit - MS Paint spriter and mugen programmer
    • Bosnia and Herzegovina
    • jubinkoduckssbestfriendsevers@gmail.com
    • www.geocities.ws/duckss/

  • Online
I'm thinking:
it can be created on other character in falling state to add a blood...
I'm Making someting very fucked up >:)
Extreme Sula Progress:
81 of 100 attacks are created
Re: need some code
#11  May 10, 2013, 05:42:13 pm
  • ******
  • Limited time to use Infinite power !
    • France
    • network.mugenguild.com/cybaster/
is there a way to do this or can it only be done using the way its done in mk project via actions and animations.
With the way you're asking the question, I can only wonder if you know the basics of Mugen coding ?
Of course you're going to need animations. How could you display your sprites in Mugen without animations ?

So yes, you can do it with explods and use a modify explod (or removeexplod + spawning another explod) when the explod reaches the ground, to display the blood spash on the ground.
Or you can use a helper to have better control on the vels, and use changestates/changeanim as you please.

You may want to look at POTS' Lei-Lei, which has blood animations like you're asking for.
Re: need some code
#12  May 10, 2013, 06:20:57 pm
  • **
  • Genan Shiranui forever!!!
    • USA
    • johncrystal00@embarqmail.com
Thanks a lot man. i havent got the basics down just yet but i do know that sprites are needed. how does this modify explod or removeexplod work. could u give me a small example?

Ill check out lei lei too.
Recreating Samurai Shodown to make it bloodier.