About Store Forum Documentation Contact
Donations:
158$/mo



Post Reply 
Question about EnterGame Method
Author Message
Amnedge1331 Offline
Member

Post: #1
Question about EnterGame Method
Hello Esenthel,

I would like to know how can I set the same world with void setWorld(World *world, C Vec &pos); from Obj, with a "different" ID, because I would like to create an instance of the world which contain separate neighboor, maybe it's the wrong way so can you explain ?

Thank in advance.
09-01-2016 12:01 AM
Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Bronze Supporter

Post: #2
RE: Question about EnterGame Method
well all world i think would need to be created as their own entity as i'm pretty sure the basic net world doesnt take any id as args, so you would need to create the world then load it as one per instance.
(This post was last modified: 09-01-2016 07:48 AM by RedcrowProd.)
09-01-2016 07:46 AM
Find all posts by this user Quote this message in a reply
Amnedge1331 Offline
Member

Post: #3
RE: Question about EnterGame Method
It's from server side what i'm talking, I just load the World in server side to interpret custom OBJCLASS I already done a way to create instance with one load of the world. After that I setWorld to allow a user to enter in game, this allow him to see the neighboor with the same World, but what I want is the same World and separate neighboor, and there is not enough args in setWorld to do this. So I ask to any solutions to separate this.
(This post was last modified: 09-01-2016 11:10 AM by Amnedge1331.)
09-01-2016 11:08 AM
Find all posts by this user Quote this message in a reply
Amnedge1331 Offline
Member

Post: #4
RE: Question about EnterGame Method
Any tips @Esenthel ?
09-09-2016 09:13 AM
Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Bronze Supporter

Post: #5
RE: Question about EnterGame Method
you will have to inherit and do your special function there i believe.
09-09-2016 04:51 PM
Find all posts by this user Quote this message in a reply
Amnedge1331 Offline
Member

Post: #6
RE: Question about EnterGame Method
I'll probably, but before doing that I just want to be sure I must do this. So I just ask for.
09-09-2016 05:03 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #7
RE: Question about EnterGame Method
Hi,

If I remember correctly the Net World class doesn't load any data, but just stores a collection of clients.

So when creating net world ID, you can use any UID you like.
use UID.randomizeValid
09-10-2016 01:00 AM
Find all posts by this user Quote this message in a reply
Amnedge1331 Offline
Member

Post: #8
RE: Question about EnterGame Method
Okk I understand, I will try this soon thank you smile
09-10-2016 02:08 AM
Find all posts by this user Quote this message in a reply
Amnedge1331 Offline
Member

Post: #9
RE: Question about EnterGame Method
Hum, when I do this:
Code:
Net .World    *world   =Net.Worlds(EditorWorld); // starting world
      world.id().randomizeValid();

[Image: 235906error.jpg]
09-10-2016 06:50 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #10
RE: Question about EnterGame Method
Net .World *world =Net.Worlds(UID().randomizeValid());
09-11-2016 01:25 AM
Find all posts by this user Quote this message in a reply
Amnedge1331 Offline
Member

Post: #11
RE: Question about EnterGame Method
It's ok, thank you Esenthel smile
09-12-2016 12:19 PM
Find all posts by this user Quote this message in a reply
Post Reply