Not logged inOpenClonk Forum
Up Topic Basic functionality for switches

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to Sven2

> So, you have to register OpenDoor() with that handle "open_door" (or whatever name you want to have) and there is no way to call it directly? What if two objects define the action "open_door"?


Yes, actions live in a global namespace. That's because most actions for the editor are global anyway (like messages, game goals, create objects, etc.), and they all end up in a big dropdown list for the editor actions. It may make sense to introduce additional "per object" actions. For the editor, all actions must end up in a big dropdown list anyway, so there's no good way around that global list. It may have been a good idea to prefix action names though (e.g. calling them Door.open instead of open_door) to avoid conflicts.

>  and there is no way to call it directly?


You can always call door->Open() (or whatever the function is called). I don't think the trigger system should replace all regular object calls.

> Regarding that "signal" thing


"signal" is fine. It's just that in Qt, "signal" is the trigger. You have signals, slots and connections between the two. I can see how the signal could also be the connecting piece (as in "a signal going over a wire").

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill