Versions Compared

Key

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

HP (hit point) and MP (mana point) are 2 custom variables attributes for arbitrary usage, usually be used to simulate the energy of agent.

Each one of agent has some initial HP and MP value after first creatingplace. This value is store in memory and only can be modified by the related channelssentences.

You can set the initial HP and MP in on McdAgentGroup node and randomize them when initializing.



The McdAgentGroup node and the attributes on it

...

 

Sentences

Type: HP & MP


The "my HP" sentence for input, it will return the current value of HP inside the value of agent memory.

The hp and hp.set channel "set hp value ??" sentence for output, it will set the value of HP to the specific value.

 

In However, in most of the cases, we are not won't use using hp channel like that. Usually, we firstly usually first setup the hp channel sentence in default decision node, make the output type "it change rate "0. At this time, the hp for output channel will not set HP value, instead of that,

For example, In default decision, fill "change hp as speed 0" for output sentence, and it will change the HP value per second. For exampleto the change rate mode and by default, change rate is 0(per second)

And then, when the agents are walking on the radiation zone (zone[1].in channel greater than 1)I'm in area of zone sentence is True), we can use "change hp as speed -5", the HP will drop some points( 5 points ) per-second. And if you want to reset the HP value in agent memory, you need to use hp.set channel because at this time the hp channel is "set hp value ??" sentence in "change rate" mode, you cannot reset hp value directly by hp channel.

...

 


Image Added
Setup default hp to change rate mode


Image Added
Agent hp will drop at speed of 5points5 points/second if it in the zone which index is 1


Image RemovedImage Added
Reset agent hp to 100 if the agent in bound

...