Jump to content

Randomize zombie HP


Creypon

Recommended Posts

Hello, I'm totally new here... and I'm interested in improving the experience of my worlds with my friends, I'm looking for some way to randomize the lives of zombies... but with help and enough hours I was just able to understand how change the value of weapons, tools... It is very shameless of me... to come asking for help when I know little and nothing... but I would greatly appreciate it.

Link to comment
Share on other sites

29 minutes ago, FranticDan said:

health is already randomised

there are 3 different lines for zombies, animals and zombie animals in the entityclasses xml

<passive_effect name="HealthMax" operation="perc_add" value="-.15,.15"/>

oh... I didn't know... I had to use very outside help to achieve this... <entity_class name="zombie" extends="entity_zombie">
    <!-- Random HP depending on gamestage -->
    <property name="HitPoints" value="{rand(250 + gamestage * 2, 400 + gamestage * 5)}" />
</entity_class> Hi,Honestly, I wanted me to follow up with the player's level, but I know little or nothing about programming. I also don't know the most optimal way to monitor, but I think that this way I can set the min hp and max hp, Now I'm looking at how to make it work...
Link to comment
Share on other sites

53 minutes ago, Creypon said:
oh... I didn't know... I had to use very outside help to achieve this... <entity_class name="zombie" extends="entity_zombie">
    <!-- Random HP depending on gamestage -->
    <property name="HitPoints" value="{rand(250 + gamestage * 2, 400 + gamestage * 5)}" />
</entity_class> Hi,Honestly, I wanted me to follow up with the player's level, but I know little or nothing about programming. I also don't know the most optimal way to monitor, but I think that this way I can set the min hp and max hp, Now I'm looking at how to make it work...

new <entity_class name="zombie" extends="entity_zombie">
    <!-- HP aleatorios en función del gamestage -->
    <property name="HitPoints" value="{if(rand(0, 100) < 5, rand(100, 380 + gamestage * 5), rand(250 + gamestage * 2, 400 + gamestage * 5))}" />
</entity_class>

 

Link to comment
Share on other sites

1 hour ago, Creypon said:

new <entity_class name="zombie" extends="entity_zombie">
    <!-- HP aleatorios en función del gamestage -->
    <property name="HitPoints" value="{if(rand(0, 100) < 5, rand(100, 380 + gamestage * 5), rand(250 + gamestage * 2, 400 + gamestage * 5))}" />
</entity_class>

 

or this? <passive_effect name="HealthMax" operation="perc_add" value="-0.2,0.2" prob="0.2"/>

Link to comment
Share on other sites

i now try change the entityclass.xml, but dont work... i use this 

<entityclass name="Zombie">

    <!-- "HealthMax" "Zombie" -->
    <passive_effect name="HealthMax" operation="perc_add" value="-0.2,0.2" condition="always" />
    <passive_effect name="ExtraHealth" operation="perc_add" value="0.05" condition="rand(0,1) < 0.05" />
</entityclass>
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...