|
Post by GH Games on Feb 17, 2017 14:46:46 GMT
Hi. So over the past day I've been working on a small multiplayer tank shooting style game, however I can't seem to connect up my projectiles. I have got event on inputs for both the client and the server, all script is in place (if IN_X... and so on), I have everything done correctly in my eyes but the server won't receive or send input from and to the client (hence starting the projectiles).
Anyone know how to set them up? Thanks!
|
|
|
Post by GH Games on Feb 18, 2017 15:28:15 GMT
Anyone? I really need help with this it's doing my head in D:
|
|
|
Post by TinSoldier on Feb 18, 2017 17:25:12 GMT
does any data move between the clien & server or just this problem.
It sounds to me you haven't setup the network player ids properly..
You must have an eventoninput with the playerid set to 1 for player 1, 2 for the second player etc. and enough for all players your project will support, and the network ids have to be assigned 1 per networked item, and all the inputs need to #1 for player #1, etc for all defined players. This means each eventoninput object has to have a unique networkid ( what number you assign only requires no other network object using that id number).
|
|
|
Post by GH Games on Feb 18, 2017 17:40:48 GMT
Each ID is unique (connecting though) I have set them up correctly but the server doesn't receive input and the client won't send it (EventOnInput Objects).
I have got the inputs setup as:
if(IN_X != 0)iObjectStart(OBJ_X); //Start the projectile when the user presses shoot key
I have the EventOnLocations setup as:
bool condition = false; if(IN_X == 1)condition = true; //When the EOL condition is met. This way is the only way it even tried to work if(condition == true){ do whats in here, stop car etc }
Both of these are on the server as they should be. This worked fine:
bool condition = false; if(IN_X == 1)condition = true; //When the EOL condition is met. This way is the only way it even tried to work if(condition == true){ iNetStop(); } But nothing else wants to. Believe me I have tried everything. Custom functions, easiest commands like iObjectShow(), everything. I even tried making the game a client based game (so all collision happens on client and server is there to receive it and do the logic). Haha it was hilarious how much it didn't work. Any ideas?
|
|
|
Post by TinSoldier on Feb 18, 2017 18:05:23 GMT
Well that last script seems wrong in every case... why is the inetstop being controlled by EOL object ??
but that's besides the point..
you're saying the network id's are setup properly, and giving script samples which generally seem very basic.
I can only assume here your problem is scripting based and not the EOI problem you suggest.
You really need to provide the actual script ( ONLY IF ITS NOT HUGE ) to let us look for some scripting error you've made.
|
|
|
Post by GH Games on Feb 18, 2017 19:34:49 GMT
It was for testing because I was getting no where and I have tried about 100 different theories all failed. The examples I gave were basics yes because the if(IN_X)... bla bla is all you need for the inputs.
Anyway, it wasn't the scripting that was the issue. It was the EOL's. I have managed to get this almost working to how it shoudl be. However it still doesn't answer what my original query was xD the EOL's aren't a problem. Fixed.
Projectiles though? Any thoughts?
|
|
|
Post by TinSoldier on Feb 19, 2017 0:06:08 GMT
Well there's a few ideas..
Attach skinmesh's to each projectile and network them, that will let 3drad do the work. ( may or may not be a laggy process).
the current project i'm working on will be using network projectile skinmesh's, but its not a FPS where speed is required.
Another process, if more like a FPS is required, you mite use a scanner object to test if contact happens when the trigger is pulled, then count that as a target hit, the shinmesh would simply be for visual effect ( not using it's rigidbody for collisions) ( i haven't played with that idea so you really need to look at a FPS project to see what they are doing, or ask someone who has ).
As i say, i'll be using networked skinmesh's attached to the the shell rigidbody for each shell.
|
|
|
Post by GH Games on Feb 19, 2017 10:13:06 GMT
This isn't for a FPS game it's just a car game. I have done that too, attached the skinmeshes to the rigidbody projectiles and networked them. The clients skinmesh won't show on the server even though they are setup correctly. I think it may be a scripting thing. How do you have your inputs setup for your projectiles from the client?
|
|
|
Post by TinSoldier on Feb 19, 2017 16:57:42 GMT
the normal way 3drad expects.. the best i can suggest is look at the netball projects, that is a 4 player network game and it will show you what settings to use.
|
|
|
Post by TinSoldier on Jun 24, 2017 15:20:19 GMT
This isn't for a FPS game it's just a car game. I have done that too, attached the skinmeshes to the rigidbody projectiles and networked them. The clients skinmesh won't show on the server even though they are setup correctly. I think it may be a scripting thing. How do you have your inputs setup for your projectiles from the client? GH Games did you get this worked out GH, if not, let me know, i'll help.
|
|
|
Post by GH Games on Jun 24, 2017 15:55:02 GMT
I didn't get it to work no. Thank you Tin
|
|