iraasta Posted October 31, 2012 Author Share Posted October 31, 2012 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 More sharing options...
Joyce Posted October 31, 2012 Share Posted October 31, 2012 ```Sub KillPlayer(Index)``` Link to comment Share on other sites More sharing options...
iraasta Posted October 31, 2012 Author Share Posted October 31, 2012 Thanks! It works. How could I not find it ![^_^](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/happy.png) Link to comment Share on other sites More sharing options...
abhi2011 Posted October 31, 2012 Share Posted October 31, 2012 Close [RESOLVED] Link to comment Share on other sites More sharing options...
iraasta Posted October 31, 2012 Author Share Posted October 31, 2012 Ok. It doesnt. I mean i need to make call to Index variable from modCombat. It can't find variable. I'm not familiar with VB 6.0 started learning it like week ago. How can i make reference of Index variable to modServerLoop? Link to comment Share on other sites More sharing options...
abhi2011 Posted October 31, 2012 Share Posted October 31, 2012 Do you getting an index for server loop? The loop uses it's on index meaning that it cycles through all loggedin players. Link to comment Share on other sites More sharing options...
Joyce Posted October 31, 2012 Share Posted October 31, 2012 What are you using to decrease their hitpoints and whatnot? Link to comment Share on other sites More sharing options...
iraasta Posted October 31, 2012 Author Share Posted October 31, 2012 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 More sharing options...
Boynaar44 Posted November 2, 2012 Share Posted November 2, 2012 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 More sharing options...
or3o Posted November 2, 2012 Share Posted November 2, 2012 in the hp regen loop cant you just put if player(myindex).hp < 1 then kill player or something to that effect? Link to comment Share on other sites More sharing options...
iraasta Posted November 2, 2012 Author Share Posted November 2, 2012 > 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now