1
2
Nov 22 2011, 7:26 pm
|
|
The combat AI is already typed to only attack /Player mobs. You also shouldn't be checking if things ==null, instead, use something like if(!M.key).
|
Oh! My bad. I forgot I took that part out. Either way, if you want that bit taken out AND NPCs not to attack eachother because you don't want your mob to have a special path, that works too.
|
In response to Michael.smith94
|
|
Posting the relevant code would be helpful.
|
i need help i put the combat ai proc in but it says this;179:error: M: undefined type: M for every line with 'M'
|
In response to Michael.smith94
|
|
Michael.smith94 wrote:
When my enemy attacks once close to me, it disappears. What should i go? I think it's probably the flick, his enemy probably doesnt have the attack state. |
I had the same issue with the disappearing enemies, except they were only visible when attacking. Turns out I forgot to specify a name for the enemy's walk state.
Another bit of weirdness I had was attacking myself if another enemy was out of range. Adding the following under the Attack verb right above the damage calculation cleared it up:
Thanks again for the Tutorials. They're a good kickstart even if they aren't perfect. |
Hello Falacy
mob/monsters This is my AI system. But whenever I use this my CPU increase for 2%. What I want to do here is that when players are in AI oview(7-3) he will do projectile. My goal is also to prevent AI from facing them diagonally! I also want that if AI is in oview 2 he will walk to player and attack him once he is 1 step away from him. And while non player is in AI oview he will be teleported back to spawn and get his stats refreshed. Ty |
mob/monsters/proc/CombatAI() There you go. Your code is a ton more complicated than it needs to be. /mob/monster |
ok i dont get this my enemy is not attacking watsoever it just sits there.. could it be because i set the enemy with map editor or wat??? btw yes ive been following since tut. 1
|
In response to Natasdrol
|
|
check to see if you capitalized the p for player when you defined it I did and the same thing happened to me eventually I decided to fiddle with it both player in the code and where you defined it should be lower case or upper case but those must be the same I think.
|
In response to Dark sage biko
|
|
a bit late mate
|
1
2