YesNoOk
avatar

Need help with NotHitBy for Specific Character (Read 847 times)

Started by KBN22, May 24, 2008, 06:54:39 pm
Share this topic:
Need help with NotHitBy for Specific Character
#1  May 24, 2008, 06:54:39 pm
  • ***
  • Heroin-flavored bananas finance revolutions!!!
So I've been trying to make a code that makes my character basically invincible against Rare Akuma projectiles, and it works fine to some degree (although it's very Sloppy right now),there's just a slight problem : ex. if I face "Rare Akuma" and "Ryu" it's fine, but if I face say "Ryu" and "Rare Akuma" I still get hit. Is there any way to make this code works so that if "Rare Akuma" is the enemy partner it still works??

[State -2];RARE AKUMA SUCKS!!
type = NotHitBy
triggerall= numenemy = 2
trigger1 = Enemy,Name ="Rare Akuma" || Enemy,p2Name = "Rare Akuma"
trigger1 = roundstate = 2 || NumEnemy = 2
;trigger2 = ifelse(enemynear,gethitvar(hitcount)<3, 36, ifelse(enemynear,gethitvar(hitcount)>=34, 2, 36-enemynear,gethitvar(hitcount)))/36.0
;trigger2 = TeamMode = Simul
value = ,AP,AT,NA,NP,NT,SA,SP,ST,HA,HP,HT
ignorehitpause=1
Re: Need help with NotHitBy for Specific Character
#2  May 24, 2008, 07:08:35 pm
  • ******
  • [E]
    • Mexico
Enemy's p2name is your charcter or yoru partner, so that trigger won't work.

use the enemy near triggers, a bunch of them.
Re: Need help with NotHitBy for Specific Character
#3  May 24, 2008, 07:25:25 pm
  • ***
  • Heroin-flavored bananas finance revolutions!!!
I tried using the enemynear as a trigger but it affects every character whether rare akuma is there or not.
Is there any other way to make it so that trigger only works when rare akuma is out?
Re: Need help with NotHitBy for Specific Character
#4  May 24, 2008, 07:32:04 pm
  • ******
  • [E]
    • Mexico
EnemyNear(0),Name ="Rare Akuma"
EnemyNear(1),Name ="Rare Akuma"

etc..
Re: Need help with NotHitBy for Specific Character
#5  May 24, 2008, 07:32:49 pm
  • ******
  • [E]
    • Mexico
unless you want to get hit by the other character but not by rare akuma, in which case you have discovered teh beauty of coding for simul; i.e. you can't code a nohitby that works only against one charatcer.
Re: Need help with NotHitBy for Specific Character
#6  May 24, 2008, 07:43:19 pm
  • ***
  • Heroin-flavored bananas finance revolutions!!!
LOL beautiful....

Yeah I don't care if both enemies get affected as long as it doesn't affect all characters.

[State -2];RARE AKUMA SUCKS!!
type = NotHitBy
trigger1 = Enemy,Name ="Rare Akuma"
trigger1 = roundstate = 2 || NumEnemy = 2
trigger2 = EnemyNear(0),Name ="Rare Akuma"
trigger2 = EnemyNear(1),Name ="Rare Akuma"
trigger2 = EnemyNear(2),Name ="Rare Akuma"
trigger2 = EnemyNear(3),Name ="Rare Akuma"
trigger2 = EnemyNear(4),Name ="Rare Akuma"
trigger2 = EnemyNear(5),Name ="Rare Akuma"
trigger2 = EnemyNear(6),Name ="Rare Akuma"     
value = ,AP,AT,NA,NP,NT,SA,SP,ST,HA,HP,HT
ignorehitpause=1

Well I tried it and still get hit by projectiles from both characters on screen.
I'm not too familiar with the rules here, but if I can I'd put up a link so you could see my dilema.
Re: Need help with NotHitBy for Specific Character
#7  May 24, 2008, 07:45:47 pm
  • ******
  • [E]
    • Mexico
I think you have to use just SCA as the value in the nohitby, that sctrl is know to be very buggy.
Re: Need help with NotHitBy for Specific Character
#8  May 24, 2008, 07:57:58 pm
  • ***
  • Heroin-flavored bananas finance revolutions!!!
Yeah the NotHitBy works just fine if Rare Akuma is on top, but if he's on bottom then it's useless..
Simul is a pain.. Maybe there's a way to make it so

trigger1= enemy,name = "Rare Akuma" && Enemy partner???

So confusing Thank you for your help
Re: Need help with NotHitBy for Specific Character
#9  May 24, 2008, 08:47:02 pm
  • ***
  • Heroin-flavored bananas finance revolutions!!!
Oh and one more question, Is there any code that can make it so whenever Rare Akuma is to be played that he's the teamleader and always first??

[state -2, varset]; teamside2 leader position set at start of match
type = varset
triggerall = TeamMode = simul && teamside = 2 && numenemy && screenpos x > 160 && time >= 0 && RoundState != 2
trigger1 = numpartner && ID < partner, ID && ID > enemy, ID
trigger2 = !numpartner && ID > enemy, ID
var(25) = 0

Something like that but for "Rare Akuma" to be always first, always ontop??????
Re: Need help with NotHitBy for Specific Character
#10  May 24, 2008, 11:49:51 pm
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
trigger1 = p2name = rare akuma || p4name = rare akuma

That should really do it.


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.
Re: Need help with NotHitBy for Specific Character
#11  May 25, 2008, 04:02:56 am
  • ***
  • Heroin-flavored bananas finance revolutions!!!
I COULD CRY!!  I LOVE YOU!! Seriously THANK YOU!! It's worked beautifully!!

[State -2];RARE AKUMA SUCKS!!
type = NotHitBy
trigger1 = p2name = "Rare Akuma" || p4name = "Rare Akuma"
value = ,AP,AT,NA,NP,NT,SA,SP,ST,HA,HP,HT
ignorehitpause=1

YOU ROCK!!
Re: Need help with NotHitBy for Specific Character
#12  May 25, 2008, 04:15:58 am
  • *****
    • Peru
    • www.mugenguild.com/renzo
Are you trying to make yor character invincible to all attacks?
Its simpler to use

value = SCA,