YesNoOk
avatar

Establish Correct Vars (Read 155 times)

Started by GoldingCircle, October 11, 2011, 05:11:20 am
Share this topic:
Establish Correct Vars
#1  October 11, 2011, 05:11:20 am
  • **
  • "GrayCircle will once be the greatest warrior"
    • i.imgur.com/MdGQY.gif
*Answer all questions please *
1:How can I set a variable to set in Survival rounds only when the character is a CPU?

2:Somehow, the range never sets with this code:
Code:
[State*,***]
type = VarRandom
triggerall = NumHelper(713) = 1
trigger1 = Pos X = helper(713), Pos X
trigger1 = Pos Y = helper(713), Pos Y
v = 14
range = 0,30
How can I fix this OR how can set this code through a helper?
"GrayCircle will surpass ever hero one day!"

My Local Name: Fighting Toys Freak.
Re: Establish Correct Vars
#2  October 11, 2011, 05:21:53 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
1. Use 1.0 and use ailevel to define if you are the CPU or not. Otherwise you have to rely on one of the hacks in winmugen to pick up whether AI is active or not.

2. Your triggers are too restrictive. The only way that will ever be true is if the helper is created at 0,0 and you aren't moving at all. The helper can use parentvarset and use value = 0+random%30 to send a random value through to the parent.


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: Establish Correct Vars
#3  October 12, 2011, 02:41:20 am
  • **
  • "GrayCircle will once be the greatest warrior"
    • i.imgur.com/MdGQY.gif
1. Use 1.0 and use ailevel to define if you are the CPU or not. Otherwise you have to rely on one of the hacks in winmugen to pick up whether AI is active or not.

I am curious about that and never seen that before. Can you provide a simple example,please?  :)
"GrayCircle will surpass ever hero one day!"

My Local Name: Fighting Toys Freak.
Re: Establish Correct Vars
#4  October 12, 2011, 02:47:52 am
  • ******
  • Legendary XIII
  • I am the eye of the storm to come!
    • New Zealand
    • network.mugenguild.com/cyanide/
It's a simple trigger. You have to be using mugen 1.0 and you have to have mugenversion = 1.0 set in the .def file.

After this, if you want to simply check if under AI control you would use

trigger1 = ailevel != 0

If you wanted to base it on difficulty you would use

trigger1 = ailevel = 8

Which would trigger if AI was set to hard (8) in the options.

More information is available in the docs.


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.