Hello once again,
Pre-Post Request for Lummox JR's Help?
This time I am having trouble with my combat system and targeting. The combat proc that for so long housed the complex damage calculation for macro based combat is no longer sufficient, it causes run time errors when it pulls a death check proc that requires item spawning and at this point in my alteration of it, it just won't work properly. If you ever played Ultima Online, that is a generalized basis for where I am headed with Imersia. I need help in creating a targeting system that is flexible, concise, and properly coded.
In the target system I need;
Click based selection of a target, including yourself.
A war-mode toggle;
Target nearest player;
Target nearest monster;
Target self;
Clear target;
What I need in the combat system;
A proc that will handle something to the extent of while you are in 'warmode', if you aren't 'attacking', you do have an 'enemy', and if you are within attacking 'range', attack that enemy. I have other procs that handle what kind of damage will be dealt by the aggressor and what dissipation the defender will have, a skill checking system for gains and a death-check proc, but all of these are old and poorly coded even from what I can tell and I need to just revamp the whole system so it will nolonger be a sore point.
Right now I am at a place in my coding that I can tell I could easily lose steam and send this project into the abyss of unfinished work. Alot of other content hinges on the completion of working combat, including the archery and the magic, and I feel stranded at the moment.
Thankyou in advance for your help,
-R. Shannon
-- Since I am trying to learn at the moment, if you have only moderate skill at coding, I would ask that you do not reply. I need to learn the best possibly way, the most concise, why and how. I am more familiar with Lummox JR's coding style since most of the systems I have had problems with constructing have been patched and reworked by him. But I would love the advice or input of any skilled programmer. 10 skilled viewpoints may show me different ways of getting to the final answer and may also leave room to discuss and find the best solution.
-- It doesn't take a very large stretch of the imagination to gather that I am not an accomplished coder. My first language was DM, and I have only dabbled in it for a few years. Now that I am trying to undertake a large project the only way that this can be done is if I receive instruction on why and how so that I can add it to my bank of knowledge. The hope is that next time I won't hit a brick wall, but instead will see a solution.
ID:271444
Jul 2 2007, 3:49 am
|
|
In response to Loduwijk
|
|
Loduwijk wrote:
if(!(M.client^type)) continue Uhm, perhaps I am mistaken, but isn't such operator exclusive to numbers? What would it do otherwise? |
In response to DivineO'peanut
|
|
He isn't actually using the datum.type var, the arguments in a proc get read first. Consider this.
obj/proc/SetName(mob/src) Although this is a horrible way to do something the argument src is a mob. Normally if I used mob/M input wouldn't be received. |
In response to Xx Dark Wizard xX
|
|
Yes; this is true, however I was asking more about the use of ^ in this: seeing as ^ is an operator exclusive to numbers(i think), how can a statement such as <code>M.client^type</code>, where, as at least one of the operators is not a number, be vaild?
Sorry if I misunderstood you. |
In response to DivineO'peanut
|
|
Yes, thank you for pointing that out. I wasn't thinking of that when I made the example. I'll have to check that out later, but you're probably right. However, that can be easily remedied with a function, macro, or with the '?:' operators.
|
When you have your ideas refined that far, you basically just set up a bunch of simple functions like that, then call them as needed. For example...
Or something along those lines.
The hardest part is actually disecting the game design until you get it down to the precision of what you said you wanted.
If that's not what you were after, what exactly were you asking about? You sounded pretty confidant in what you wanted already.