How do you make an item start "inactivated" like a teleporter not teleporting until you activate it, or even having a particular state where it calls the teleport function only when it recieves the M_ACTIVATE message ?
- I would gladly have to new messages : M_ENABLE, and M_DISABLE.
A disabled object would respond ONLY to the M_ENABLE message, by becoming enabled. It would otherwise : block dsb_message_chain (except the M_ENABLE message, maybe), be invisible in the dungeon, and overall considered as non existent in the game.
An enabled object, is just a normal object.
If you think that's there an existing way of doing what i imply, please explain !
Messages and item states
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting. You may
to help finance the hosting costs of this forum.
Please read the Forum rules and policies before posting. You may


make dsb_msg_chain(id, target) work
in a different way :
Code: Select all
when (id) receives a message (M) :
if (id.msg) equals (nil) then
relay (M) to (target)
else
relay (id.msg) to (target)

What Is Your Quest ?
- Sophia
- Concise and Honest
- Posts: 4307
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Messages and item states
Calling dsb_disable() on the instance as soon as it's spawned should do it, right?Joramund wrote:How do you make an item start "inactivated"
I don't really understand what you want, here.Joramund wrote:If you think that's there an existing way of doing what i imply, please explain !
However, maybe it's not needed any more. Look at 0.10, I added "x_relay" and "x_counter" types that should do what is needed for RTSB. (The x_ is because they're for emulation and I don't know how much use they'd be in from-scratch DSB dungeons)
This is an interesting idea, but I'm a bit against it because that requires checking the "msg" exvar. Right now a msg chain is handled by the engine and is "blind"-- it will work regardless of exvars or anything else, in case the designer is ambitious and has created a totally new (and weird) messaging system.Joramund wrote:make dsb_msg_chain(id, target) work in a different way
So, I think "x_relay" should do for now.
But please let me know if you have any more questions/problems.

Re: Messages and item states
Sophia wrote:Calling dsb_disable() on the instance as soon as it's spawned should do it, right?Joramund wrote:How do you make an item start "inactivated"
The confusion comes from the fact that I thought of a "deactivated" item as an item in its alternate state, while "disabled" meant invisible in the dungeon. But since there is no such difference in dsb, my idea was pointless. SorrySophia wrote:I don't really understand what you want, here.Joramund wrote:If you think that's there an existing way of doing what i imply, please explain !

That rocks. I should be able to release RTSB and the DM dungeon really soon !Sophia wrote:However, maybe it's not needed any more. Look at 0.10, I added "x_relay" and "x_counter" types that should do what is needed for RTSB. (The x_ is because they're for emulation and I don't know how much use they'd be in from-scratch DSB dungeons)
What Is Your Quest ?