ID:158262
 
How would one make a knockout system for Mobs so they don't die automatically when they run out of Health/Mana/Stamina?
This is a major gameplay decision. You can either follow some elaborate method of dying or being K.Oed in games or simply force the game to end and make people reload their last save game.

Honestly, due to lack of feature implementation I stick with the latter option. Save often. :P
Like they get frozen and can't move?
In response to UmbrousSoul
Yes, like where they are frozen and can't move. Knocked out after losing all stamina. How do I do that?
In response to Xorbah
Instead of having the check that checks their health kill them, change it to whatever should happened depending on what you expect from a mob that's knocked out. For example:
mob
proc
Death_Check()
if(health < 1) //if their health is less than one...
//do stuff here that happen to knocked out mobs.
In response to Speedro
I'm sorry, i'm a beginner coder. I still don't get it. Things that knock out mobs? What?
In response to Xorbah
As evil as it may sound, but you should start here, else you'll have to come back and ask for every line of source code, in which case it is hardly ever your game.
In response to Schnitzelnagler
Okay, so...I tried reading the guide, and I still don't understrand. I'm trying to learn coding by myself, I find it simpler that way. How would I make it to where a Player or NPC Mob get kncoked out a 0 or 1 HP? And then, how would I create a finish verb? I am very interested in learning how to do this, so, if you don't want to tell me, you can teach me if you'd like. If you need it, I can supply you with coding snippets.
In response to Xorbah
You supply us with snippets when you do not know how to make this type of thing? No thanks, not interested in your snippets.

Schnitz sums it up best: [link]

But if you still want to go ahead and suffer a concussion:

- You need to have some way to keep track if a person is "alive", "knocked out" or "dead".

- In your general procedure for taking health (ex: TakeHP()), check if the person is knocked out when the HP is <= 1. If it is NOT KOd, KO its status and make its HP 1 or something. Remember to help specify what can make a person KO or instantly killed - a bullet to the brain will not KO a person.

- When the person is KOd, add the finish verb... but I find this a waste of time. Why not keep attacking the person? When the person status is KO and HP <= 0, kill it!

And that's your basic system.
In response to Xorbah
Iain Peregrine wrote:
You may find that reading and understanding the BYOND Guide is tough, but that's only because programming is tough; it's not like anything else you've done before, and you have to learn from scratch. If you try to take shortcuts and learn "on the fly" or from snippets here and there, you'll be wasting your own time. The best and fastest way to learn to program is by reading the DM Guide and playing with the code in there.

One more note: Programming is a discipline. It takes training your mind to think logically and it takes training yourself to spot tiny differences in text. If you don't take the time to write properly in your human language, you will never write any code a computer will understand. On these forums, and in your own programming, learn to spell consistently and use proper grammar. It's okay to not know what you're doing, we all started there, but you need to be able to take direction and notice when you're doing something wrong. Good luck!


If you do not understand something when reading the guide, feel free to ask. Describe exactly where you had trouble understanding and rest assured that there are going to be a lot of people helping you understand the basic concept.

A funny side note:
If you ask 'programmers' around BYOND how they learned, you will get one of two possible replies.
The ones that think being able to barely create something half working and cluttered with logical and even runtime errors tell you they 'learned' by looking at other people's source code.
The real programmers, that actually are aware of good practice will however reply that they learned by working with the guide and reference.
In response to Schnitzelnagler
And they usually also mention how they already had previous language knowledge before trying byond. So they were Already Programmers. More than most people can do already. These same people tell others that anyone can do it and that is simply not true.
In response to UmbrousSoul
What you said is "simply not true", to quote.
And if any actual language is, DM is a language that anyone can learn to be pretty good at - and by anyone, obviously it means not strictly anyone but anyone that comes with actual willingness to put in time and effort to learn, read the resources, practice, and read the resources again, etc - which is something not all aspiring BYOND game makers have. But that part should be for granted, as seeing as to be successful in any notable thing in life, you have to come prepared and with willingness to exert yourself when necessary, be it school, studies / high education, work, being in the army, athletics, programming, raising kids and just about everything in else in life that doesn't strictly fall into the definition "simple".

