ID:266362
 
How do you get monsters to attack,i know how to get them to walk,but not attack.If you know,Please tell me!went .Thanks alot!
Please if you want help, make sense..
You might want to check into Deadron's Combat System demo also.

SSJ4_Gohan_Majin wrote:
How do you get monsters to attack,i know how to get them to walk,but not attack.If you know,Please tell me!I also went through Dearons walking and clicking,but everytime i tyer to re-open it,it brings me to when you just Login to Dream Maker to do a new enviorment or open one.But don't worry about the Dearon thing now.Thanks alot!
It really just depends on how you want to handle it. If your using Deadron's Event Loop then you could do it like this:
mob
BaseEvenCycle() //can't remember exact name...
var/mob/M = Look_Arround()
if(M)
attack(M)
proc
Look_Arround()
for(var/mob/player/M in oview(4,src)) //replace 4 with it's targetting range
return M

attack(var/mob/M)
M << "[src] attacked you!"


I haven't actually tested this code so I don't know if it will work by cutting and pasting it but it should give you a place to start.

Of course there are many ways to do these sort of things, this is the just the best way I've come up with so far.
In response to Nadrew
Nadrew wrote:
Please if you want help, make sense..

There i made sense by editing it.
In response to English
ErrorS:everything's a bad proc and unfined var.
In response to SSJ4_Gohan_Majin
I told you NOT to paste it into your code, and I said it probably WOULDN'T work exactly the way it is.

You have to adapt it to your code by changing what kind of mobs it will attack perhaps instead of just /mob/player

Plus, you've got to check Deadron's Event Loop to find out the write name for that proc.

If you aren't using Deadron's Event Loop then I have no idea what your program does and none of us can help you.