Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Combat Round Adding Helath Throughout Game Help

9 years ago

Hello! It's me! I've gotten better with coding (yay!) but I still have a few questions as far as combat rounds.

1. If I have the player start off with 100 health, then how do I make it so that as they gain experience and level up, their helath increases by a fixed amount? I set the variable to Max=500 and Starting=100 but what else do I do, and did I mess that part up?

2. How exactly do you have the player gain Exp and level up again? :P (such a noob I know...)

Combat Round Adding Helath Throughout Game Help

9 years ago

Okay. Let's see the codes. 

Combat Round Adding Helath Throughout Game Help

9 years ago

I'm a noob, so I'm not really all that good with codes. I just know the basics and that's it. :P

 

Let's see.....

%MONSTDAM := (set monster damage here)

%MONSTHP := (set monster hit points here)

%MONSTMAXHP := (set same as HP)

Combat Round Adding Helath Throughout Game Help

9 years ago

So, what's the problem?

Combat Round Adding Helath Throughout Game Help

9 years ago

Did I not say in the first post? I need help with the player health!

How do I have the player's max health increase as they level up?

Combat Round Adding Helath Throughout Game Help

9 years ago

First of all, how do you make it so that they will level up? 

Combat Round Adding Helath Throughout Game Help

9 years ago

.... still looking in the help and info section to figure that out....... but when I DO get that set up, I'll need to know this. Just want to get it out of the way.....

 

"I will respect you.... Coding Sensei. I am the vine, and you are the tree that supports me, but soon I'll need to spread out by myself, with your wise teachings...... the Sensei that teaches you the hard way: nmelssx! (affectionately of course!)"

Combat Round Adding Helath Throughout Game Help

9 years ago

that was the second question in the post. I need help understanding that. Teach me, oh Wise Sensei Nmelssx!

Combat Round Adding Helath Throughout Game Help

9 years ago

Okay, fine. Let's skip the leveling first then. Okay, then the next question would be, how do you make a variable increase by a certain amount? 

Combat Round Adding Helath Throughout Game Help

9 years ago

Oh wise sensei! You know so much!

You increase a variable using the little sign that look like a + sign on top of a - sign and change the variable in there!

................... OHHHHHHHHHHH..... right, duh. I'm a noob on this site but I'm getting better! Sorry for being so stupid XP.....

Combat Round Adding Helath Throughout Game Help

9 years ago
Enable Scripting. On the link where the player defeats the monster, input:

%EXP := %EXP + 20

IF %EXP >= %MAXEXP THEN
BEGIN
%LEVEL := %LEVEL + 1
%EXP := %EXP - %MAXEXP
%MAXEXP := %MAXEXP + 20
%MAXHP := %MAXHP + 20
%STAT := %STAT + 2
END

Combat Round Adding Helath Throughout Game Help

9 years ago

James, you can't just GIVE the code out like that. You have to let him figure it out himself, and only when he has any specific questions about any specific parts of the code that he can't figure out, should you step in and give him advice. Anyway, even if you are giving him the whole code, you should explain which part does what, since he's a complete beginner. 

Combat Round Adding Helath Throughout Game Help

9 years ago
I'm not giving out code, just giving an example.

Combat Round Adding Helath Throughout Game Help

9 years ago

An example of a code that's totally useable. And what's the point of giving an example if you're not going to explain it? 

Combat Round Adding Helath Throughout Game Help

9 years ago

It goes back to the "Build a man a fire..." thing.  xD

Combat Round Adding Helath Throughout Game Help

9 years ago
XD

Combat Round Adding Health Throughout Game Help

9 years ago
EXP is the amount of experience a player has.
MAXEXP is the amount of experience it takes to level up.
LEVEL is the player's current level.
MAXHP is the maximum number of hitpoints a player can have.
STAT represents stat points, which can be spent on increasing certain attributes. (Not a necessity, though)

In the script, when you beat the monster, you get EXP points. If your EXP points exceed the max, the script sets EXP equal to the excess and then increases the number of EXP points it takes to get to the next level by raising MAXEXP.

Combat Round Adding Health Throughout Game Help

9 years ago

Thank you, but nmelssx DOES have a point. And btw I'm not a total beginner, but I guess I fall under that category. Also, I prefer figuring the code out myself. It's the only way I'll ever get good at it, because if people give it to me, then I won't have to figure it out and that isn't how you learn. But I see that I need some more variables, and that makes sense. I'll use the given variables, but I won't copy and paster the code directly. That would be like cheating, and I HATE CHEATING!!!!!! It is dishonest and it doesn't get you anywhere! Thank you both for helping me out! I'll try to get better at this stuff in the future so I won't have to ask you guys. Thanks!

Combat Round Adding Health Throughout Game Help

9 years ago
I wasn't expecting you to copy and paste.

Combat Round Adding Health Throughout Game Help

9 years ago

Of course not. It's just that I had to say that because most noobs WOULD copy and paste. Though that doesn't apply to me, I'm just saying that if you do this with other noobs, they might do just that.

Combat Round Adding Health Throughout Game Help

9 years ago
Yeah, I was giving you a template, but I was not, by any means, expecting you to use it exactly as it is.

