View unanswered posts | View active topics It is currently Fri Dec 27, 2024 8:00 am



Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
 How to make script to regenerate health 
Author Message
User avatar

Joined: Fri Jul 27, 2012 5:37 pm
Posts: 23
Reply with quote
Post Re: How to make script to regenerate health
AndyChanglee wrote:
Hey, sorry to necro this thread, but I was wondering about how to make the health regen more Call of Duty style (which is basically you take hits and your screen is all bloody, but then you find cover, you wait 5-7 seconds and you start to regenerate your health).

It makes it more fair than just always regenerating health.
And one more question if you're willing to answer: I haven't tried out the script, but how fast does it regen, and is that adjustable?


/Necro reply.

This is simply what I have to regenerate HP while removing wounds from an actor.
Include a Wounds .ini active somewhere, and give your actor the new wounds as entry and exit.

Code:
AddEffect = AEmitter
   PresetName = Regen Wound
   Mass = 0.0001
   HitsMOs = 0
   GetsHitByMOs = 0
   SpriteFile = ContentFile
      FilePath = BloodBeast.rte/Sprites/RegenWound/RegenWound.bmp
   FrameCount = 5
   SpriteOffset = Vector
      X = -2
      Y = -2
   SpriteAnimMode = 4
   SpriteAnimDuration = 500
   AtomGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Flesh
      Resolution = 2
      Depth = 5
   DeepGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Flesh
      Resolution = 3
      Depth = 5
   DeepCheck = 0
   JointStrength = 50000
   JointStiffness = 1
   DrawAfterParent = 1
   AddEmission = Emission
      EmittedParticle = MOPixel
         CopyOf = Drop Blood
      Spread = 0.2
      MaxVelocity = 9
      MinVelocity = 3
   BurstSound = Sound
      CopyOf = Flesh Penetration Hit
   EmissionEnabled = 1
   EmissionsIgnoreThis = 1
   EmissionCountLimit = 1
   ParticlesPerMinute = 20
   BurstSize = 1
   BurstScale = 4
   BurstDamage = 1
   BurstTriggered = 1
   EmissionDamage = -1
   Flash = None
   FlashOnlyOnBurst = 0


"RegenWound.bmp" is my animation for the wound, it simply pulsates.
The 5 bmp names start with "RegenWound000.bmp" and end with "RegenWound004.bmp".

This whole thing would make your actor regenerate exactly 100% of damage they take from wounds while removing them, after a few seconds delay per wound.

Important things to edit to your liking (for the wounds .ini):
EmissionDamage = The amount of HP regained per wound healed.
ParticlesPerMinute = The rate at which a wound is healed, lower is slower.


Fri Jul 27, 2012 6:01 pm
Profile
User avatar

Joined: Sat Jun 23, 2012 2:03 pm
Posts: 340
Location: At home, drinking some tears (probably mine)
Reply with quote
Post Re: How to make script to regenerate health
/Necro reply to reply to /necro

Wow, thanks! Is EmissionDamage the main thing that is regenerating HP?


Wed Aug 01, 2012 11:34 pm
Profile
User avatar

Joined: Fri Jul 27, 2012 5:37 pm
Posts: 23
Reply with quote
Post Re: How to make script to regenerate health
AndyChanglee wrote:
/Necro reply to reply to /necro

Wow, thanks! Is EmissionDamage the main thing that is regenerating HP?


Yeah that's how much HP the actor gets per wound healed.
The emission itself (Blood in that case) is required.


Fri Aug 03, 2012 7:27 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 18 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.041s | 13 Queries | GZIP : Off ]