Mirage Source
NPC Vs. NPC - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51)
+----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44)
+----- Thread: NPC Vs. NPC (/showthread.php?tid=2765)



NPC Vs. NPC - Nean - 22-04-2009

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.


Re: NPC Vs. NPC - Jacob - 22-04-2009

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


Re: NPC Vs. NPC - Nean - 22-04-2009

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. Smile


Re: NPC Vs. NPC - Dragoons Master - 23-04-2009

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.


Re: NPC Vs. NPC - timster0 - 24-04-2009

This would be good for "factions".