avianmosquito Posted July 7, 2011 Share Posted July 7, 2011 (edited) I need to construct a script. I have some of it worked out, but I'm missing a few steps. ;I need to have it detect how much limb damage is done by an attack genericcount+x;limb damage is added to a variable, name varies based on version of script ;I need it to figure out which body part is affected and multiply the variable by a floating point number based on that ;finally, add the limb damage to the actor's base health, negating the health damage endif The next script uses the variable the first one modified. if genericcount > 0 timecount +1000 timerate +1 ;I need a segment that takes the genericcount and starts a new variable, which we'll call "damagerate," as genericcount multiplied by a floating point number. (Like 0.01) set genericcount 0 ;Am I getting this right? I'm trying to set it to 0 without affecting "damagerate" Script three uses these variables to actual cause an effect. This might need to be broken into two scripts. if timecount > 0 ;I now need to damage the actor by the value of "damagerate" rounded down to the nearest 1, and add the rest to a new variable, which we'll call "remainder" timecount - timerate;set a timer to a number of seconds measured as a floating point number, such as "0.6";repeat script when timer reaches 0If remainder > 1 ;1pt damage to actor. remainder-1endif timecount <= 0;not sure I wrote that one right The only way I could be more straightforward would be to tell you the answer, and if I knew that I wouldn't be here. EDIT: I appear to have an embarrasing typographical error in the title. I cannot edit the title, can an admin please fix that? If you can, PLEASE help. I am working on a very technical mod, and this is the ONLY thing holding me back. Edited July 9, 2011 by avianmosquito Link to comment Share on other sites More sharing options...
Recommended Posts