Discuss Scratch

firefighter04
Scratcher
17 posts

multiplayer

How do I make a multiplayer game
Crimson19
Scratcher
1000+ posts

multiplayer

We're not psychic, do you want to make it on cloud?
firefighter04
Scratcher
17 posts

multiplayer

Yes
Crimson19
Scratcher
1000+ posts

multiplayer

firefighter04 wrote:

Yes

What do you want it to do?
firefighter04
Scratcher
17 posts

multiplayer

I want to make a soccer game so how do I do the cloud script
Crimson19
Scratcher
1000+ posts

multiplayer

firefighter04 wrote:

I want to make a soccer game so how do I do the cloud script

With 11 players? That's ambitious, you need 44 (one for x and y for each player on each team (make that 50 if you want the linesmen and ref)) variables which is impossible as you can only use oan alternative to a cloud list. Then use this:

 

forever
set [player 1 x v] to (x position)
set [player 1 y v] to (y position)

end

You must do this for every player/official. Changing the one every time.

Last edited by Crimson19 (April 3, 2015 18:44:39)

firefighter04
Scratcher
17 posts

multiplayer

I want to do a one on one
Crimson19
Scratcher
1000+ posts

multiplayer

firefighter04 wrote:

I want to do a one on one

That's easy then. You need four cloud variables.

Put the first one inside the first player and the second one in the second player.

if <(player) = [1 ]> then //player [b]shouldn't[/b] be cloud
forever
set [player 1 X v] to (x position) //player 1 x should be a cloud variable
set [player 1 y v] to (y position) //player 1 y should be a cloud variable
end
end

if <(player) = [2 ]> then
forever
set [player 2 X v] to (x position)
set [player 2 y v] to (y position)
end
end

Powered by DjangoBB