How do I create a shotgun in multiplayer

Get help using Construct 2

Post » Mon Jul 13, 2015 3:15 pm

Hi there (and always I'm sorry for my english)

I'm trying to create a shotgun in a multiplayer game.
here the events:
Image

Okay. This works really fine in single player, but in multiplayer, if two (or more) peer got the same variable (weapon=2), the shotgun shot for each player, and not for the controlled peer only.
I know the bug: is selected by the red square in the image above.. but I don't know how to resolve it.

I can't understand how to fix it for controlled player only, and at the same time to show bullets for the others peers.

I hope I explained well my problem :) Thanks for any help!
B
17
S
5
G
3
Posts: 76
Reputation: 2,948

Post » Wed Jul 15, 2015 6:22 am

Have you tried setting another condition?

Maybe find a way to figure out the player's IID, and use that?

Maybe give the shotguns a variable equal to an instance variable a specific player has so that only that one shotgun will fire.

I have not tried multiplayer so I'm not sure if that would help, but it seems that you just need to have the system hone in on what shotgun you want being fired.

Hope I helped or gave you some ideas.
B
6
S
2
Posts: 60
Reputation: 1,242

Post » Sun Jul 19, 2015 6:19 am

This is how my shotgun is laid out. It works for me.

Setting the active gun bit to 1,1 activates the shotgun and deactivates the pistol. While the normal gun bit controls all the firing

Image

Image

Image
B
15
S
2
Posts: 69
Reputation: 1,270

Post » Sun Jul 19, 2015 12:52 pm

My own shotgun now works well. I removed the latest events, and replaced create with spawn.

After each spawn i put a random angle and it seems really nice!

Now my last problem is with caricatore that you can see in the image. I've assigned 7 bullet to my shotgun, and works, but the last shot is not sync whit others players. I will solve this today, I hope.
B
17
S
5
G
3
Posts: 76
Reputation: 2,948


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests