Author Topic: Hit Help please?  (Read 1969 times)

Gabbe

  • Guest
Hit Help please?
« on: 17 May 2010, 21:17:13 »
I need help, how do you set a random level of how much HP a unit can take?

I want it to be like if a unit qattacks one unit he would have a random amount between 50-100 hp to take so that fights could be more random, because then it wouldn`t be like a unit is doomed or a unit is blessed to win...And also between 0-100 but taking 0 would be less likely than taking 100.

jda

  • Guest
Re: Hit Help please?
« Reply #1 on: 17 May 2010, 22:14:41 »
Recently asked about:
https://forum.megaglest.org/index.php?topic=5446.0

I'll edit my post to make it clearer. ;)

Gabbe

  • Guest
Re: Hit Help please?
« Reply #2 on: 17 May 2010, 22:23:46 »
0 damage impossible? or what?

jda

  • Guest
Re: Hit Help please?
« Reply #3 on: 17 May 2010, 22:26:46 »
Seems to be impossible, minimum 1 HP loss always. Still waiting for silnarm's confirmation on that.

Gabbe

  • Guest
Re: Hit Help please?
« Reply #4 on: 17 May 2010, 22:28:34 »
thats ridicolous with a must 1 hp hit...

ElimiNator

  • Airship
  • ********
  • Posts: 3,391
  • The MegaGlest Moder.
    • View Profile
Re: Hit Help please?
« Reply #5 on: 18 May 2010, 04:56:01 »
I made it take -50 HP before and he healed  :O
Get the Vbros': Packs 1, 2, 3, 4, and 5!

Gabbe

  • Guest
Re: Hit Help please?
« Reply #6 on: 18 May 2010, 06:16:26 »
lmao, maybe -0 hp do the trick?

jda

  • Guest
Re: Hit Help please?
« Reply #7 on: 18 May 2010, 12:39:54 »
In case you missed it:
You mean if the attacked unit has 20 armor and the attacker deals 10 damage (assume multiplier = 1.0), that attack will take off 1 HP off the attacked unit? :o
Thanks for clearing that up, better make some adjustments now I think. Would it go to 1 damage if a multiplier of 0.0 was used though?

Yes, the check is made after all other calculations, it will always do one or more points of damage.

Does seem unreasonable though, I might change it to clamp at 0.

@ ElimiNator
Now that's weird!  :O
How exactly did you do that?

Gabbe

  • Guest
Re: Hit Help please?
« Reply #8 on: 18 May 2010, 14:15:29 »
mhm, i want it to have a 50% chance of taking 50-100 hp and 25% for 0-49 and 15% for 100-200 and 10% for killing the unit instantly.

Zoythrus

  • Guest
Re: Hit Help please?
« Reply #9 on: 18 May 2010, 15:01:32 »
having a super rare "critical hit" would make things more interesting...

Gabbe

  • Guest
Re: Hit Help please?
« Reply #10 on: 18 May 2010, 15:11:00 »
yes :D

Zoythrus

  • Guest
Re: Hit Help please?
« Reply #11 on: 18 May 2010, 19:21:14 »
there needs to be an effect that shows the happening of a critical hit (something cool, and very noticeable)

Gabbe

  • Guest
Re: Hit Help please?
« Reply #12 on: 18 May 2010, 19:28:15 »
A special animation when it happens?

Zoythrus

  • Guest
Re: Hit Help please?
« Reply #13 on: 18 May 2010, 19:56:05 »
maybe (that would be cool), but i mean a special particle effect. something big and flashy (like a bunch of glass shards spraying off of the attacked unit or tons of sparks)

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Hit Help please?
« Reply #14 on: 19 May 2010, 05:23:09 »
I remember one of the GAE egg-heads talking about some day being able to make a "playlist" of animations for a skill, but I don't remember if there was any talk of assigning different damage values to each.  That would be cool, though.  For example, 75% of the time the unit could do "attack.g3d" for 50-100 damage, and 25% it could do "uber_pwn.g3d" for 1337 damage.

Zoythrus

  • Guest
Re: Hit Help please?
« Reply #15 on: 19 May 2010, 20:16:37 »
although a new anim would be nice, but a particle effect would be best for right now (and just code it into the engine!)

Gabbe

  • Guest
Re: Hit Help please?
« Reply #16 on: 19 May 2010, 20:18:19 »
Both would be nice, everyone agrees right? no coder has yet to make a post ... :| :|