Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EA]Killing by minus hpregen


iraasta
 Share

Recommended Posts

Hi. I changed code of EA to make hp regen negative number (My game is based on survival and this was easiest way to make hunger) however hp goes down till it reaches 0 then stops.

I cant really find code which makes character dead. Any idea how can I make hunger lethal? (I am wicked person ![:lol:](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/laugh.png) )
Link to comment
Share on other sites

I think i found it, but with name Player_HighIndex instead. Going to try this and report

@UP i just changed variable in hp regen to -3 and deleted line "if i < 2 then i = 2"

/Edit It works. topic can be closed. Thanks for help

/Edit2 no… it doesnt. It kills last player on a server ;/

/Edit3 Oh god. Im retarded. Player index is i variable

/Edit4 Yes it works fine. Topic can be closed
Link to comment
Share on other sites

I like it how you talk to yourself ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png)

However you are a good example for some people, some things can't just be explained, you have to find them out on your own.

So well done ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)
Link to comment
Share on other sites

> I like it how you talk to yourself ![:P](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/tongue.png)
>
> However you are a good example for some people, some things can't just be explained, you have to find them out on your own.
>
> So well done ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)

Haha ![:D](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/biggrin.png) Thx. True, the best way is to find it out yourself

> in the hp regen loop cant you just put if player(myindex).hp < 1 then kill player or something to that effect?

Yea, but the problem was in that in this class "index" or as you said "myindex" didnt exist, and i could not find it. I finally found it, it was the iteration variable.
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
 Share

×
×
  • Create New...