Mirage Source
http://miragesource.net/forums/

NPC Vs. NPC
http://miragesource.net/forums/viewtopic.php?f=193&t=5532
Page 1 of 1

Author:  Nean [ Wed Apr 22, 2009 11:19 pm ]
Post subject:  NPC Vs. NPC

Has anyone considered doing this? Would it be hard? Any ideas on how to go about it, I'm quite interested seeing as I may be working on a game here shortly.

Author:  Jacob [ Wed Apr 22, 2009 11:30 pm ]
Post subject:  Re: NPC Vs. NPC

If you just want basic attacking, then you could essentially copy the current code for attacking players and replace it all for npcs.

Author:  Nean [ Wed Apr 22, 2009 11:35 pm ]
Post subject:  Re: NPC Vs. NPC

Dugor wrote:
If you just want basic attacking, then you could essentially copy the current code for attacking players and replace it all for npcs.


Really? Sounds easy... Probably just a lot to copy. Thanks though. :)

Author:  Dragoons Master [ Thu Apr 23, 2009 1:24 am ]
Post subject:  Re: NPC Vs. NPC

Code:
Type MapNpcRec
    Num As Integer
   
    Target As Integer
   
    HP As Long
    MP As Long
    SP As Long
       
    x As Byte
    y As Byte
    Dir As Integer
   
    ' For server use only
    SpawnWait As Long
    AttackTimer As Long
End Type

Npcs can attack only other players by now.
First you need to be able to specify if you are attacking a Player or an other NPC. Do this the same way players do it, adding the "TargetType As Byte" to the npc's type.

Author:  timster0 [ Fri Apr 24, 2009 5:48 pm ]
Post subject:  Re: NPC Vs. NPC

This would be good for "factions".

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/