Yet-another Multiplayer Demo (with capx)

Show us your completed creations made in Construct 2

Post » Tue Oct 02, 2012 11:45 pm

ok. thank
B
16
S
3
G
3
Posts: 15
Reputation: 2,813

Post » Thu Oct 04, 2012 9:52 pm

hello. @JohnnySheffield I once said you were working with 3 more people to do something like I have in mind and that you could provide me a demo. wanted to know if sige up what you said, and if at least you can help me with a couple of things I still do not understand. thanks
B
16
S
3
G
3
Posts: 15
Reputation: 2,813

Post » Sat Oct 06, 2012 1:23 pm

hi all,
I noticed that when there is already a person in the game and you plug in another person the client moves the image to half the distance between the two spacecraft and the two most clients do not see their spaceships.
why? how can I fix I want that each client can roam the map as my game window is 2048 x 2048
B
11
S
5
G
1
Posts: 53
Reputation: 1,633

Post » Sun Oct 07, 2012 12:35 pm

I realized that the problem is caused by scrol-to
B
11
S
5
G
1
Posts: 53
Reputation: 1,633

Post » Tue Oct 09, 2012 9:02 am

@LimonSpace

I have the same issue with creating multiplayer games. If I log in with 2 or more players, the "ScrollTo" function messes up everything.

Is there a way to have a ScrollTo function for each player, but don't affect the others?

Idea: what if I make a personal, invisible scrollto-box, and when a player joins, destroys everyone's but their?
B
4
Posts: 7
Reputation: 390

Post » Tue Oct 09, 2012 5:45 pm

@LimonSpace and @BarneyK : I recommend you use the following event/action code instead of the scroll to behavior:

Condition:
Every Tick
Pick Player by UID (in my sample I store the player's UID in the Controller object's MineUID instance var)
Action:
System->Scroll to object (choose the player)

That would allow C2 to pick the sprite owned by the player and scroll to it.

B
26
S
7
G
3
Posts: 118
Reputation: 4,264

Post » Wed Oct 10, 2012 7:51 am

@juantar Thanks! It's a great idea, I'll give it a try!
Btw thanks for the awesome tutorial of making games available to play online! You just know what's going on here!:D
B
4
Posts: 7
Reputation: 390

Post » Wed Oct 10, 2012 12:10 pm

Struggling with removing players that "leave".

I would like to remove the Sprite of the player that has left the game.

Closed browser or pressed leave.
B
40
S
11
G
4
Posts: 665
Reputation: 8,403

Post » Wed Oct 10, 2012 5:44 pm

@Schoening Here's my solution for the leave button:
Event: Button -> on clicked AND Sprite -> Pick instance with UID Controller.MineUID
Action: Send "DC," & str(Sprite.NetworkID)

Event: System-> compare: Socket.LastDataElement(0)="DC"
Subevent: Controller -> compare: MineID != int(Socket.LastDataElement(0)
AND Sprite -> Pick instance with UID Array.At(int(Socket.LastDataElement(1)))
Action: Sprite -> Destroy

This is my solution for that, and it works for me perfectly:) But the browser closing is problem for me too.
B
4
Posts: 7
Reputation: 390

Post » Wed Oct 10, 2012 5:47 pm

Ohh, I forgot to write down my problem:)
So I want to make nameplates above the players. It works only when someone moves, because I put them into the update message. The name is appears at the moving player, but disappears from the others. It stays at the same place above the last moved.

Someone has any idea for this?
B
4
Posts: 7
Reputation: 390

PreviousNext

Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 9 guests