Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Brain variable We can add Maya attribute onto simulating agent, it is the same as the HP and MP, except you can define it dynamically with arbitrary name of it.

Such as, you can define a variable attribute called "morale" just use the output channeldecision sentence. After defining it, its initial value is 0 initially and it can be changed by output channel valuessentence value. Channels
bv:<var name> (the XXX is the name of the variable) for example bv:morale
In value mode (default


Sentences (Output)

(Maya Attribute) set maya attribute:??? value ?? for example set maya attribute:morale value 5


Absolute Value Mode (Default)

The value of morale will be: decision node active * output value

Image RemovedImage Added
The brain variable define Image Removedmaya attribute adding


Image Added
In the brain viewer, the morale is 43.46 05 = 0.89 61 * 5

...


Change Rate Mode (Need specify in default decision)

Firstly we need specify the channel to the "change rate" modea default sentence in default decision. And specify the change speed in "default else"to 0, that "0" means "not change" when there is no triggeredlogic activate.

Image RemovedImage Added
Setup change rate for variable moralemaya attribute of agent


Then we just need specify the change value in the output channelsentence


Image RemovedImage Added
The morale attribute will Increase 1.5 each frame


The input channel bv:XXX (Maya Attribute) simulation-time maya attribute:?? value sentence will get the variable attribute value of it

Image RemovedImage Added
Return the value of morale

...