Jump to content

I need help constructing scripta


avianmosquito

Recommended Posts

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 0

If remainder > 1

;1pt damage to actor.

remainder-1

endif 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 by avianmosquito
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...