I already have one madebut it is a cheap piece of crap. You can't change your enemy's attack or defense or the gold or exp you get. So does anyone have a good battle system I could use. One that is both simple to use and understand and highly flexible.
Thanks
ID:177877
![]() Jul 20 2002, 1:10 pm (Edited on Jul 20 2002, 1:42 pm)
|
|
Here the system is. There are a couple of errors in it but good luck.
mob/monster/slime icon = 'monsters.dmi' icon_state = "slime" health = 25 maxhealth = 25 var/mob/characters/P New() .=..() spawn(10) Wander(10) proc/Wander() while(src) if (P in oview(5)) step_towards(src,P) else step_rand(src) for(P in view(src)) break sleep(5) spawn(40) Wander() Bump(mob/M) if (istype(M,/mob/characters)) NPCAttack(M) proc/NPCAttack(mob/M) mob/monster Move(atom/newloc) if(!newloc) return ..() // Move(null) if(!loc) return ..() // Move from null if(newloc.type!=loc.type) return 0 // don't move to any other kind of turf return ..() mob/monster/skull icon = 'monsters.dmi' icon_state = "skulls" health = 50 maxhealth = 50 var/mob/characters/P New() .=..() spawn(20) Wander(20) proc/Wander() while(src) if (P in oview(5)) step_towards(src,P) else step_rand(src) for(P in view(src)) break sleep(5) spawn(20) Wander() Bump(mob/M) if (istype(M,/mob/characters)) NPCAttack(M) proc/NPCAttack(mob/M) |
You didn't actually show the NPCAttack() proc--just the first line of it. That's the key one to change here.
I'm curious what code base you started off with. This isn't the first time I've seen this particular wander-and-attack setup, and I have to say I'm not very impressed with it. The author split up the attack procs in a very weird way. Lummox JR |
For acquiring a key a little more than a week ago, you're expecting much and expressing little appreciation. Instead of impatiently requesting a battle system code,
- Try using the advanced search to find matches for "battle system" or the like, to see how others put together their own code. - Examine the battle system demos in the developer's hub. You may find a better example to match what you are looking for. Not everyone has the same technique (at least I would certainly hope not). - If you haven't coded before, show the forum regulars that you're willing to learn from their examples. As a beginner/novice (this is being optimistic), they have helped me quite a bit by reviewing/adjusting code and translating some of DM's help topics. - Last but certainly not least, buy the Blue Book! =D I would offer help with your code, however I'm using the "mob in oview(1) attack verb" until I can plot out exactly what i'd like to see in my battle system. Best of luck, Matic293 |
this entire set of posts was extremely foul and rude.
I would have never replied when he wrote: HURRY UP!!!! and moderator, I would have at least given the boy a warning. Codesterz, don't expect to get very far in BYOND being incredibly rude: Look where it got me! :P |
It sounds to me like those should be simple vars to change. A battle system that isn't even that flexible is indeed a piece of crap.
Perhaps you could show us the code for your existing system and we could help you improve on it.
Lummox JR