bentwonk's Forum Posts

  • I can get "ajax post to url" to send data in the query string format, eg "foo=1&bar=2", but simple tests using a json string as data {"test":123} fail, is it possible to use json data as a ajax post payload, since have a more complex string in json format I want to send (example below):

    {"Room":"Lobby","Data":[{"t":7.485703,"p":"A","e":"chat","a":"Joined the chat room as host"},{"t":11.571944,"p":"B","e":"chat","a":"joined"},{"t":18.800892,"p":"A","e":"chat","a":"hello"},{"t":25.592219,"p":"B","e":"chat","a":"peer hello"},{"t":30.018804,"p":"A","e":"chat","a":"chat text"},{"t":30.018804,"p":"A","e":"request-page","a":"page"},{"t":30.018804,"p":"A","e":"team-success","a":"team"},{"t":30.018804,"p":"A","e":"review","a":"review"},{"t":30.018804,"p":"A","e":"pass-resource","a":"param A","b":"param B"},{"t":30.018804,"p":"A","e":"select-choice","a":"param A","b":"param B"},{"t":30.018804,"p":"A","e":"move-resource","a":"param A","b":"param B","c":"param C"},{"t":30.018804,"p":"A","e":"enter-value","a":"param A","b":"param B","c":"param C"},{"t":30.018804,"p":"A","e":"solution-found","a":"param A","b":"param B","c":"param C"},{"t":30.018804,"p":"A","e":"rule-confirm","a":"param A","b":"param B","c":"param C"},{"t":30.018804,"p":"A","e":"output-change","a":"param A","b":"param B","c":"param C"},{"t":30.018804,"p":"A","e":"retry"},{"t":30.018804,"p":"A","e":"finish"},{"t":30.018804,"p":"both","e":"start"},{"t":30.018804,"p":"k2","e":"lost"}]}

  • Hi

    I have a textbox attached to a global layer, how do I keep its content, and focus when layouts changes?

    I realize I could store the textbox content in a global variable and re-populate it with each new layout, but I wondered if there was a better way to do this, where the textbox content is preserved, and can be regarded as truly global.

    Attached is a small example of the issue

  • hmmm, global textboxes lose their content and focus, when layouts are changed, is there a way to prevent this?

  • Ohhh, global layer, that sounds ideal, I will try it, thank you.

    I already have the events on their own sheet.

  • I have multiple layouts, which the player progresses though, but I want to keep a chat box common throughout them.

    I have common functions to control the chat, that are included in each layout, but the box itself seems limited in scope to a specific layout, can I make it visible to all ?

  • Apologies, I uploaded the wrong file, doh, but looking at your capx I think I understand the problem, because I was limiting the selection to the item being dragged, it is a SOL list of one, and hence cannot collide.

    Thank you for the enlightenment.

  • How do I detect a collision / overlap between instances of the same object without resorting to families?

    instance on collision with instance, and instance is overlapping instance do not seem to trigger.

    attached capx demonstrates.

    I am against using families, because if I need to put each instance in its own family and test for it, I may as well use separate objects.

  • Thank you so much GenkiGenga, it certainly works,

    I agree I don't quite understand why the problem occurs for some items (3rd and 4th instances of my sprite) and not others, (the paddle sprite). It's interesting that removing the multiplayer association for the paddle in event 11 does not prevent it working in game.

    Thanks again

  • I am encountering this now, when using .wavs

  • I want my game to be multiplayer, but I seem only to be able to sync objects, not instances of objects, attached is a slightly modified pong demo, whats odd is the two sprite instances are transmitted to the client, but the rest are lost.

    What am I missing?

    Hmm, seems kmsravindra 876478 is the same issue,

  • Thank you briggybros

  • is the value popped from a one dimensional array returned?

    currently I am getting the array.Back, and then popping Back to remove it.

  • Hi, I am encountering the same problem as kmsravindra, has a more elegant solution been found than "system wait signal action?"

    Update:

    GenkiGenga was able to fix this in my case, see topic 876478

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes!, blackhornet, thank you.

    Hmm, which leads me to a second problem, I want my game to be multiplayer, but I seem only to be able to sync objects, not instances of objects, attached is a slightly modified pong demo, whats odd is the two sprite instances are transmitted to the client, but the rest are lost.

    Seems kmsravindra 876478 is the same issue

    Lordshiva I don't think I explained my self well enough, but thank you for the swift reply.

  • Hi this is driving me insane..

    I a sprite type object, I used the editor to place five of them on screen, each insists on having a unique name (I assume these are the instances or the object). On game initiation I store the UID of each of these, but I cannot work out how to access them again via the UID.

    I have looked at both the system.pick by comparison, and system.pick nth instance but both require me choose the object, (and then lists the five unique names), if I already knew the object I would not have to pick it, I simply want to pick the object from all game objects that matches the UID.

    I have been unable to find example code of picking by UID, would very much appreciate seeing it.

    What am I missing?

    (when deleting my sprites form the layout, they are referred to as instances, but then each one (instance?) is listed when asked to 'pick an object" in the events sheet, this is confusing me)

    Found the problem, thanks to ROJOhounds example here: because I was right clicking on the layout and selecting insert new object, where as I should have dragged them from the projects panel to create instances under the same name.

    Thank you

    Ben