I’m working on this multiplayer game based on something I used to do with a friend in Battlefront 2.
Here’s the idea
One player plays as a slow monster with a ton of health and abilites, but only has one life
The other(s) play as soldiers sent to kill the monster, and then can respawn a limited amount of time
I’ve got the movement and team selection working, but I’ve run into a problem,
When someone joins the game, the animation I have the character play depending on what team they’ve selected don’t play on any of the other remote players, but the players that were there when the new player joins can see the animtions on the new player
Here’s the link, help would be appreciated, I still haven’t figured all the multiplayer stuff out yet, thanks in advance.
I’m not exactly sure how the logic of your game works, but for your second problem about limiting the horror team to one I have some suggestions. You could have a number, or even a variable, that counts the number of players on the horror team. If the number is 0, then you can allow someone to join. Once the number is 1, don’t allow people to join.
I just have one question, sorry for going off topic cause I literally don’t know much about Multiplayer physics, but @GrimProductionZ might be able to help you. But how did you make the shadow for your game, to looks so cool and I was needing something similar to that for my game.
Like I said, i’m terribly sorry for taking this off topic and asking you questions when you are the one needing help.
Oh no problem, I’m actually really proud of the shadows thing. Basically, every area where there are shadows is covered by an object. Then you have to send the player’s x and y position to the shadow (if you’re doing multiplayer you have to use the player check behavior to only allow the local posistion). Once you’ve done that, you’re going to need 2 behavior bundles that I think JR made, one that calculates the angles to a posistion, and the other that calculates the distance between 2 posisitions, you can find both of those in my Shadow object in my game under the names of AngleTo and Distance Between (note I didn’t make either, it’s a bunch of math that I don’t understand). You use the players position that you sent to the shadow and the angle to the players postion to point a raycast right at the player, make sure you tick the “stop at first object” box. Once you’re done that, set the shadows alpha to 0 if it’s close enough to the player, using a proximity check, and after that if the raycast hits. Then you also want to set the alpha back to 100 if the raycast misses, or if it’s too far away. Last step is to set the 0 that you used earlier to the distance from the player calculate earlier, divided by a number between 1.1 and like 3 or something (this determins how dark the area around the player is)
That’s about it, my explanation might not be the best and I had to omit a bunch of other little things. All I can really say is to just look at the Shadow object in my game and try and figure it out with this explanation
Indeed I do, here’s my problem:
There are 2 teams in my game, the player doesn’t change with each team, it’s just going to play a different set of animations, I have both idle animations set up, and they work, mostly. I’m using the save behavior to save the team chosen by the player in the main menu, and then reading that number and playing the animation accordingly. The problem I have seems to come from the fact that I’m spawning the player from a spawnpoint object, because I wasn’t using that before and it was working (but not using a spawnpoint also made the objects attached to the player not show up for other people). So now basically when someone joins the game, they don’t see the animations anyone else is playing, but everyone else sees the animations they’re playing.
Animatons work fine in multiplayer, as you can see by the blue and red players, but the screen on the right joined after the one on the left and he can’t see the right players animations. I have no idea why this is happening