cyber-menace Posted November 27, 2003 I need to know if there's anyway to use the actor's health to execute a script for exampleif (actorhealhcode == 75) { scripts } I need this to perfect my healing stations... 0 Share this post Link to post
boris Posted November 27, 2003 Try this: if(getactorproperty(thingid, aprop_health) <= 75) { // stuff here } 0 Share this post Link to post
cyber-menace Posted November 27, 2003 Problem is my actor doesn't have a thing id... and I don't remember how to set it. 0 Share this post Link to post
boris Posted November 27, 2003 You can probably set it in your editor's thing dialog. 0 Share this post Link to post
cyber-menace Posted November 27, 2003 I tried that before on a different map. I don't think it's possible to give a player a TID without scripting. One more thing... is there any command that sets it so it isn't greater than or equal to but instead between for example do this if his health is between 50 - 75? 0 Share this post Link to post
boris Posted November 27, 2003 cyber-menace said:I tried that before on a different map. I don't think it's possible to give a player a TID without scripting. It is possible. 9479038758 people have done it before, 375983759834 will do it again. If you can't find it, you fail it. cyber-menace said:One more thing... is there any command that sets it so it isn't greater than or equal to but instead between for example do this if his health is between 50 - 75? Like... if(getactorproperty(thingid, aprop_health) >= 50 && getactorproperty(thingid, aprop_health) <= 75) { // stuff here } 0 Share this post Link to post
cyber-menace Posted November 27, 2003 Well I got it with a slightly different mix. And actually I found out how to add a TID to the player from a very old post of mine when I was talking about bombs and the thing_destroy command. I have everything in two scriptsscript 1 enter { thing_changetid (0, 666); } script 2 OPEN { if (getactorproperty (666, aprop_health) >= 100) { Sector_SetColor (1, 0, 0, 255); } if (getactorproperty (666, aprop_health) <= 99) { Sector_SetColor (1, 0, 255, 0); } if (getactorproperty (666, aprop_health) <= 75) { Sector_SetColor (1, 128, 255, 0); } if (getactorproperty (666, aprop_health) <= 50) { Sector_SetColor (1, 255, 255, 0); } if (getactorproperty (666, aprop_health) <= 25) { Sector_SetColor (1, 255, 0, 0); } if (getactorproperty (666, aprop_health) <= 10) { Sector_SetColor (1, 0, 0, 0); } delay (1); restart; } I got my TID script from stuff that Nanami, The Ultimate Doomer, and Cyb tried to remember. Cyb's worked. 0 Share this post Link to post