#How can i add a delay in my scripts?
61 messages · Page 1 of 1 (latest)
but the issue is it doesnt create a player prefab, netcode for unity already does that tho, but in my active scene, so rn whats happending its creating a player prefab in the main menu scene then it transports me into my game scene
i was thinking to maybe add a delay to the host? or maybe have a bool in the other scene to check if im hosting. singleplayer or a client, so when i click singleplayer and the bool singleplayer is true i can start a player prefab with no isseus, and if its multiplayer then make it so it hosts in the game and not dirrectly in the scene
how many cameras
the tutorials only use 1 camera a top down view of all the players wilst in my game all players have cameras
ohhh
same thing with canvas right?
yes LOL
how do i even do that?
once the game starts it checks for only 1 player prefabs then insta parents a camera?
but my cam has some stuff related to it
that's one way
but is it even a good way?
make like a player prefab of the camera once game starts it gets the player prefab then parents it to it and once it does that then i can make it so it never does it againț
is this idea ecven good?
it's alright. not going to cause you major problems. ideally you won't parent so that the camera and player can move slightly free of each other. like if you want camera smoothing
terrible
anything that depends on timing is pretty easy to break
i know why its wrong and i think i know how to do it
imagine if the server lags a bit more
huh?
no thats the thing
instead of hosting the game with a button it just turns a bool to true and once the game starts it checks if that bool is true then it hosts it
like a bool multiplayer;
if buttonpressed Multiplayer == true;
there should be a "proper" way to do this using netcode
then in the game it would be smth like
void start
if multiplayer = true;
Network.singleton.hostStart();
idk how ih vae 3 tutorials on
thats im currently using none of them are doing what i need
so find another one? or read docs
"Add Multiplayer, its going to improve ur game and it isnt hard at all" they said
by the looks of it this does the thing i ned too
Who said this
everyone
Name one person
no one said this from this server but alot of em said em from enardos server
lol
Smth
larry
Smelly
Enardo
Throat
Concryo
Seppe
Pus*y (odd name i know)
the list goes on and on
you can join the server and check the names if u dont believe me
well i think they might be a bit mistaken on how easy it is
i knew its hard asf, mostly cause i made a game MEANT FOR SURVIVAl so i had to rebuild so much code and i still have too
question is do i add lobbies and stuff? i dont think the game will be popular, all i can think of is maybe like a pregame lobby where u can see the id or maybe put the server ID in the corner
that tutorial doesnt have a similar thing to mine i cant rlly find a good one
it has a ingame thing
it asks if u want to host in the game scnee
maybe you should start another question
and have a very clear explanation in the question body
why? this is the exact question i had at the begining
what would i name it tho?
no the exact question you had was adding a delay in your scripts
saying "how to add multiplayer" is kinda not the thing im looking for
yeah cause i still cant find any other way
I don't know because I don't know what you're asking
Describe specifically your problem