deathangel1479's Forum Posts

  • What is best for speed and size of game?

    1. Many instances of as little objects as possible.

    2. Many objects to as little instances as possible.

    And why you think so?

    I normaly try to do 1.

    Because I have seen that every tileMap for example saves its picture to output, even they have the same...

    I think thats for most other objects, too.

    Since I had seen this, I only create needest objects.

    Can for example look like this:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ahhh "instanceof".

    Time to learn JavaScript!

    Thank you very much!

  • You can do much, but you will quickly reach limits.

    If you want to create a big unique game, I think you don't come around javascript.

  • Me, too.

    And clickable text, like a link but not to url...

    Want a chat like most games have.

    Hope someone can help.

    Or I need to write a plugin, but i dont want.

  • How can I check in behavior code the instance plugin?

    I know the instance has the plugin object in it (inst.type.plugin), but how to compare? Is there a possiblity in JavaScript to do it directly? Object name to sting?

    Plugins dont have a for all exist name string or something else in, or did I miss something?

    In Editor it has:

  • I asked for this in first post.

  • Do you mean something like this?

    I have problems to understand your text, but that's because of my poor english.

    Video

    Sorry, video is recorded with smartphone and lying on side...

  • Functions?

    There is almost never any reason to repeat the same code over and over again..

    If a lot of the actions are basically the same you could probably call a function, maybe even one repeated 6 times for each slot..

    You say it!

    for each is the key!

  • Is the "Do This" various or everywhere the same?

    If its various you cant shrink.

    If its same you can do it with a few rows.

  • Must have to do with 8D.Vector.

    For me with 8D direct it works.

    Hmm...

    May be you need to aduste speed, too.

    You have low values in 8D.Vector, true? 8D.Vector is pixels per second.

    Play a bit around with...

    If you have the result pls post, will need it later, too.

  • https://www.scirra.com/manual/167/timer

    Set speed up, start timer, when timer finnished set speed back to default.

  • I can not confirm, works well for me.

    With this code I have an other problem, its nearly impossible that position is 2!

    I need to do set position to int(random(0,3)), because if not:

    0 - 0,999999 is 0

    1 - 1,9999999 is 1

    2 - 2 is 2

    Or is this intended?

    ------------------------------------------------------------------------------------------------

    You have already added some to layout in editor?

    Seems to be the only possibility...

    Or thats not all code.

  • Yes, billboard->returned is a string and task->returned is an array. (look at details, there are no quotes)

    Construct cant handle Arrays/Objects like this, so it shows 0. (null)

    AJAX_RESULTS.Get("id") dont exist. There is only index 0 and 1 in this array. (not a dictionary!)

    I dont know the default way to get for example the id value of for example index 0 from returned of AJAX.LastData, in this I cant help you.

    I personally would make it like this, with my plugin:

  • I already noticed, but never caused problems.

    If you import files to project, they get to lower.

    If you access for example from a plugin directly by string filename, you have a problem.

    But you can set the string in plugin toLower...

    Or use file picker.

    Or use lower case filenames.

    I guess it has a sense, that they are lower case.

  • Multible values by json:

    Multi row:

    $arr = array();
    while($row = mysqli_fetch_array($result,MYSQLI_ASSOC))
    {
            arr[] = $row;
    }
    echo json_encode($arr);
    [/code:hfj250k1]
    AJAX.LastData -> [{"name":"Bob","secondName":"Meyer","isMember":1},{"name":"Dieter","secondName":"Miller","isMember":1}]
    [img="https://dl.dropboxusercontent.com/u/95601836/multiphp2json.png"]
    
    Single row(first result):
    [code:hfj250k1]
    $arr = array();
    while($row = mysqli_fetch_array($result,MYSQLI_ASSOC))
    {
            arr[] = $row;
    }
    echo json_encode($row[0]);
    [/code:hfj250k1]
    AJAX.LastData -> {"name":"Bob","secondName":"Meyer","isMember":1}
    [img="https://dl.dropboxusercontent.com/u/95601836/singlephp2json.png"]
    
    Then use a json plugin to work with this strings. For example: [url=https://www.scirra.com/forum/plugin-tools-object-array-in-construct-based-on-json_t147493]Tools[/url]
    Some examples:
    [img="https://dl.dropboxusercontent.com/u/95601836/getLastData.png"]
    
    Sorry for spam, but my server is down and i am boring...