News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

explod problem *SOLVED*

Started by sgn15, December 05, 2010, 05:06:12 AM

Previous topic - Next topic

sgn15

explod not working. is my trigger wrong? i have coded one long ago exactly using same trigger (using projhit and projid) but for the char im coding now, its not working
Spoiler (click to show)
Quote[State 403, 1]
type = Projectile
trigger1 = AnimElem = 3
projanim = 6002
projid = 6002
projpriority = 1
projheightbound = -240, 100
projedgebound = 100
projscreenbound = 100
projshadow = -1
offset =  40,-65
velocity = 10,10
attr = S, SP
damage   = 40
animtype = heavy
guardflag = MA
hitflag = MAFDP
pausetime = 50,10
hitsound   = 5,0
;sparkno = 10
sparkxy = 30, 25
guardsound = 6,0
ground.type = Low
ground.slidetime = 1
ground.hittime  = 20
ground.velocity = -4,0
air.animtype = Back
air.velocity = -4,-6
air.juggle = 3
air.fall = 1
down.velocity = -4,-6
down.hittime = 30
down.bounce = 0
fall = 1

[State 220, Explod]
type = Explod
trigger1 =  projhit(6002) = 1
anim = 6001
;ID = 6001
pos = -5,50
postype = p2
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 2,2
sprpriority = 2
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1

edit: btw, you might ask why i am not using the projhitanim or sparkno in projectile sctrl. basically this projectile has 2 effects. i will code the first using sparkno/projhitanim and another one using explod (which is my problem)

Cyanide

Wrong format on the trigger. Projectile triggers are old and formatted randomly

projhit6002

No brackets. Yes it's dumb.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

sgn15

Quote from: Cyanide on December 05, 2010, 05:11:53 AM
Wrong format on the trigger. Projectile triggers are old and formatted randomly

projhit6002

No brackets. Yes it's dumb.
projhit6002 is an error.

Cyanide

What, you put that in on it's own? Check the docs next time huh?

QuoteThis trigger takes an optional positive ID number as a suffix. If the ID number is omitted, ProjHit returns true if any of the player's projectiles successfully hit the opponent. When the ID number is specified, ProjHit returns true only if one of the player's projectiles with the specified ID number successfully hit the opponent.

Format:

       1. ProjHit[ID] = value
       2. ProjHit[ID] = value, [oper] value2

Arguments:

    [ID] (int)
        Optional ID number.
    value (boolean)
        Value to compare against. 0 for false, 1 for true.
    [oper]
        =, !=, <, >, <=, >=
    value2
        Time value to compare against.

Return type:
    boolean int
Error conditions:
    none
Details:

    ProjHit will trigger once for each hit of the projectile, so a multi-hit projectile can trigger multiple times.

    The first form of ProjHit shown above is only valid for one tick after hit, unlike MoveHit.

    For the second form, ProjHit returns true if the projectile hit n ticks ago, where n is a nonnegative number satisfying the relation "n [oper] value2".

    Specifying an ID number of 0 gives the same behavior as if the ID number is omitted (check all projectiles).

Examples:

1. trigger1 = ProjHit1234 = 1
  Triggers if a projectile with ID 1234 just made successful
  contact with the opponent.
2. trigger1 = ProjHit1234 = 1, < 15
  Triggers if any of the player's projectiles made successful
  contact with the opponent within the last 15 ticks.
Seriously.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

leandro1412

jeje XD

try putting your explod code on Statedef -2, but use "trigger1 =  projhit6002 = 1" why? because between "(  )" can't detect if projectile with correct ID hit the enemy

eg:

[Statedef -2]

[State 220, Explod]
type = Explod
trigger1 =  projhit6002 = 1
anim = 6001
;ID = 6001
pos = -5,50
postype = p2
facing = 1
vfacing = 1
bindtime = -1
vel = 0,0
accel = 0,0
random = 0,0
removetime = -2
scale = 2,2
sprpriority = 2
ontop = 0
shadow = 0,0,0
ownpal = 0
removeongethit = 1
[

Nice userbars no? :P Make click & Download something nice for your Mugen!!!
________________________________

sgn15

leandro's tip work. thanks to both and problem solved

sgn15

this is a similar problem with this thread's topic so i will post it here instead of new thread.

is this code wrong? it is not working

Spoiler (click to show)
Quote[State 0, PalFX]
type = PalFX
trigger1 = projhit413=1
trigger1 = projhit414=1
trigger1 = projhit415=1
trigger1 = projhit416=1
trigger1 = projhit417=1
trigger1 = projhit418=1
time = 50
add = 112,128,144
mul = 112,128,144
sinadd = 112,128,144
invertall = 0
color = 256

Cyanide

Do all those explods hit at the same time? If they don't it will not work.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

sgn15

the explod codes work. can you help me for the projhit trigger for palfx?

Cyanide

Sorry, meant projectile. If you read what you have you need ALL 6 projectiles to hit at EXACTLY the same moment. If they do not the palfx will not trigger.

Please read the exerpt from the docs i have posted above, it will inform you of what you need to do.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

leandro1412

put the palfx codes into projectile hitdef XD, if you do that with your codes your character 'll shine non the enemy :P

eg.

[State 0, Projectile]
type = Projectile
trigger1 = Animelem = 2,=0
ProjID = 1440
projanim = 1440
projhitanim = 1445
projremanim = 1445
projcancelanim = 1445
velocity = 4,0
offset = 40,-60
postype = p1
;Hitdef
attr = S, SP
damage = 45,8
animtype = hard
guardflag = MA
hitflag = MAF
pausetime = 12,13
guard.pausetime = 12,11
getpower = 45,45
givepower = 15,15
sparkno = 2
guard.sparkno = 42
sparkxy = 10,-5
hitsound = 5,2
guardsound = 6,1
ground.type = High
air.type = High
ground.slidetime = 17
ground.hittime  = 17
ground.velocity = -12
guard.velocity = -12
ground.cornerpush.veloff = 0
guard.cornerpush.veloff = 0
air.cornerpush.veloff = 0
air.velocity = -4,-7
yaccel = .5
air.fall = 1
palfx.time = 50
palfx.add = 112,128,144
palfx.mul = 112,128,144
palfx.sinadd = 112,128,144
palfx.invertall = 0
palfx.color = 256





PS: What exerpt means?
[

Nice userbars no? :P Make click & Download something nice for your Mugen!!!
________________________________

Cyanide

Exerpt means i have pulled a section from somewhere and it's not the file in it's entirety.

Also, he asked about palFX implying he wants it to affect the character, not the opponent. Although if he has explained badly and wants it to affect the opponent then yours will work perfectly.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

leandro1412

thanks ;D I didn't know that word  ;P.
[

Nice userbars no? :P Make click & Download something nice for your Mugen!!!
________________________________

sgn15

yeah i wanted the palfx to affect p2 not p1. sorry for not explaining it clearer that i did. thanks to both of you.

leandro1412

[

Nice userbars no? :P Make click & Download something nice for your Mugen!!!
________________________________