Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
The Nutcracker

Can this ACS script work?

Recommended Posts

If you read my "Monsters With More Than 1 Projectile Attack" thread, you saw I needed help making the monster. Well, the defintion is finished (still working on the sprite)and then I decided added in a health bar, which is where my problem began. It isn't hard to make the monster's total health display, but I would rather it be displayed more like the player's health, in the sence that it has 100% that decreases as the monster dies. The script I wrote is as follows:

#include "zcommon.acs"

script 1 (int arg1)
int x = getactorproperty(arg1, aprop_health);
int y = getactorproperty(arg1, aprop_health)*100;
while(getactorproperty(arg1, aprop_health) > 0)
hudmessage(s:"BOSS: ", d:y/x, s:"%";
hudmsg_plain, 0, cr_red,0.02,0.0, 0.1);

Why doesn't this work?

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now