Message send from a loop fails

0 favourites
  • 3 posts
From the Asset Store
SynthWave Loop Pack includes 68 seamless loops, founded on 11 original melodies. For use in game and custom works.
  • [attachment=0:115jee4o][/attachment:115jee4o]

    Hello, I've posted in the 'how do I' forum, but I suspect that this may be the more appropriate place. The loop in the image does what it should and creates 4 arrays, each 7 long. I tested this by putting a textbox on the layout that prints out randomizer.At(Mine) and cardArray.asjson. This is meant to copy the X dimension from a 2D array and send it via multplayer.

    But only the last of the four outputs from the loop is ever actually sent. I have two questions please:

    Most important, why would the sending fail? Could it be that the loop is too quick to send 4 messages?

    And how else can I do this? Is there any better way to access parts of a 2D array and send without saving each part in a temporary 1D (thats all cardarray is for) array?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Based on your description it sounds like the Multiplayer plugin can only execute 1 tag per tick (make sense as i don't think it stacks information). So the last message you put in the "yourDeal" tag is what gets sent as everything else is just overwriten by it.

    So you could either spread it out to 4 different tags IE "yourDeal1" ,"yourDeal2" etc... or try doing an Every Tick if some var less than 4 increment var and set the array and send that message... You will use 4 ticks, 1 to send each message.

  • thanks for that. First, none of the above worked, second I could mention that this same loop worked fine before I did 'something' couple days ago. Sadly I have no idea what something is.

    The loop is within a function, which is also within a group. The function is called by a chain of three functions, on start of layout. Any difference?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)