locohost's Forum Posts

  • There is a "max speed = 400" set out of the box on this behavior. I just saw this the other day. That was the problem :-/

  • Say I have a Family Fruit with 3 similar fruit objects Apple, Orange, Pear. I use System.CreateObject(Apple) to create an Apple instance, will Fruit immediately pick that Apple instance so I can use subsequent code like Fruit.X = 100, Fruit.Y = 100, etc... ?

    Right now I'm storing the UID right after the CreateObject and then doing Fruit.PickByUID after a set of conditionals. I'm hoping to clean up this code some if the subsequent Pick is unnecessary.

    Thanks for your advice

  • I'm using rexrainbow moveTo behavior to move sprite to a point across the screen. I tried adjusting "current speed" and "acceleration" and I just can't get it to move fast. What are the behavior settings I need to move at maximum speed?

  • Voulk Thank you! But the image link isn't working. I can't see the code.

    Nevermind, the image loaded. I'll try that. Thanks!

  • I'm finding articles and posts that seem to be saying I can set the maximum number of players that can be in one room and the signalling server will auto-reject them with a message. Some how I'm supposed to set "RoomSize" or "MaxPeers", yet I see nothing in the Multiplayer object allowing these settings.

    What am I missing?

    Thanks for your help

  • Thanks lennaert

    Yeah I do understand the difference in the modes. The problem I'm seeing is C2 provides no simple way for the host to re-broadcast messages to the peers at same speed. I'm using both speeds. Unreliable for sprite positional messages because it's fine if some get dropped here and there. But I'm using Reliable for sharing state information and instance var values. I've hacked around the issue by looking at the Multiplayer.Tag value and then determining what mode to use for re-broadcasting. Not awesome coding :-/

  • I'm setting up some multiplayer code and I think I'm doing Ok, but I'm hung up on one bit...

    For example: I'm sending all sprite X/Y change messages as mode "Unreliable", but I'm sending updates to sprite instance variables as mode "Reliable". How can the host re-broadcast at same mode/speed?

  • What does this mean?

    Peers should use their client input values as their sole way of influencing the game.

  • Oh Ok, there is the "pin" behavior. I'll try this. Hopefully the sprites will stay together smoothly with this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a sprite that is draggable. There are a few smaller sprites positioned on/around this sprite that need to stay in there correct spot when the parent is dragged. I have this working fine, but there is one big problem. The smaller sprites lag pretty far behind the parent when it's dragging. It looks bad. Is there a correct way to do this so they will move at the same speed as the parent?

    Thank you very much for any advice

  • Wish I would have found (or thought of looking for) this sooner...

    http://www.xmlvalidation.com/

  • korbaach Yeah I have it working now too. The issue was the </cards thing you found, plus I had a set of double-double quotes in the Xml start node. Fixed those two issues and it worked.

    korbaach

    LittleStain

    Thanks a lot guys for getting me through this. Xml is a pain the ass :-/

  • LittleStain Yeah, with korbaach helping I finally saw the </cards error. I thought for sure that was the problem. I made the fix and it still doesn't parse. Yes the Function.Param(0) definitely does have the Xml string. I can see it a variable in debug. And the Xml has the </cards> fix. I can't see why it won't parse. I may have to switch back to JSON. I can parse that for sure.

  • korbaach I was psyched for a few minutes, I thought you found the glitch. Sadly, no.

    I see nothing wrong with this simple code. This is killing me.

  • I'm including both my actual Xml data and the code. The Messages2 text object never fills so the Xml is not parsing. The function is really getting the right Xml string so I'm not sure what I'm doing wrong.

    <?xml version="1.0" encoding="utf-8"?>
    <game>
        <info>
            <name>Standard 52 Cards Game</name>
            <cardsize>
                <small width="73" height="98"></small>
                <large width="252" height="358"></large>
            </cardsize>
        </info>
        <cards>
            <card frame="0" name="Ace of Clubs" color="black" type="Clubs">Text</card>
            <card frame="1" name="Two of Clubs" color="black" type="Clubs">Text</card>
            <card frame="2" name="Three of Clubs" color="black" type="Clubs">Text</card>
            <card frame="3" name="Four of Clubs" color="black" type="Clubs">Text</card>
            <card frame="4" name="Five of Clubs" color="black" type="Clubs">Text</card>
            <card frame="5" name="Six of Clubs" color="black" type="Clubs">Text</card>
            <card frame="6" name="Seven of Clubs" color="black" type="Clubs">Text</card>
            <card frame="7" name="Eight of Clubs" color="black" type="Clubs">Text</card>
            <card frame="8" name="Nine of Clubs" color="black" type="Clubs">Text</card>
            <card frame="9" name="Ten of Clubs" color="black" type="Clubs">Text</card>
            <card frame="10" name="Jack of Clubs" color="black" type="Clubs">Text</card>
            <card frame="11" name="Queen of Clubs" color="black" type="Clubs">Text</card>
            <card frame="12" name="King of Clubs" color="black" type="Clubs">Text</card>
            <card frame="13" name="Ace of Spades" color="black" type="Spades">Text</card>
            <card frame="14" name="Two of Spades" color="black" type="Spades">Text</card>
            <card frame="15" name="Three of Spades" color="black" type="Spades">Text</card>
            <card frame="16" name="Four of Spades" color="black" type="Spades">Text</card>
            <card frame="17" name="Five of Spades" color="black" type="Spades">Text</card>
            <card frame="18" name="Six of Spades" color="black" type="Spades">Text</card>
            <card frame="19" name="Seven of Spades" color="black" type="Spades">Text</card>
            <card frame="20" name="Eight of Spades" color="black" type="Spades">Text</card>
            <card frame="21" name="Nine of Spades" color="black" type="Spades">Text</card>
            <card frame="22" name="Ten of Spades" color="black" type="Spades">Text</card>
            <card frame="23" name="Jack of Spades" color="black" type="Spades">Text</card>
            <card frame="24" name="Queen of Spades" color="black" type="Spades">Text</card>
            <card frame="25" name="King of Spades" color="black" type="Spades">Text</card>
            <card frame="26" name="Ace of Hearts" color="red" type="Hearts">Text</card>
            <card frame="27" name="Two of Hearts" color="red" type="Hearts">Text</card>
            <card frame="28" name="Three of Hearts" color="red" type="Hearts">Text</card>
            <card frame="29" name="Four of Hearts" color="red" type="Hearts">Text</card>
            <card frame="30" name="Five of Hearts" color="red" type="Hearts">Text</card>
            <card frame="31" name="Six of Hearts" color="red" type="Hearts">Text</card>
            <card frame="32" name="Seven of Hearts" color="red" type="Hearts">Text</card>
            <card frame="33" name="Eight of Hearts" color="red" type="Hearts">Text</card>
            <card frame="34" name="Nine of Hearts" color="red" type="Hearts">Text</card>
            <card frame="35" name="Ten of Hearts" color="red" type="Hearts">Text</card>
            <card frame="36" name="Jack of Hearts" color="red" type="Hearts">Text</card>
            <card frame="37" name="Queen of Hearts" color="red" type="Hearts">Text</card>
            <card frame="38" name="King of Hearts" color="red" type="Hearts">Text</card>
            <card frame="26" name="Ace of Diamonds" color="red" type="Diamonds">Text</card>
            <card frame="27" name="Two of Diamonds" color="red" type="Diamonds">Text</card>
            <card frame="28" name="Three of Diamonds" color="red" type="Diamonds">Text</card>
            <card frame="29" name="Four of Diamonds" color="red" type="Diamonds">Text</card>
            <card frame="30" name="Five of Diamonds" color="red" type="Diamonds">Text</card>
            <card frame="31" name="Six of Diamonds" color="red" type="Diamonds">Text</card>
            <card frame="32" name="Seven of Diamonds" color="red" type="Diamonds">Text</card>
            <card frame="33" name="Eight of Diamonds" color="red" type="Diamonds">Text</card>
            <card frame="34" name="Nine of Diamonds" color="red" type="Diamonds">Text</card>
            <card frame="35" name="Ten of Diamonds" color="red" type="Diamonds">Text</card>
            <card frame="36" name="Jack of Diamonds" color="red" type="Diamonds">Text</card>
            <card frame="37" name="Queen of Diamonds" color="red" type="Diamonds">Text</card>
            <card frame="38" name="King of Diamonds" color="red" type="Diamonds">Text</card>
        </cards
    </game>
    [/code:3jtmnrzt]
    
    [img="http://i.imgur.com/Hd7drLc.png"]