YesNoOk
avatar

infinite priority, projectiles (Read 1130 times)

Started by BC, August 10, 2008, 01:25:03 pm
Share this topic:

BC

infinite priority, projectiles
#1  August 10, 2008, 01:25:03 pm
  • ****
    • UK
    • www.mugenevolution.co.uk/Forum
how do i remove infinite priority from projectiles? my characters projectiles go through other projectiles. i wanna make them hit another projectile and destroy.


would i need to give it a clsn2 box?
click the image to join my forum ;)
Re: infinite priority, projectiles
#2  August 10, 2008, 02:00:27 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
is is a helper projectile with a hitdef? or  helper projectile with an animation and a invisible projectile?

BC

Re: infinite priority, projectiles
#3  August 10, 2008, 02:12:49 pm
  • ****
    • UK
    • www.mugenevolution.co.uk/Forum
ok well i figured it out for projectile code, just now all thats left is helper projectiles?

just added a blue collision box and made it standard.


obviously with a helper its a different story, because once the helper gets hit it clones into p1 if you have a blue hitbox
click the image to join my forum ;)
Re: infinite priority, projectiles
#4  August 10, 2008, 02:15:07 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
ok well i figured it out for projectile code, just now all thats left is helper projectiles?


You needa hitoverride so when it's hit by any projectile it goes into a fade away state, don't forget the clsn2 and a hitby sctrl that says
it's can only be hitby projectile otherwise you can punch it and make it turn into a clone

BC

Re: infinite priority, projectiles
#5  August 10, 2008, 03:01:59 pm
  • ****
    • UK
    • www.mugenevolution.co.uk/Forum
spoke too soon lol,

when the helper projectiles collide, it shows a hitspark like its connected with the opponent lol?

[mcode][State 1005, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1071
ignorehitpause=1
[State 1005, hitby]
type=hitby
trigger1= 1
time=-1
value=SCA,NP,SP,HP
ignorehitpause=1[/mcode]
i put stateno = 1071 for the fade out state, but it seems to look at the hitspark no.

here is the fadeout state.

[mcode][Statedef 1071]
type=A
physics=N
movetype=I
anim=1080
velset=0,0
ctrl=0
sprpriority=4
movehitpersist=1

[State 1006, snd]
type=playsnd
trigger1= !time
value=S0,997
ignorehitpause=1
persistent=0

[State 1006, end]
type=destroyself
trigger1= !animtime[/mcode]
click the image to join my forum ;)
Last Edit: August 10, 2008, 03:20:02 pm by blackchaos07
Re: infinite priority, projectiles
#6  August 10, 2008, 03:22:17 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
Thats because, it is actually hitting the other projectile i assume nothing wrong with that

BC

Re: infinite priority, projectiles
#7  August 10, 2008, 03:31:22 pm
  • ****
    • UK
    • www.mugenevolution.co.uk/Forum
ok, one last issue, even tho a hitby is added.

when you try to hit the helper, you get hit by it, but destroy the helper on hit and it goes into the fade state, so the problem being, the person hitting the helper has the hitspark on him, and the helper fadeout happens when the helper is hit which is before you get hit. that sounded a little confusing lol, ill put a pic up.



see, p2 gets hit but before he got hit he hit the helper causing it to fade?
click the image to join my forum ;)
Re: infinite priority, projectiles
#8  August 10, 2008, 03:44:34 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
Why is the fade spark all the way back there?, anyways since it's a hit def


See if the Projectile is moving faster than the animation, by using debug clsn view...Also are you using an explode as a hitspark? if so change the pos type to p1 :P

BC

Re: infinite priority, projectiles
#9  August 10, 2008, 03:58:44 pm
  • ****
    • UK
    • www.mugenevolution.co.uk/Forum
no my hitspark is set up in the hitdef,

the move works as normal, its when you try to hit the helper it cancels the helper and turns into the fade spark, so the problem is the helper can be hit by a basic attack?
click the image to join my forum ;)
Last Edit: August 10, 2008, 04:05:48 pm by blackchaos07
Re: infinite priority, projectiles
#10  August 10, 2008, 04:07:53 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
it seems to be doing damage, why is the fade spark back there though?

how about posting the projectile state and fade state please?

BC

Re: infinite priority, projectiles
#11  August 10, 2008, 04:12:49 pm
  • ****
    • UK
    • www.mugenevolution.co.uk/Forum
when i do the move and dont make p2 hit the helper the fade spark appears as it should.

