ID:180686
 
I'm tring to organize differnt right click menus for differnt types of mobs

i.e.
PC(mob/pc) when right clicked will yield all the social commans

Monsters(mob/monster) when right clicked will yield attack commands

etc...

I'm thinking its something obvious, but I just can't figure it out.

Thanks,
Salarn
On 3/21/01 2:45 pm Salarn wrote:
I'm tring to organize differnt right click menus for differnt types of mobs

i.e.
PC(mob/pc) when right clicked will yield all the social commans

Monsters(mob/monster) when right clicked will yield attack commands

etc...

I'm thinking its something obvious, but I just can't figure it out.

It's how you do the verbs:

mob/pc/verb/say(T as text)
set src in oview()
view() << "[usr] says to [src], \"[T]\""

mob/monster/verb/attack()
set src in oview()
view() << "[usr] moves in to engage [src]."
usr.Attack(src)

The key point is the 'set src' instruction. This tells Dream Seeker which verbs to give to which mobs. So if you were to come into range of a monster, you would be able to attack it.

Just post if you need more help! There's two different formats of set src, by the way:

set src in oview() //explicit target
set src = oview() //implicit target

The explicit target allows a player to select a certain target to be on the receiving end of the verb (by either right-clicking or simply typing in the verb).

The implicit target automatically selects a target whenever it is chosen (either by right-clicking or typing in the verb). If you have the implicit targetting, if you right-click a target and choose the verb, the mob you've right-clicked on won't necessarily be the mob affected by the verb. Explicit targetting, however, is more precise, but also slower.
In response to Spuzzum
Thanks Lots!

Salarn