How do I...(multiplayer) create multiple copies?

Get help using Construct 2

Post » Wed Aug 26, 2015 6:43 pm

Normally...
Have 4 instances of one sprite using for each and instance variables to dictate each location, no biggy...just normal stuff.

But want to spawn them over multiplayer.
*on peer connect create(for each)...[this appears not to work, but I might just have no clue]
have the 4 instances of one sprite appear on layer abc located via each sprites instance variable cx,cy (dictated through sync).

I may need to just create 3 clones and create, sync, and locate them individually??, but I thought I'd ask before doing that.

Danke in advance!
B
11
S
2
Posts: 38
Reputation: 661

Post » Wed Aug 26, 2015 6:44 pm

I'm just curious if it's a me issue, if it is I'll just keep studying.
B
11
S
2
Posts: 38
Reputation: 661

Post » Tue Sep 01, 2015 3:17 pm

After fiddling for a week, I still can't get the "for each" to work on multiplayer (info relays) so I just made separate sprites and did it long hand, works fine. Someone figures that out share the wealth ;)
B
11
S
2
Posts: 38
Reputation: 661

Post » Tue Sep 01, 2015 4:12 pm

It sounds like you want to determine position on the peer side on an object synchronized from the Host. that will not work.

The host needs to adjust the locations/spawn synched objects on locations, and they will appear so on the peer side on the location determined by the host. The peer can send commands to the host where he needs to move/create them though.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Tue Sep 01, 2015 5:50 pm

The weaknesses of having a user be the host and not a dedicated server :(
B
56
S
15
G
13
Posts: 826
Reputation: 17,705

Post » Tue Sep 01, 2015 7:40 pm

Tekniko wrote:The weaknesses of having a user be the host and not a dedicated server :(



It is in the approach of the multiplayer plugin.
It is based on a scenario where the host is one of the players.
Eliminating the need of a server.

This has has the obvious upside.

The downside is that it is not the approach most gamers would expect, and those generally start out applying methods based on an incorrect idea of the expected game mechanic.

One really needs to envision the steps of: (simplistic)


Host wants to move
The host simply moves his object and its movement is synched in a broadcasting like method, telling all the peers where the host object needs to go.

Peers wants to move
In most synched scenarios, the peer needs to tell the host where it wants to move, the host then move the object on the host game, and it broadcasts it to all the peers, including the peer wanting to move.

Peer forced moving:
When the peer wants to optimize the positioning of its object; while sending the movement to the host, the peer can also move its synched object in the direction it has told the host it wanted to move. This forces it in a direction, closer to the next synched position the peer will receive for its own movement, potentially increasing more smoothness on the moving.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Fri Oct 02, 2015 3:57 pm

Turns out this I'd doable....but the "associate with" jacks it up an for some reason restricts copies to 2. A msg substited works fine for condition and presto one object synced as copies. I was trying to not have multiple copies of a single troop type, its clunky but works. Since each two player battle is in a separate room I eliminated the message from host as a trigger and just left it blank...helped the speed and who cares if the peer can't see the host ID...its 2 player. Any who just thought I would update...
B
11
S
2
Posts: 38
Reputation: 661


Return to How do I....?

Who is online

Users browsing this forum: acousticputty and 23 guests