Unlike some other languages like C, DM is extremely convenient, intuitive and easy to use. It was designed to be so, and it was pulled off well while still keeping the language powerful (and that's a property of the language, not having to do with whatever languages one previously learned or not). So yes, it's not really not all that difficult to learn, and most people having trouble or being bad programmers fall into the mentioned group of people either not taking programming and learning it seriously or having no willingness to spend time acquiring knowledge and experience first, so they just dive right into the language before learning to swim first - often because of things like the desire of instant gratification or laziness to learn, which, again, can get in the way of many things in life, not only programming. Some people don't even wish to learn at all and become "copy paste programmers" or "plug n' play programmers", with almost no actual knowledge whatsoever, and practically harass the programming help forums with topics.
Gratefully though, most people in the above group in the community still quite fall into the definition of normal, seeing as they're 12 year old kids <small>(or somewhere around that region, mind)</small>, so they hopefully won't stay like that forever and will be able to work toward a goal once they get older. ;) But if you're a kid who can't take something seriously, then don't tackle something serious like learning programming until you're older first.
In response to Kaioken
Kaioken wrote:
What you said is "simply not true", to quote.
And if any actual language is, DM is a language that anyone can learn to be pretty good at - and by anyone, obviously it means not strictly anyone but anyone that comes with actual willingness to put in time and effort to learn, read the resources, practice, and read the resources again, etc - which is something not all aspiring BYOND game makers have. But that part should be for granted, as seeing as to be successful in any notable thing in life, you have to come prepared and with willingness to exert yourself when necessary, be it school, studies / high education, work, being in the army, athletics, programming, raising kids and just about everything in else in life that doesn't strictly fall into the definition "simple".

Unlike some other languages like C, DM is extremely convenient, intuitive and easy to use. It was designed to be so, and it was pulled off well while still keeping the language powerful (and that's a property of the language, not having to do with whatever languages one previously learned or not). So yes, it's not really not all that difficult to learn, and most people having trouble or being bad programmers fall into the mentioned group of people either not taking programming and learning it seriously or having no willingness to spend time acquiring knowledge and experience first, so they just dive right into the language before learning to swim first - often because of things like the desire of instant gratification or laziness to learn, which, again, can get in the way of many things in life, not only programming. Some people don't even wish to learn at all and become "copy paste programmers" or "plug n' play programmers", with almost no actual knowledge whatsoever, and practically harass the programming help forums with topics.
Gratefully though, most people in the above group in the community still quite fall into the definition of normal, seeing as they're 12 year old kids <small>(or somewhere around that region, mind)</small>, so they hopefully won't stay like that forever and will be able to work toward a goal once they get older. ;) But if you're a kid who can't take something seriously, then don't tackle something serious like learning programming until you're older first.


Haha, that was me. Feel free to search me up on the forums- my posts from 2004 - 2005, I was just starting to learn, very frustrating for me. I was 11 years old and I just wanted to make a game "NOW". Anyways, I used to plug and play and eventually read the DM guide (many times over), and yeah. I guess the point I'm trying to make is Kaioken is right.
In response to Speedro
You people can't read. Its not about WHO does it, or THAT IT HAS HAPPENED, its the fact that not everyone is a programmer, I've been here since around 02 (on other keys) and does it look like I can program? No, why? Because i'm one of those people that ISN'T a programmer.
In response to UmbrousSoul
You're entirely missing the point. Not everybody can write or swim (or read ;)), either, but they can still learn to, provided they will to study it.
In response to Kaioken
I started around... 2 years ago. Granted, I was horrible at it, now I'd like to think I'm better. Even if just a bit :P
In response to Vic Rattlehead
All I am saying is I can't make things in programming from nothing, it has to already exist for me to edit it.
In response to UmbrousSoul
If you are literally incapable of writing your own code, then I suggest finding a new hobby.
In response to Garthor
Tell that to the hundreds of others like me here. Just because we can't program doesn't mean we don't want to make our own game aswell. You guys (especially you garthorn) need to get it through your skulls that NOT EVERYONE is a programmer. The Human Race needs to Work Together. We don't all have the skills to survive by ourselves.

Same goes to game design, One Person isn't MEANT to do the whole project, even though we CAN it isn't practical. Right now I am doing the whole project on my own and honestly I can edit the code enough to make a game, but just because i'm not a programmer i'm more of an artist I'm suppose to just give up? Wrong. You have your thoughts mixed up. Besides if we worked together more games would not only look good but play well and with interesting features. But because programmers are selfish they work by themselves, never think of anything interesting and have ugly graphics. Bad thing about working alone is without a real programmer it will take me years just to get this game into a finished state.

Maybe if the people that could do programming (and their art looks like sticks) could get over themselves and their lonely little programmer lives, then you could team up with someone else and put out an Interesting game instead of just some boring programmer art game that no one wants to play - except other boring programmers.
In response to UmbrousSoul
I think the thread is drifting off.
The advice to start learning a language before trying to 'speak' has been handed to the original poster and the rest of the discussion would be better suited for a thread in Community, like [link].