[mcode][Statedef 1070]
type=A
physics=N
movetype=A
anim=1070
ctrl=0
velset=7,0
sprpriority=4

[State 1070, AssertSpecial]
type = AssertSpecial
trigger1 = 1
flag = noshadow

[State 1070, Afterimage]
type = AfterImage
trigger1 = time = 0
length = 6
PalBright   =  30, 30,  0
PalContrast =  70, 70, 20
TimeGap  = 1
FrameGap = 2
Trans = sub
time = 15

[State 1070, hitoverride]
type=hitoverride
trigger1= 1
time=-1
attr=SCA,AA,AP,AT
stateno=1071
ignorehitpause=1

[State 1070, hitby]
type=hitby
trigger1= 1
time=1
value=SCA,NP,SP,HP
ignorehitpause=1

[State 1070, Afterimage]
type = AfterImageTime
trigger1 = AnimElemTime(6) < 2
time = 2

[State 1070, 1]
type = HitDef
trigger1 = time >0
attr = S,SP
velocity = 3
damage = 40
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 3, Hit
pausetime = 4, 6
sparkno = S6100+(random%4)
guard.sparkno= S8010
sparkxy = -5,-10
hitsound = S0,997
givepower = 60
guardsound = 6,0
ground.type = High
ground.slidetime = 30
ground.hittime  = 12
ground.velocity = -4
airguard.velocity = -1.9,-.8
air.type = High
air.velocity = -1.4,-3
air.hittime = 12
palfx.time = 32
palfx.add = 224,68,-40
palfx.mul = 256,192,128
palfx.sinadd = -160,-160,-160,14
palfx.color = 0
palfx.invertall = 1
fall = 1

[State 1070, end]
type=changestate
trigger1= movecontact
value=1071
ignorehitpause=1

[State 1070, end]
type=destroyself
trigger1 = movecontact
trigger2 = time > 170

[Statedef 1071]
type=A
physics=N
movetype=I
anim=1080
velset=0,0
ctrl=0
sprpriority=4
movehitpersist=1

[State 1071, snd]
type=playsnd
trigger1= !time
value=S0,997
ignorehitpause=1
persistent=0

[State 1071, end]
type=destroyself
trigger1= !animtime
[/mcode]

state 1071 is the fade state.


the fade state is back there, because i tried hitting the helper with a  standing strong punch so it has reach, and it destroyed the helper, but i also got hit but the spark appeared in the right place. i just dont want the helper to be able to be destroyed by an attack apart from projectile.
click the image to join my forum ;)
Re: infinite priority, projectiles
#12  August 10, 2008, 04:18:33 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
Put the hitoverride at the bottom of the hitdef before the destroyself

and make it only override projectile

sca,np,sp,hp

and make the hitby the same and put that above the hittoveride.

Remove the changestate at the end of the projectile state because it is not needed and just leave the destroy self

BC

Re: infinite priority, projectiles
#13  August 10, 2008, 04:26:27 pm
  • ****
    • UK
    • www.mugenevolution.co.uk/Forum
ok that works but........

oddly tho, even when i dont try and hit the helper, and launch it at p2, it gives the hitspark but now no fadespark :S
click the image to join my forum ;)
Re: infinite priority, projectiles
#14  August 10, 2008, 04:32:36 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
My fault,

leave the destroy self but only with the frontedgedist destroy,

then the use a changestate triggered by movecontact to change to the fadeaway state :P

BC

Re: infinite priority, projectiles
#15  August 10, 2008, 06:34:51 pm
  • ****
    • UK
    • www.mugenevolution.co.uk/Forum
ok i think i know what the problem is, your method works by the way thanks, but heres the prob now.



this is me throwing the helper projectile, and i made p2 try kicking it



now because p2 cant kick projectiles, it will hit the blue collisions on his leg....as you see the helper fade spark, but the problem i found is the  blue hitspark....i want it to be where the projectile fade spark is, at all times, works fine while in stance they both appear together. so is there a way of coding this?
click the image to join my forum ;)
Last Edit: August 10, 2008, 06:38:49 pm by blackchaos07
Re: infinite priority, projectiles
#16  August 10, 2008, 07:13:58 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
I don't se a problem is the sparkxy equal to 0,0?

I don't have this problem....

BC

Re: infinite priority, projectiles
#17  August 10, 2008, 10:12:46 pm
  • ****
    • UK
    • www.mugenevolution.co.uk/Forum
