YesNoOk
avatar

Detecting player or cpu (Read 265 times)

Started by puissance, July 24, 2011, 01:33:17 am
Share this topic:
Detecting player or cpu
#1  July 24, 2011, 01:33:17 am
  • avatar
  • *

  • Online
Hi All,

It is possible to detect whether or not a player is a CPU or human (ex., trigger1= p1 = human, p2 = cpu, etc).

Thanks

Re: Detecting player or cpu
#2  July 24, 2011, 01:49:53 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
In 1.0. It's very easy

AILevel = 0, you are a human. AILevel != 0, you are AI. So

trigger1 = enemynear(0), AILevel != 0

You're fighting CPU.

Trigger1 = AILevel = 0

You are a human.


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: Detecting player or cpu
#3  July 24, 2011, 02:24:18 am
  • avatar
  • *

  • Online
Thanks Cyanide,

Anyway of doing this in non 1.0?

Thanks
Re: Detecting player or cpu
#4  July 24, 2011, 02:37:26 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
Not reliably no. Although var(59) is normally used for AI, you can't be at all sure of it. And until the AI actually activates it'll return a false positive.


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: Detecting player or cpu
#5  July 24, 2011, 05:09:44 am
  • avatar
  • *

  • Online
Thanks again Cyanide

The code worked perfectly.  Luckily I've recently converted over to 1.0 .   

CRZ

Re: Detecting player or cpu
#6  July 25, 2011, 09:38:15 pm
  • avatar
  • *
What if we want to detect a cpu player ONLY in arcade (one on one) mode? so that we can put character specific storyboards that otherwise won't appear in vs CPU in team arcade, training, etc
Re: Detecting player or cpu
#7  July 25, 2011, 10:49:06 pm
  • ****
  • Hey.
    • Ukraine
    • mugencoder.com
I believe the same code applies for that as well. If the player's AILevel is greater than 0, then they are a CPU.

-[Все слова это только слова.]-

CRZ

Re: Detecting player or cpu
#8  July 26, 2011, 05:59:44 am
  • avatar
  • *
I believe the same code applies for that as well. If the player's AILevel is greater than 0, then they are a CPU.

Yes but they could be CPU in another mode, say training or team arcade. We're trying to detect CPU ONLY for single one on one arcade mode
Re: Detecting player or cpu
#9  July 26, 2011, 06:25:03 am
  • ****
  • Hey.
    • Ukraine
    • mugencoder.com
Use TeamMode = Single as your trigger and make sure that your enemy's AILevel is greater than 0. Just as a fallback, you could also check if both you and your enemy have 0 partners using the NumPartner trigger.

-[Все слова это только слова.]-