korbaach's Forum Posts

  • or something like that?

  • you have error in example for multiple realms..you end with

    ]}[/code:2gfer4bq]
    should be
    [code:2gfer4bq]]}]}[/code:2gfer4bq]
    [code:2gfer4bq]{
      "realms": [
        {
          "type": "pvp",
          "population": "high",
          "queue": false,
          "wintergrasp": {
            "area": 1,
            "controlling-faction": 0,
            "status": 0,
            "next": 1462710732001
          },
          "tol-barad": {
            "area": 21,
            "controlling-faction": 0,
            "status": 0,
            "next": 1462712427270
          },
          "status": true,
          "name": "Aegwynn",
          "slug": "aegwynn",
          "battlegroup": "Misery",
          "locale": "de_DE",
          "timezone": "Europe/Paris",
          "connected_realms": [
            "aegwynn"
          ]
        },
        {
          "type": "pve",
          "population": "medium",
          "queue": false,
          "wintergrasp": {
            "area": 1,
            "controlling-faction": 1,
            "status": 0,
            "next": 1462710724874
          },
          "tol-barad": {
            "area": 21,
            "controlling-faction": 1,
            "status": 1,
            "next": 1462710703055
          },
          "status": true,
          "name": "Aerie Peak",
          "slug": "aerie-peak",
          "battlegroup": "Reckoning / Abrechnung",
          "locale": "en_GB",
          "timezone": "Europe/Paris",
          "connected_realms": [
            "bronzebeard",
            "aerie-peak"
          ]
        },
        {
          "type": "pvp",
          "population": "medium",
          "queue": false,
          "wintergrasp": {
            "area": 1,
            "controlling-faction": 0,
            "status": 0,
            "next": 1462710910703
          },
          "tol-barad": {
            "area": 21,
            "controlling-faction": 0,
            "status": 1,
            "next": 1462710887883
          },
          "status": true,
          "name": "Agamaggan",
          "slug": "agamaggan",
          "battlegroup": "Reckoning / Abrechnung",
          "locale": "en_GB",
          "timezone": "Europe/Paris",
          "connected_realms": [
            "agamaggan",
            "crushridge",
            "bloodscalp",
            "twilights-hammer",
            "hakkar",
            "emeriss"
          ]
        }
      ]
    }[/code:2gfer4bq]
    
    [url=https://app.box.com/s/ggx78mla8yrbai2jaxwf12j0887kksf0]realmsJSON.capx[/url]
    
    [b]Edit:[/b]
    
    [i]also..[/i]perhaps would be better to write json for multiple realms
    like this:
    [code:2gfer4bq]{
      "realm1": [
        {
          "type": "pvp",
          "population": "high",
          "queue": false,
          "wintergrasp": {
            "area": 1,
            "controlling-faction": 0,
            "status": 0,
            "next": 1462710732001
          },
          "tol-barad": {
            "area": 21,
            "controlling-faction": 0,
            "status": 0,
            "next": 1462712427270
          },
          "status": true,
          "name": "Aegwynn",
          "slug": "aegwynn",
          "battlegroup": "Misery",
          "locale": "de_DE",
          "timezone": "Europe/Paris",
          "connected_realms": [
            "aegwynn"
          ]
        }
      ],
      "realm2": [
        {
          "type": "pve",
          "population": "medium",
          "queue": false,
          "wintergrasp": {
            "area": 1,
            "controlling-faction": 1,
            "status": 0,
            "next": 1462710724874
          },
          "tol-barad": {
            "area": 21,
            "controlling-faction": 1,
            "status": 1,
            "next": 1462710703055
          },
          "status": true,
          "name": "Aerie Peak",
          "slug": "aerie-peak",
          "battlegroup": "Reckoning / Abrechnung",
          "locale": "en_GB",
          "timezone": "Europe/Paris",
          "connected_realms": [
            "bronzebeard",
            "aerie-peak"
          ]
        }
      ],
      "realm3": [
        {
          "type": "pvp",
          "population": "medium",
          "queue": false,
          "wintergrasp": {
            "area": 1,
            "controlling-faction": 0,
            "status": 0,
            "next": 1462710910703
          },
          "tol-barad": {
            "area": 21,
            "controlling-faction": 0,
            "status": 1,
            "next": 1462710887883
          },
          "status": true,
          "name": "Agamaggan",
          "slug": "agamaggan",
          "battlegroup": "Reckoning / Abrechnung",
          "locale": "en_GB",
          "timezone": "Europe/Paris",
          "connected_realms": [
            "agamaggan",
            "crushridge",
            "bloodscalp",
            "twilights-hammer",
            "hakkar",
            "emeriss"
          ]
        }
      ]
    }[/code:2gfer4bq]
    
    [url=https://app.box.com/s/a2veqt4yje338sc9ojoyxh4y2e8af1yu]realms2JSON.capx[/url]
  • you probably need to reduce size of HexTx....

    ..but do not ask me why..

  • AJAX object

    [quote:3e1m3vwv]How to make a request

    The basic usage of the AJAX object consists of:

    Use the Request action to load a URL.

    A moment later after the request completes, On completed triggers.

    The LastData expression can be used to access the content of the response.

    The tokenat system expression may be useful to split simple responses. Alternatively, you could load LastData in to the XML plugin to read it as an XML document.

  • I have a player with the physics behavior and i have a platform with the solid behavior

    Physics behavior

    .. Physics won't respond to objects with the Solid or Jumpthru behaviors. These behaviors are totally redundant when using Physics and have no effect. Instead, use the Immovable property...

    so..you nedd to add Physics behavior to platform also...and set to Immovable...

  • really nice find

    I'm totally overlooked this very useful rexrainbow plugin...rex_XMLWriter

    array

    "{""c2array"":true,""size"":[5,2,1],""data"":[[[""width""],[150]],[[""height""],[200]],[[""zi""],[3]],[[""dx""],[400]],[[""e""],[""true""]]]}"[/code:1cwliotr]
    to:
    [img="http://lookpic.com/O/i2/618/lOIPwhJu.png"]
    
    [url=https://app.box.com/s/3nmv5sg88or3q64wwrat61thq2bc0c7e]arrayXMLWriter.capx[/url]
  • Don't be...

    I do not know the meaning of all tags..and it is not very complicated

    [quote:3s3q6sxs]{"c2":true,"w":{"x":7093.726399997016,"y":204,"w":151,"h":151,"l":8722530541249526,"zi":0,"hX":0.503311276435852,"hY":0.503311276435852},

    "behs":{"8274350867031877":{"acc":0,"g":0,"dx":400,"dy":0,"lx":7087.059999998659,"ly":204,"lka":0,"t":6879.726399997016,"e":true},"4769858671535691":{"r":10000,"c":6.283185307179586,"t":[]}},

    "data":{"a":5940657200540929,"f":0,"cas":5,"fs":0,"ar":0,"at":0,"rt":0}}

    "x"=X

    "y"=Y

    "w"=Width

    "h"=Height

    "l"=?

    "zi"= Z Index

    "hX"=OriginX

    "hY"=OriginX

    .....

    "behs"=Behavior

    "acc"=Acceleration

    "g"=Gravity

    "dx"=SpeedX

    "dy"=SpeedY

    ........

    "data"(Animation)

    "f"=Frame

    "cas"Animation speed

    "rt"=Reapet to

  • Lets say i have the following JSON string of a simple object.

    this is the Sprite with bullet behavior?

  • If you use more than 9, then you can't write variable like this

    sequence =0348

    because it is now impossible to determine your squares IID

    0348=

    0-3-4-8

    0-34-8

    0-3-48

    so,, you need to use separator between numbers..and if you use separator ,

    you need to use tokenat

    [quote:1qyrncz8]tokenat(src, index, separator)

    Return the Nth token from src, splitting the string by separator. For example, tokenat("apples|oranges|bananas", 1, "|") returns oranges.

    tokencount(src, separator)

    Count how many tokens occur in src using separator. For example, tokencount("apples|oranges|bananas", "|") returns 3.

    I think it is much better&easier to do with arrays..but for now..

    sequence_tokenat.capx

    Edit:

    sequence_Arrays.capx

  • Try Construct 3

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

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

    Browser actions

    Vibrate

    Vibrate the device with a given pattern, if the device/platform supports vibration. The pattern is given as a comma-separated list of times in milliseconds, alternating between vibrate time and waiting. For example the string "200,100,200" specifies a 200ms vibration, 100ms pause, then another 200ms vibration. This allows a single action to specify a whole vibrate pattern.