How to create text messages using actions and menus?

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

How to create text messages using actions and menus?

Post by Gambit37 »

I have an item with a custom usage menu -- so when you place it in the champion's hand, you can click its "attack" icon and do different things with it.

I want some of these actions to also generate a message.

I tried adding an "Additional Action" to the "Convert -> Use" tab of my new item. The action is ACTION_OBJECT_ACTIVATE and the item it points to is a unique clone of the WALLITEM_SPEECH.

This clone is placed in the dungeon and has its text string assigned.

No message appears when I use the object.

What gives?

How do we make messages appear as the result of actions?
User avatar
Gambit37
Should eat more pies
Posts: 13720
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

OK, I solved it by having my attack method target a cloned relay that targets other objects that in turn do the things I want to do.

It seems that this is actually the best way of doing complex stuff, rather than having attack methods affect stuff directly -- that's only useful when you want ONE thing to happen.

Convoluted!
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

I think you hit the same snap we all did didn't you? For a convert to work, you need to have a convert occur - even if the convert is to the same item

Cloned relays/action items always seem to be best rather than creating an attack method to do the action itself first, it lets you sneak complexity in later
Post Reply