no but i tried that and still the same, i wonder if this is causing the prob.



because i was using don dragos .air file as a base i left his collisions in, seems they are poorly done and does the leg really need that much blue collision on it, because when the helper connects to p2 its gonna explode as soon as it hits that blue box, and the spark will be 0,0 or whatever, so mayb if i shortened or removed it  that might make things better?

also notice the previous post, the fade spark of the helper is the exact position as his foot in this post, so it must be the box right?.
click the image to join my forum ;)

BC

Re: infinite priority, projectiles
#18  August 10, 2008, 10:21:15 pm
  • ****
    • UK
    • www.mugenevolution.co.uk/Forum
yea just to confirm that was the problem  --;

after all that lol. also not keen on the idea of blue hit spark appearing when both projectiles clash, as it only hit the projectile not the fighter, so i looked at pots method and tried it out and it works.

use the hitspark as an explod


with this

postype=left
pos=ceil((target,pos x)-((target,const(size.ground.front)-10)*facing)+160),ceil(screenpos y)

although i dont fully understand the second line it works lol and now no hit spark appears when both helpers clash, it only fades :)
click the image to join my forum ;)
Re: infinite priority, projectiles
#19  August 10, 2008, 10:50:38 pm
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/

pos=ceil((target,pos x)-((target,const(size.ground.front)-10)*facing)+160),ceil(screenpos y)

Well understand it or do't use it >:(

here i'l epxplain it

The projectile is a helper there for it can have a target, and specifically in the the targets pos x, , then you know what the constanst are right where your head pos is etc......run sped..etc.....well he's bounding it to the ground front which is basically autamtically set  width sctrl, and he mutlplies it by the enemies facing which can be - 0r + and adds 160 to it which is basicall a decant amount of pixels to get where you want the explode to appear at, ciel screen pos y is obvious you should know a code before you copy it.

Cheers,Rajaboy

BC

Re: infinite priority, projectiles
New #20  August 11, 2008, 12:11:03 am
  • ****
    • UK
    • www.mugenevolution.co.uk/Forum
yea i know my bad :(


thanks for explaining tho i did understand some of it. but you helped me to understand all of it.

ceil is the ceiling function i read up but not sure i understand it very well like one of the examples in the docs is

value = ceil(5.5)
whats that mean? 5.5 X or Y from the ceiling or something?

i could never imagine myself using that much complicated code tho lol, i think the main thing id get stuck on is where to implement the parenthesis ()   some have (( at the start because they are bracketing one inside it

even when i was doing my visual basic C++ programming course that was an issue for me  --;


well heres an odd one lol i found out what Log does so i thought it would be funny to try it in the ground velocity in the hit def for p2

ground.velocity = log(2,64) aparently sets the base 2 to the logarithm 64 which makes 6.0 according to mugen docs which is false because i calculated it on the net and it came back 0.4 lol so the opponent comes to wards me after being hit lol
fun.......

what i did find out is log(3,2) reads 3 as squared so thats 9.......i like geeky maths lol
i better stop now, this is prob for developmental descussion  :sugoi:
click the image to join my forum ;)
Last Edit: August 11, 2008, 01:01:23 am by blackchaos07
Re: infinite priority, projectiles
#21  August 11, 2008, 12:20:57 am
  • ******
  • I hang out tough. I'm a real boss.
    • USA
    • litotichues.com/
-parenthaises are easy

it's like a math equations math is easy for you right?..well it doesn't have to be

ifelse(var(9)=0,5,ifesle(var(9)=1,10,15))
two parenthesis at the end why?
because at the end of an ifelse you close the parentheis at the end of 2 ifelses you close it twice.

-you can't do this

ifelse(var(9)=[20,55],0,45)

you have to close the parenthesis in the var(9) equation

ifelse((var(9)=[20,55]),0,1)

giving you more parenthesis at the beginning of the equation, you'll get th hang of it.

also when ifelse certain triggers like animelem, you have this method with parenthesis mugen is crazy like that.

Cheers,Rajaboy

BC

Re: infinite priority, projectiles
New #22  August 11, 2008, 12:40:28 am
  • ****
    • UK
    • www.mugenevolution.co.uk/Forum
seems to make more sense, i understand why that ifelse code needs 2 parenthesis at the end now.


also dunno if you noticed i edited the last post, talking about Log.....i successfully used it in an experiment, is that something you have used?


click the image to join my forum ;)
Last Edit: August 11, 2008, 12:47:10 am by blackchaos07