Miarmy Crowd Simulation Documentation (English)

HP & MP

HP (hit point) and MP (mana point) are 2 custom 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 place. This value is store in memory and only can be modified by the related sentences.

You can set the initial HP and MP 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 HP value of agent.

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

 

However, in most cases, we won't use hp like that. we usually first setup the hp sentence in default decision node, make it change rate 0.

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

And then, when the agents are walking on the radiation zone (I'm in area of zone sentence is True), we can use "change hp as speed -5", the HP will drop 5 points per-second. And if you want to reset the HP value in agent memory, you need to use "set hp value ??" sentence in "change rate" mode, 



Setup default hp to change rate mode



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



Reset agent hp to 100 if the agent in bound


The MP and the mp sentences are exactly the same as HP and hp sentences.

 

 

 

Basefount Technology