Combat Round Adding Health Throughout Game Help

9 years ago

Even though it is completely useable since those particular variables are very common and the person could have those EXACT variables already, thus making it super easy to copy paste and be done with it. So what nmelssx is saying is that don't give out codes AT ALL since they could potentially be used just as they are and the person can just copy and paste and be done. You have to let them figure out the code themselves! Even just a template could be used as the real thing. Keep that in mind next time, and don't interfere when nmelssx is trying to teach me the proper way! 

Combat Round Adding Health Throughout Game Help

9 years ago

Wow. That logic right there. You're a girl, right?

Combat Round Adding Health Throughout Game Help

9 years ago

Yes, indeed I am female. Only 15 at that, yet I have a large grasp on the concept of logic and reason. It helps me deal with all the idiots in life.

 

My #1 philosophy:

"People are idiots. Those who are smart are just liars."

(P.S sorry if this offends anyone. But I've found it to be true in most cases)

Combat Round Adding Health Throughout Game Help

9 years ago

XD

Combat Round Adding Health Throughout Game Help

9 years ago

Despite my mature nature and severe grasp of reality, I do enjoy a joke now and again and am quite funny. Here's one I think you'll like:

 

How many men does it take to screw in a lightbulb?

One because men screw everything!

(P.S again, sorry if this is offensive)

Combat Round Adding Health Throughout Game Help

9 years ago

LMAO. 

Combat Round Adding Health Throughout Game Help

9 years ago

I get what you're saying.  My only objection is to the definition of men.  Because a man is someone who is upstanding.

Combat Round Adding Health Throughout Game Help

9 years ago
Man can mean a human, a mature male human, or a mature male human who embodies the traditionally accepted concepts of masculinity.

Combat Round Adding Health Throughout Game Help

9 years ago

I'm saying all humans with the specific "male" gender. Male: a member of a species that has the neccessary reproductive parts to fertilize an egg within a female member of a species. 

Combat Round Adding Health Throughout Game Help

9 years ago

Also, why are you all so interested in this stuff? I thought I was the only one my age with such a mature grasp on life. Then again, you guys could all be much older than myself, have actual jobs, kids, spouses, relationships outside of home/work and live in a nice house in a nice part of the country. Then again if the previous was true, then the latter half would be that some of you could be shmucks who have no job or at least work at BK or McDonalds, no kids or spouses and be living on the dirty streets of San Francisco! But then again, I'm just a kid, so what do I know? :)

Combat Round Adding Health Throughout Game Help

9 years ago
I'm 18, unemployed for the most part, and a Sophomore in college.

Combat Round Adding Health Throughout Game Help

9 years ago

XD

Combat Round Adding Health Throughout Game Help

9 years ago

And that is what made the logic comment SO funny.

Combat Round Adding Health Throughout Game Help

9 years ago

Thank you, your opinion is greatly appreciated despite the fact that most humans have an opinion that is not backed up with credible evidence, thus making their argument invalid. However, in your case, you used evidence from previous posts to back up your logic and reason, thus making your argument valid thus leading me to congratulate you on beating the system that all human beings live by because of a simple thing called imperfection. Thank you.

Combat Round Adding Health Throughout Game Help

9 years ago

If you want to figure it all out for yourself, that's fine, but I always preferred to have a piece of code that I could pick apart, examine, recreate, and build upon. I usually have to see a script of a certain type a few times before I can build my own. Sorry.

Combat Round Adding Health Throughout Game Help

9 years ago

Well, then that's a bit of crap. Sorry but it's true. I mean what do you really need to change from a template of code? All you do is use THE EXACT SAME SCRIPT only enter in your own variables that you're using! That's it! And I'm sorry, but you must be a slow learner if you have to look at a piece of code that many times in order to understand it. I mean hello? It is simply this for your basic VARIABLE # TEXT code.

VARIABLE = any variable you're using

# = the number the variable is set at

TEXT = whatever the hell you want to say

This means that if VARIABLE = # then display TEXT.

IT'S NOT THAT DIFFICULT TO COMPREHEND!

I know, I know. You're probably like, "If it's not that difficult then why are you asking for help?" Because, Sherlock, even if I know the code it's sometimes hard to figure out which code would work best, and how to exactly put that code into the game to make it work. But other than that, coding is easy. 

 

"It's like dodgeball. STEP 1: Hit someone in the face with a ball. STEP 2: Hit someone else in the face with a ball. REPEAT"

Now do you understand?

Combat Round Adding Health Throughout Game Help

9 years ago

Wow, you got aggressive all of a sudden.

Let's put it in another light. I made a timer for nmelssx the other day. He is using it on his profile. To make the timer, I looked at an example of code by someone else who made the timer. I wrote it all down in an html document, inserting pieces of code from other coder's as well, and I have been tweaking it ever since, removing and adding parts to see how they affect the function and appearance of the timer.

Combat Round Adding Health Throughout Game Help

9 years ago

Irrelevant. The simple fact that if one template of code can so forth be used as an actual bit of coding in a real storygame and the sheer fact that you gave out that information for free plus the fact that there are people out there in the world who might use that to gain an advantage meaning they copy and paste and do not learn anything equals the fact that what you did was defined as "wrong" and thus ignored by me. To properly teach one that may be called a "noob" you must not give them any information that could potentially be used in a context that would prevent said noob from learning. This includes bits of code, templates, and of course, whole strings of code. Therefore in giving out said forbidden information, you have violated the simple law that states that "people take whatever advantage they can because they are lazy." In said violation, I now will ignore every bit of help you attempt to distribute to me, in hopes that I will actually learn something.

Is there anything you would like to add nmelssx?

Combat Round Adding Health Throughout Game Help

9 years ago

Well, umm, God forbid I have a little faith in you and the other newbies (who are actually interested in scripting enough to come to this forum) on the site. Also, what do you mean by 'get ahead'? You think that is the best I can do and that I am giving you all of my trade secrets. Come on, give me at least a little credit.

Also, I don't care for the sudden and undeserved expression of hatred I am getting from you.

Combat Round Adding Health Throughout Game Help

9 years ago

Considering that I've been coding for three decades, on several operating systems and in multitudes of languages, I think templates are fantastic.  Especially when switching back and forth can easily result in buggy apps.  Only an idiot would copy/paste instead of typing in the examples themselves until they had a firm grasp of it.

Combat Round Adding Health Throughout Game Help

9 years ago

I completely agree with you my acquaintance. And congratulations on your marvelous achievement. Of course, achievements are irrelevant due to the fact that life is unpredictable and we could all die tomorrow leaving Earth a desolate wasteland. Or a bunch of tiny particles floating in the universe. Which is why we must live life to the fullest, because even though everything we do today could mean absolutely nothing tomorrow, humans have a need for thrill and adventure so we must feed it despite the fact that our actions are obsolete.  

Combat Round Adding Health Throughout Game Help

9 years ago

You seem to have a very pessimistic view toward life.  I was optimistic until my mid-thirties, when I gave up on trying to persuade those around me to try and be better.  Life is an adventure, and apparently one that I have to experience alone...  : (

Combat Round Adding Health Throughout Game Help

9 years ago

Life is simple. 

1. People are idiots and smart people are just liars.

2. People will take any advantage they can because they are lazy.

3. People are imperfect due to the devolution of certain features, such as maturity, physical appearance, and ability to pull off amazing dance moves without looking like a fool.

4. If a man twice your size and five times your weight tells you to do something, DO IT!

5. Do not look in the mirror. All you will see is an imperfect human with one of two specific genders that may or may not ever be successful in life due to the simple fact that the future is completely unpredictable.

6. Worrying about the past is obsolete. Live in the present and focus on the future. The past only holds you back.

7.  This is basically the meaning of life from a scientific point of view: http://www.simplypsychology.org/maslow.html

 

Thank you for your time.

Combat Round Adding Health Throughout Game Help

9 years ago

nmelssx you there? Just want to thank you for teaching me the proper way. Without you I may have not learned anything and just copy and pasted from someone else who didn't care to take the time and teach me instead of just handing it to me on a silver platter. You are truly a credit to this site, and if I ever get to the point where I am able to give people my own trophy, I'm giving one to you first for being such a credit to the site, a helpful person, and an all around awesome guy. Thank you.

Combat Round Adding Health Throughout Game Help

9 years ago

You're right about not being able to learn anything if you just copy and paste whatever other people give you, but I think that maybe you should tone down a little on the aggressiveness toward James. After all, he is just trying to help, and you could've been nicer about it even if you don't agree with his way of teaching. 

Combat Round Adding Health Throughout Game Help

9 years ago

You are very wise, oh great one.  xD

Combat Round Adding Health Throughout Game Help

9 years ago

Yes sir. 

 

I apologize for what I said.

Let's put our differences to bed.

I hope that we can make amends.

And we can be the best of friends.

 

I'll try to be nicer from now on, Sensei... I apologize.

Combat Round Adding Health Throughout Game Help

9 years ago

Also, please tone down on the flattery. I like flatteries, like most people, but too much of a good thing is a bad thing. 

Combat Round Adding Health Throughout Game Help

9 years ago

Sorry. I apologize. I just think you're really cool and I want you to know that.

Well, if we are done here, I think I'll go back to working on my storygame. 

See you guys later!

Combat Round Adding Health Throughout Game Help

9 years ago

I hate when I have too much money, too much power, etc...

Combat Round Adding Health Throughout Game Help

9 years ago

Too much money makes you a target. Same with having too much power. 

Combat Round Adding Health Throughout Game Help

9 years ago

I meant that sometimes these hillbillies can't break a $100, or when my computer short-circuited during an electrical storm.  xD

Nah, just kidding.  Being a poor, hard-working nobody suits me just fine.

Combat Round Adding Health Throughout Game Help

9 years ago

EXACTLY! Because if you have everything in the world, then what is there to work towards in life? Nothing! And with nothing to work towards, you have nothing to do! And with nothing to do, life gets boring veeeeery easily. That's why I don't like cheating! It gives you exactly what you want when you want and that is bad! Thank you all for such an intelligent conversation! I hope we can all be friends and I'll see you later!