We will do and must be done!

Report RSS [Tutorial]how to use module system add a hit point bar to agent in the battle?

Posted by on

Here is a key operation: agent_get_hit_point

First of all, you need to get the team of agent, when the team is player's team, the hp bar is green. When the agent is enemy, the hp bar will be red. When the agent is friend team, the hp bar is blue.You can use agent_get_team this operation to get team of agent. Of course you should use try_for_agents

Then you need to get every agent's hit point by using agent_get_hit_point. When you get the hp of agent, it is time to show it by using presentation.

When the hp bar show, it should follow the every agent, here is a operation can get agent position: agent_get_position. When agent move, hp bar will move to the new position too. When the agent is killed or wounded, the hp bar will hide.

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Level
Avatar
Avatar
Last Online
Country
China 🇨🇳
Gender
Male
Friends
Become friends
Member watch
Follow
Blog
Browse
Blogs
Report
Report
Views
68 (1 today)
Share