Miarmy Crowd Simulation Documentation (English)

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

HP (hit point) and MP (mana point) are 2 custom variables 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 creating. This value is store in memory and only can be modified by the related channels.
You can set the initial HP and MP in McdAgentGroup node and randomize them when initializing.



The McdAgentGroup node and the attributes on it


The hp channel for input, it will return the current value of HP inside the agent memory.
The hp and hp.set channel for output, it will set the value of HP to the specific value.
In most of the cases, we are not use using hp channel like that. Usually, we firstly setup the hp channel in default decision node, make the output type "change rate".
At this time, the hp for output channel will not set HP value, instead of that, it will change the HP value per second. For example, when the agents are walking on the radiation zone (zone[1].in channel greater than 1), the HP will drop some points(5 points) per-second. And if you want to reset the HP value in agent memory, you need use hp.set channel because at this time the hp channel is in "change rate" mode, you cannot reset hp value directly by hp channel.



Setup output type to "change rate"



Agent hp will drop at speed of 5points/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.

 

 

 

  • No labels