-
Multiple OINC Instances
Greetings,
For my game, I'm using 1 frame for the main game. This space game has hundreds of sectors. If you're in Sector 1, the CHANNEL name is Sector 1. If you're in Sector 200, the CHANNEL name is Sector 200. When you warp from one sector to another, I set a global string to the sector name, then, restart the frame, thereby re-connecting to the server and joining channel (sector) was stored in the global string.
THIS WORKS GREAT!
The problem I'm having is that I want to allow chat between sectors.
So, I created a 2nd instance of the OINC extension and have that instance always join a channel called "CHAT".
When the game starts up, the chat works. Players who each just started the game can all chat using this 2nd OINC instance.
BUT (and its a big one!)...
As soon as the player re-starts the frame because he warped to a different sector, the 2nd instance of OINC stops working.
I've been banging my head against this all day, with no luck.
An interesting note... if the 2nd instance is there, I can't connect either of them.
I know we're still in development, but is this a bug, or should I be going about this some other way?
-
Re: Multiple OINC Instances
Why do you need a second instance...?
-
Re: Multiple OINC Instances
I need a second instance to connect to and remain connected to a separate channel.
Can one instance be connected to more than one channel at once?
-
Re: Multiple OINC Instances
I'm not sure. Sorry... maybe instead you should use "send to server" for chat?
-
Re: Multiple OINC Instances
There's an idea...
I'll try that, thanks RR
-
Re: Multiple OINC Instances
Apparently, that won't work either. I suspect that is because the server must be prepared to receive the message and know what to do with it.
-
Re: Multiple OINC Instances
I'm out of ideas. It usually works for me. Did you get rid of the other instance and try it?
-
Re: Multiple OINC Instances
You've used server messages?
If so, I'll try again. I may be just too burned out tonight.
-
Re: Multiple OINC Instances
It might not work if your using a public server I guess?
-
Re: Multiple OINC Instances
Yes, you can connect to multiple channels with one OINC object.. if you create two, they will become the same object (as OINC is global) and things will break.
-
Re: Multiple OINC Instances
I'm making adjustments but I'm experiencing some issues... If the message is sent on one channel, it seems to be sent on the other channel too. How is that possible?
If there was a way to check the Channel as a condition, that would be great.
-
Re: Multiple OINC Instances
Uhm.. that's not possible. You need to select the channel to send on via the "Channel -> Select" actions. Channels will be selected automatically when conditions fire, so actions in a "channel message" will affect the channel the message arrived on, etc.
-
Re: Multiple OINC Instances
Right, I'm doing that... I'm sure I've missed something somewhere.
So it's not possible to test the name of the channel when a message is "sent"? I'll keep working on my stuff, I'm sure I can solve this either way.
Thanks for the help!
-
Re: Multiple OINC Instances
Quote:
So it's not possible to test the name of the channel when a message is "sent"?
On channel message (sent)
+ Channel_Name$( "OINC client" ) = "something"
-
Re: Multiple OINC Instances
Forgive me for being so dense, but I can't find Channel_Name$ in the menu... I can't figure out how to put that in.
-
Re: Multiple OINC Instances
It's an expression.. you have to use "Compare two general values" under the special object (the icon has two computers next to each other).
-
Re: Multiple OINC Instances
-
Re: Multiple OINC Instances
Ok, I keep crashing the game when I do this:
On Channel Join
+ Channel_Name$( "OINC client" ) <> "SpaceChat"
Here's why I'm doing this:
On Channel Join I create the player's spaceship. I need to prevent the game from creating 2 space ships because the player is also joining the "SpaceChat" channel.
Server shows no errors or anything un-expected. I'll try to trap it with an on error and see what happens.
EDIT: No luck, game crashes, I can't get the error details
-
Re: Multiple OINC Instances
I'm going to try to set a trigger, I can test the channel name after the trigger variable is set.
-
Re: Multiple OINC Instances
Yeah, sounds like a bug. I've done quite a bit since the last release, so we'll see when I get the next build out..
-
Re: Multiple OINC Instances
Sounds good. Keep up the good work!
Just as an FYI on this:
I set a variable to 1 on Channel Join...
ON CreateShip = 1
+ Channel_Name$( "OINC client" ) <> "SpaceChat"
Same result. Crash.
-
Re: Multiple OINC Instances
Ok, just to see if I could pull a rabbit out of my, uh, hat...
I tried to assign the Channel Name to a variable... that also crashes the game.
-
Re: Multiple OINC Instances
Yes, I know.. I confirmed there's a bug in the Channel_Name$ expression.
-
Re: Multiple OINC Instances
ok, cool... Didn't mean to beat a dead horse, was just trying to find a work around.
-
Re: Multiple OINC Instances
so how exactly would we go about connecting to two different servers
-
Re: Multiple OINC Instances
Well, you can't at the moment..
-
Re: Multiple OINC Instances
Jamie, no rush, just curious if you have a new release planned for the near future?
-
Re: Multiple OINC Instances
I always have a new release planned for the near future ;)
It has only been 11 days since the last one..
-
Re: Multiple OINC Instances
any hint as to what's new for the next release?
-
Re: Multiple OINC Instances
If I were you I'd let him work on the release and find out later :)
-
Re: Multiple OINC Instances
lol, it's just conversation RR, it's not like I'm tapping on the shoulder of someone trying to disarm a bomb! ;)
-
Re: Multiple OINC Instances