Hard core Monster on Monster action

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
ian_scho
High Lord
Posts: 2807
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Hard core Monster on Monster action

Post by ian_scho »

Euuu, it is not spam, but me again... So it is worse.

Got a monster that can attack not only champions, but other monsters, similar to your monster_wisdomattack function.

I need a way to differentiate between if Im hitting a monster or a champion, and realise that its trickier than I thought. Any suggestions?

Incidentally, is I believe that dsb_add_champion and dsb_spawn("mummy"....) can create two identifiers of the same number (e.g. "4"), so that if I ran dsb_find_arch(who) in the aforementioned attack function I could get a set of stairs for example or even a Invalid instance 4 error.

Thanks :wink:
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

ian_scho wrote:I need a way to differentiate between if Im hitting a monster or a champion
I don't really understand what you mean, because they're handled completely differently. About the only thing you can do is use a flag of some sort... and that does make the code a good deal messier.
Post Reply