SpaceBoundaries

Introduce your project and write about your work.

Moderator: PPS-Leaders

Post Reply
kmaurus
Human Space Navy Private
Posts: 2
Joined: Tue Mar 15, 2011 8:20 pm

SpaceBoundaries

Post by kmaurus » Thu Mar 24, 2011 2:55 pm

I'm trying to display a text message to inform the player that he's leaving the allowed region. Now I'm wondering how (or if) this can be done without including the GametypeInfo.h-File.

User avatar
Mozork
Mogthorgar, the mighty
Posts: 134
Joined: Wed Sep 24, 2008 3:27 pm

Re: SpaceBoundaries

Post by Mozork » Thu Mar 24, 2011 4:24 pm

Yes, as soon as the notifications module is back in orxonox (instead of the modules) you can just send a notification, which is rather straight forward. I'm actually working on making the notifications better and once that is done they'll be moved into the orxonox directory again.

User avatar
x3n
Baron Vladimir Harkonnen
Posts: 810
Joined: Mon Oct 30, 2006 5:40 pm
Contact:

Re: SpaceBoundaries

Post by x3n » Thu Mar 24, 2011 7:24 pm

have a look at the KillMessage class. it displays a message whenever you kill someone. it inherits from the GametypeMessageListener-interface which is used by GametypeInfo to send the actual message. you could add a new function to the interface to send your message.

notifications may work as well, but maybe rather work with interfaces instead of moving it all to the orxonox library?


edit: the way I described works also in multiplayer matches (the message is sent to the client using a network function call). I don't know if this works with notifications as well
Fabian 'x3n' Landau, Orxonox developer

User avatar
Mozork
Mogthorgar, the mighty
Posts: 134
Joined: Wed Sep 24, 2008 3:27 pm

Re: SpaceBoundaries

Post by Mozork » Thu Mar 24, 2011 8:03 pm

Notifications should work over the network, at least they did, last time i checked.

Maybe I could think up some kind of interface.
I think that it would be a good idea to unfiy all these GamteypeMessages under notifications, to make things a little simpler and more generic, for that classes in orxonox need to have access to them, whether I do that by moving the notifications back into orxonox or by some kind of listener, I haven't thought about how to do it, yet. I'm not sure, which makes more sense.

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests