rexrainbow's Forum Posts

  • mars1985

    I'm lacked for using C2 editor to create content, sorry. I'm just interested in making plugin for my team members.

  • Pin with unlocked angle is easy to extend from original pin behavior. If Ashely is busy, I would glad to contribute one.

    You may try this if you don't want to wait.

  • Update:

    Update platformMP following r74.

  • mars1985

    For "Condition:Am I room moderator?", you can use it to send a "start" message (or other control message), since there is only one "room moderator" in the clients.

    "Action: Set max member count" can be put in any client, but only the "room moderator" can really change the max member count. You can add "set max member count to 1" then try to create 2nd client, you can see some messages both in server and client.

  • talkinghead

    I thought only minify had problem, even if I change the name to match the minify rule.

    "External include" should work, but it may be inconvenience for normal user. Any way, it's another way to integrate socket-io client, thanks.

  • mars1985

    You need to set a user name in "action:Connect", See the snapshot, in the first red square. The user name is "Guest".

    <img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/screen1-14.png" border="0" />

  • Arima

    If you copy the JSON string directly, you may get the problem about using single ". You need to replace single " to double "". The rule comes from C2 editor.

    This problem is similar with this.

  • smitchell

    Can you show an example JSON string and indicate what key you need?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • guicole

    Any string can be read through AJAX.

    To avoid double "", I am using AJAX, too. If you need to load more then one csv table, try BatchAJAX plugin.

  • Hash table plugin, plugin and sampe capx files are included.

    Hash table behavior, behavior.

  • I've just coded my own socket.io plugin and am currently working on a client/server multiplayer implementation.

    Could you share how to fix the socket.io-client to pass the minify of C2?

  • newt

    You may try this [Behavior"> Shell (get inst's expression from uid)

    Sorry, it can only get the expression of instance, not the instance's behavior expression.

    I thought the expression processing of C2 engine can only return "number" or "string".

    sprite(uid).bullet.speed

    first need to return a instance from

    sprite(uid)
  • Shell

    Shell behavior is still under development. One of the feature is to get the instance's expression(x,y,width,height,angle...etc), from uid.

    Currently, it provides to get these expressions

    • x
    • y
    • width
    • height
    • angle
    • opacity
    • visible

    Example of getting instance's expression from uid

    <img src="http://i1081.photobucket.com/albums/j352/rexrainbow1/screen1-16.png" border="0">

    In example, there are two kinds of sprite -"SpriteA" and "SpriteB". In line2, the global variable "uid" saves the uid of clicked instance of "SpriteB".

    Then in expression of "action:append text", it use "SpriteA.shell.X(uid)" -- The SpriteA's shell behavior can get the position x by uid, even the uid is not point to SpriteA.

    BTW, expression of shell behavior like "shell.X" actually accepts two parameters. First is uid, second is a default value if the uid doesn't point to any instance.

  • newt

    I'm thinking about a plugin which get all the creating instance, then save the uid - instance reference. So that I can use expression: picker.GetX(uid) to get the x position of instance.

    Because that engine can add a destroy callback in plugin, plugin can remove the instance reference to prevent memory leakage.

    But,... engine has no way to add a create callback. So maybe a behavior is better then a plugin. Behavior can have onCreate and onDestroy.

  • Update:

    Room moderator is the client who enter the chat room earliest in the chat room.

    Room moderator can set the maximum member count of the chat room. 0 is infinity.

    "Condition:Am I room moderator?" can let current client know if it is the room moderator.