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 Marky
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"?

Regarding that "signal" thing: We can name it differently of course. I used signal in that context, because in the real world you'd have an actual switch that is opened or closed. When closed, it sends the signal "1" over a wire to whatever it is connected to. The receiving object/mechanism then does something with that "1", for example: open a door. If you open the switch or remove the wire the mechanism receives a "0" and would close the door.

Update: Ok, the identifier has to be unique -> this kind of makes it impossible for the actions to be defined generically. I really do not want to have each action "open_door" with another identifier, such as the object number, if they all do the same internally.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill