blackhorse09's Forum Posts

  • It works for host. Everything I've tried has worked fine for host, but it's something with the peer. On the debugger scorekeeper's kills raises for host, but on peer it looks there's 2 scorekeepers. When I click on the scorekeeper option it shows

    #0

    #1

    On host it only shows #0 which gets updated. #1 is getting updated on peer, but not #0.

  • remove the tags for marinekills and monsterkills on the synch variable action and remove setting their input state on the peers action.

    If the host sets the variables, they should get synched.

    Still not working for me, do I need to add something here?

  • Scorekeeper has the instance variables to sync up to the peers global variables. When someone is killed the host adds it to the player kills and the scorekeeper. However in-game it doesn't update the global variables.

  • Good deal, I was wondering if you could post how you create and destroy objects for peers?

    That's last on my list for my game so I'm not there yet. I'm trying to work around it as much as I can but I imagine for something like pressing a button to open a door (destroy a door) I would try

    Under Host event sheet

    For each peer

    multiplayer.id = peerid:

    peer.x, peer.y = buttonsprite.x, buttonsprite.y THEN set (buttonsprite isntance variable) "pressed" to one.

    Under common

    Buttonsprite "pressed" = 1 THEN destroy door

    We'd have to sync the variable just like the peers have synced variables though. I'm still getting the hang of it.

    Also I found this by Ashley which is probably more helpful:

    Use 'Sync object' to sync the (objects you want destroyed), and then destroy them on the host. When synced objects are destroyed on the host, the syncing automatically destroys them on all of the peers as well. So you don't even need to send any special messages or have any special flags.

  • Hi,

    Can you tell more about your problem ?

    What kind of TestHit is it ? CollisionHit or HitScreen ?

    Collisional, I think. It's when the firing player is overlapping another from a different team and the appropriate button has been pressed by the firing team.

  • I want the firing peer to play an animation if the TestHit works. I thought about adding:

    peerid= lasthitpeerid play animation

    but I can't find any place it would work

  • This is how scroll to works for each peer in my game

    Thank you, seems to be working so far. Testing my game with a lot of people today so I'm trying to get out all of the major issues I haven't been able to fix on my own.

  • All I have is every tick - system scroll to peer

    it worked fine when testing, and the very first time it went live. Now the peers can only see the host but can still move/shoot. Is there more code that needs to be done to make sure it stays on host?

  • I have 8 players set up into two teams

    Both teams have different animations

    As of right now the host can see his/her own animation, but the peers just see the default image.

    How can I have the peers see the animations?

    example code:

    For each peer &

    team = 1

    (subevent) getbit(Peer.inputs, 5, 1) = 1 then set animation to "running" from beginning

  • Have an instance variable for team and when players attack eachother make sure their teams are different

    Thanks, it took me awhile but I got it thanks to your advice.

    In case anyone else stumbles across this and is curious. I pretty much just set up a local variable called FiringPeerSide similar to FiringPeerID from the Multiplayer example. This was my third parameter for the Function TestHit. As tarik suggested I included an instance variable called 'side'. I also had two global variables Team1 = 0, and Team2 = 1. The host would always be on Team2 and every time a peer connected:

    Team1 <= Team2 : Peer - set side to 2. add 1 to Team 1

    Else : Peer set side to 1. Add 1 to Team 2

    Note: these two events are subevents in the Host group under the 'Multiplayer-On Peer Connected' event from the Multiplayer example.

    I think that was it and so far it's gotten me passed the initial issues I was having.

  • Creating a multiplayer game and I want there to be two teams, each side has different weapons/health. What is the best way to let players pick a team?

    I'm considering letting there be an option to pick a side as they type in their user on a menu screen. So would I assign the peer a variable based on the side they choose and have the host place them in the correct spawn based on the variable?

  • I started with copying and pasting the "Multiplayer Real Time example" lines to my new project as I learned each part. I'm having an issue with "Log" text now. Whenever the game starts up I get 10 lines of one '0' before the initial start up text. It happens when I run the game from either game events or the menu layout. I've put my event sheet beside the mutliplayer example and I can't find a single difference. Is it possible it's a browser/cache problem?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Quick answer:

    Liked - You could form your own unique team of cool monsters

    Disliked - Impossible to lose mentality/replayability limited on one run

  • I just ended up uploading it to googledrive instead of scirra but thanks anyways!

  • Right click and choose 'open with Google Drive previewer' on the index.html file

    Click the preview button on the toolbar

    Once it opens, grab the URL from the browser

    you're a genius, don't let anyone tell you otherwise. Thanks!