dop2000's Recent Forum Activity

  • Email notifications should be going out - I'm not sure why they wouldn't be.

    I always receive them post factum, after the subscription has been renewed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Laura_D Could you please add an email notification sent 1-2 days before the subscription expires?

    When the subscription is charged once a year, it's easy to forget about it. Many bad things can happen, the card may be expired or get overdrafted. Recently I was charged $70 for a friend's subscription which I had no intention to renew, only because my card was linked to it!

  • AJAX request is an asynchronous action, it is not completed immediately.

    Better move it to "On Start Of Layout" event, you don't need to read the file on every tap. And add "System Wait for previous action to complete" between the "AJAX request" and "JSON Parse".

  • If all hammer names are unique, it may be easier to get rid of the array and change your JSON to this:

    {
    	"hammers": {
    		"Basic": {"damage": 2, "speed": 3},
    		"Enchanted": {"damage": 4, "speed": 3},
    		"Massive": {"damage": 10, "speed": 1}
    	}
    }
    

    Then you will be able to access any hammer stats directly, for example:

    JSON.Get("hammers.Massive.speed")

  • "hammers" in your JSON is an array. If it contains more than one record, and you don't know the exact index, you will need to loop through it to find the right hammer record.

    JSON For Each entry in "hammers"
    JSON Has Key "." & hammer.AnimationName
    ---> Wheel add JSON.get("." & hammer.AnimationName & ".speed") to speedTotal
    
    

    When a path starts with "." it's a relative path. For example, once you set the path to "hammers.0.Basic", after that you can get speed value by a relative path ".speed":

    JSON Set path to "hammers.0.Basic"
    Wheel add JSON.Get(".speed") to speedTotal
    
  • Here is my usage case - I have a dialogue system based on JSON files. These dialogues may call various functions with variable number of parameters:

    {"function": "functionName", "params": ["foo", 1, 20, 30, "bar"]}
    

    So there is a single script which calls all these functions:

    if (localVars.params=="") {
     runtime.callFunction(localVars.fName);
    } else {
     var p = JSON.parse(localVars.params);
     runtime.callFunction(localVars.fName, ...p);
    }
    

    I guess this can be re-done with function maps, but it will probably be a huge task, taking hours.

  • A slightly better version:

    dropbox.com/scl/fi/kvw67jw5q5akbxnfndnc4/PageFlip3.c3p

  • The family trick should definitely work. But either you are using Pin or hierarchy, one instance is always a "parent" and another a "child". You can only control the parent instance.

    If you want to combine two instances and control them as a single object, you might need to think of some other approach. Maybe use an invisible sprite as a parent object, and pin both instances to it. Or paste them on a DrawingCanvas and destroy the original instances afterwards.

  • Here are recent poll results from a local C3 group:

  • Here is a demo I made some time ago, it's not as good as in the link you posted, but maybe you can get some ideas from it:

    dropbox.com/scl/fi/mm3c0s82kpqsory4ojf7u/PageFlip2.c3p

  • You will need to use a family. Add the sprite to a family, move Pin behavior to the family level.

    Then you will be able to pick one instance of the sprite and another instance of the family in the same event and pin them together. For example:

    Sprite On Collision with Family : Sprite Pin to Family
    

    Instead of Pin behavior you can use hierarchy - it's more advanced.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 257 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • 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
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies