#20 Jun 15 2012, 4:51 pm
|
|
Your entire battle system errors out on me. keep getting like 18 errors, I even tried copy and paste instead of writing it out. And I still get those errors.
| |
Dokujin wrote:
Your entire battle system errors out on me. keep getting like 18 errors, I even tried copy and paste instead of writing it out. And I still get those errors. Did you indent it? | |
Could you specify what the errors are? It's difficult to debug code without knowing what's wrong.
| |
#23 Jun 29 2012, 4:16 pm
|
|
is this the right way to make npc's attack? if not can you tell me what is it?
mob/Enemies Attack() flick("Attack",src) for(var/mob/M in get_step(src,src.dir)) var/Damage=max(0,src.Str-M.Def) view(M)<<"[src] hit [M] for [Damage] Damage!" M.TakeDamage(Damage,src) TakeDamage(var/Damage,var/mob/Attacker) src.HP-=Damage src.DeathCheck(Attacker) DeathCheck(var/mob/Killer) if(src.HP<=0) if(src.client) world<<"[Killer] Killed [src]!" src.HP=src.MaxHP src.loc=locate(5,5,1) else Killer<<"You Killed [src] for [src.Exp] Exp" Killer.Exp+=src.Exp Killer.LevelCheck() del src Red_Guy icon='spider zombie.dmi' Level=1 Exp=5 MaxHP=100 Str=10 Def=5 Green_Guy icon='rat zombie.dmi' Level=2 Exp=20 MaxHP=150 Str=20 Def=10 | |
#24 Jun 29 2012, 6:23 pm
|
|
You have to use <dm></dm> tags to make the code appear correctly.
As for your question, there is no specific way to make NPCs attack. You have to decide how you want to do it. | |
#25 Jun 30 2012, 6:22 am
|
|
how then cause their just standing their
| |
#26 Jun 30 2012, 6:24 am
|
||
| ||
There's no usr in your CombatAI() proc, and oview()'s Center defaults to usr. Change it to oview(src).
And make sure your players are of the type /mob/player. | |
#28 Jul 12 2012, 11:01 am
|
||
im not a good coder at all so what would it be? this?
| ||
I didn't mean add usr to the proc, I meant to say that usr is null. Since oview() defaults to center around usr, it's building a list of nothing around nothing.
| |
#30 Jul 13 2012, 5:39 am
|
|
so what do i do?
| |
#31 Jul 16 2012, 6:21 pm
|
|
how do I make good npcs like the ones who kill bad guys
| |
#32 Jul 17 2012, 6:27 am
|
|
ty it worked
| |
Goodiesohhi wrote:
how do I make good npcs like the ones who kill bad guys i have no idea but i wish i knew | |
#34 Jul 27 2012, 10:39 am
|
|
Falacy, what if you had a mob thats widespead across the maps. What if you wanted them to respawn back in the original place that they were supposed to respawn back to?
for instance Rogue NPC = 100 of them instead of having only one spawn point, how can you make it to where they all spawn in their original source locations they were put on the map? | |
#35 Jul 27 2012, 10:40 am
|
|
Use their New() proc to store their location upon creation.
| |
#36 Jul 27 2012, 8:42 pm
|
||
So something like this then? | ||
#37 Jul 27 2012, 9:29 pm
|
|
No. New() is called when something is created. You don't call it yourself. I recommend looking at the Guide and Reference and back off of the naruto rips.
| |
#38 Jul 28 2012, 5:25 pm
|
||
i get a damage error with this TakeDamage(var/Damage,var/mob/Attacker) can anyone help | ||