Magistross's Recent Forum Activity

  • Here's what I meant by "dummy" family.

    https://www.dropbox.com/s/ojuggbnp8zeh5 ... .capx?dl=0

    It's far from perfect but it's something to build upon. <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need a "dummy" family, with only your chainlink sprite. In a single event, you would now be able to select two distincts instances of the same object. One through the family, one through the object directly.

  • It's not possible... unless you use a family. You could then create the joint on an instance of the link to another instance of the family.

  • If you want to force the debug text to be more readable, I guess you could always do something like rounding the value to 5 or 6 decimals (or whatever number you deem significant).

    example for 5 decimals :

    Smaller values will then always be equal to 0.

  • That's the problem with floating point arithmetic. There's nothing you can do about it, you just have to deal with it. However, a number like -1.8369701987210297e-16 is so small that you won't ever notice anything visually... so you might as well consider it to be 0.

  • You are probably trying to use an "else" statement on a trigger. This won't work.

    See the difference here :

  • I made a static XML to try, and it worked fine, but as I wrote I need a dynamic way to get data from MySQL.

    Nothing stops you from building a dynamic XML file from your PHP script. A DOMDocument should work wonders for this.

    See the docs here : http://it.php.net/manual/en/book.dom.php

    Once the document is finished, you can output it as an XML string using DOMDocument::saveXML.

  • Too bad your forum reputation isn't high enough, I couldn't see any image you posted.

    Your JSON represent an array of objects, which Construct can't interpret. You will have to modify your PHP so it returns something that looks like this :

    {"c2array":true,"size":[10,1,1],"data":[[[0]],[[0]],[[0]],[[0]],[[0]],[[0]],[[0]],[[0]],[[0]],[[0]]]}[/code:dcdlqzs8]
    This is the result of a "AsJson" from an empty array.
    
    edit: If it can be of help, this is how your example data should look like :
    [code:dcdlqzs8]{"c2array":true,"size":[10,3,1],"data":[
    [[1],["Jeffrey"],[5]],
    [[2],["Lisa"],[72]],
    [[3],["Pamela"],[31]],
    [[4],["Anna"],[67]],
    [[5],["Antonio"],[28]],
    [[6],["Judith"],[45]],
    [[7],["Billy"],[88]],
    [[8],["Amy"],[76]],
    [[9],["Theresa"],[69]],
    [[10],["Kathryn"],[25]]
    ]}[/code:dcdlqzs8]
  • As per the manual, there is a "Set request header" action that should accomplish what you need. Simply call this before any AJAX post that needs this particular header.

  • I believe he wanted a constant linear speed. Here's my take on it, using your formula.

    https://www.dropbox.com/s/59lavr8k6xsb2 ... .capx?dl=0

  • I'd create a single PHP script that fetch text files and output them. So you don't have to create a new PHP file with "header('Access-Control-Allow-Origin: *');" everytime.

    Also, if the application is hosted on the same server, none of this is necessary.

  • The loop isn't infinite, the game itself is an infinite loop. However, the nature of the event makes the loop grow exponentially (2^tickselapsed). So after a second at 60 fps you would theoratically have 1 152 921 504 606 846 975 new sprites if you begin with one. The system obviously can't cope with this and everything slow down to a crawl and hangs forever after a few ticks.

Magistross's avatar

Magistross

Member since 4 Jul, 2011

Twitter
Magistross has 14 followers

Trophy Case

  • 13-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies