Delphawi's Recent Forum Activity

  • Hello,

    I am trying to swap 2 objects together (which have lots of instance variables), so I thought "Why not try Set from JSON?".

    I saved the AsJSON state of the first object in a variable, and used Set from JSON of the 2nd object, but the 2nd object disappeared.

    When I checked the stored JSON, it did not contain any data related to my variables.

    Is there a specific way for this action to work?

    Thank you!

    Tagged:

  • Hello,

    I couldn't find a way to find the specific collision point between 2 objects. Found this topic, but I can't reply in it because it is old.

    Here is what I tried, in case it helps anyone:

    You can create your own collision points and check using them.

    - At start of layout:

    -- For each Polygon point on your moving object A:

    --- Create a CollisionPoint object (a simple circle) at the polygon point X,Y

    --- Add the CollisionPoint object as a child to A

    - On CollisionPoint collision with another object:

    -- Do something

    Now you can control the distribution (shape and count) of CollisionPoint objects using the collision polygon.

    Note: there are sprite expressions now to get Polygon Point Count and Position of each.

    Update1:

    I just noticed that Physics has ContactXAt and ContactYAt expressions to get contact points. I might give it a try later.

    Hope this helps!

    Please let me know if there are more efficient ways.

    Thanks.

  • I have never seen this "Loops" section. I tried adding a few loops and recursive function calls in a test project and still don't see it in the debug view.

    Could you post a screenshot?

    Me too. It seems to be triggered by the aforementioned exception.

    I managed to replicate the behavior. It needs a recursive function with a loop. Here is the code and the result:

  • Hello,

    During debugging, one recursive function called itself a bit too much, and a "Uncaught (in promise) InternalError: too much recursion" exception showed in console.

    But the inspector showed something called "Loops" inside the System object. It is like an array with 230 entries, each one contains: "4 / 5".. except the last one: "0 / 5".

    I checked the docs but couldn't find anything.

    It looks like a handy feature, but I can't understand it!

    So, what is "Loops" and what does its content mean?

    Thank you.

  • Is it possible to feature some ideas here on the Construct.net site?

    I think visiting the suggestion platform is a bit "out-of-the-way" for most people (or those like me, at least..). I usually visit Construct.net weekly to check for updates, but visiting aha.io is not a priority for me.

    This matters because ideas now has limited time to get noticed, or they will be archived. Not because an idea is old does that mean it is now obsolete. Maybe there are good things in the pile!

    It would be more easier if there is some sort of "idea leaderboard" here on the site, which shows the ideas on top of the list at the moment, and links to aha.io for voting. This way, more traffic goes to the votes, and you can get more accurate data about what the users want (since more people are "actually" voting)

    I found that Aha.io offers a developer API, maybe you can use it to list the top 20 ideas on a new page here on Construct.net.

    Thank you.

  • You can find some here, here, and more on the Tutorials page.

    Good luck.

  • There'S a webworker example

    Thank you, that's what I was looking for.

    I solved the original issue using another method, but the worker example should come in handy.

    Thank you all for the help :)

  • All behaviors are framerate-independent, Sine including. Unless fps drop below 30, it should produce consistent results.

    It is below 30..

    Can you post your project file, demonstrating the problem? Maybe the framerate is not the issue.

    OK. I will do so soon.

    Thank you.

  • Hello!

    I need to plot a sine wave at high speeds.

    I used the value from a Sine behavior, but sometimes it is not consistent and the wave is messed up for a few frames then returns back to normal (probably affected by framerate).

    I tried to calculate the value every 0.1sec, which is more consistent, but the Sine behavior was smoother.

    Is there a way to make a function run in its own worker/thread.. and get the result to a variable, then draw it?

    (The Sin is just the base for other equations; so when the Sin is Slow or Not consistent, the other equations break).

  • Use int() function

    int(12.5659897) will return 12

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think the actions shown there would still work but the events below wouldn't be able to pick the sprite because of an availability thing. I'm guessing those 3 actions work and it breaks with the event conditions loopindex=0 and below?

    Yes.

    I thought they are all in the same sub-block so they should see the created object.

    But I found that to see the created object, the actions need to be in another sub-block under the Create action.

    I.e: Adjacent blocks won't see it. Only children blocks will see it.

  • Hello,

    I was following this great Rope tutorial by bartalluyn, and I made (almost)exactly the same steps, but my code didn't work.

    I found the error(!?), but still do not understand why.

    This works:

    This doesn't work (The rope/wire links are created, but not linked together, so they all fall down immediately):

    The only difference is that I moved the "Create" from the loop's block to a sub-block.

    Generally, the code works if the steps are in a Sub-block UNDER the Create block, not adjacent to it.

    I thought that since the steps are below the create, they will be executed after it. Or maybe the problem is related to how Picking works (i.e. the next steps cannot pick the recently created wire)?

    Why?

    Thanks!

Delphawi's avatar

Delphawi

Member since 3 Dec, 2013

Twitter
Delphawi has 1 followers

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x2
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

17/44
How to earn trophies