dop2000's Recent Forum Activity

  • Add a black sprite on top with two effects - Screen and Bulge. (in that order)

    The bulge effect will only be in the area covered by that sprite.

  • I often use this trick:

    Object on screen : // nothing in this event
    
    Else : // your actions here
    
  • I tried to use your code but it gives me an error on key<> and I don't understand why.

    Sorry, I don't use JS often, it should be != instead of <>

    I assumed you know Javascript since you asked for a script solution?

    Here is a demo.

    dropbox.com/scl/fi/iw8pscxnqot8t6dnx0965/JS_InstVars.c3p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I didn't understand how to use the first one.

    It's easy. Save Sprite.AsJSON to a text variable. Later, when you need to restore, create a new Sprite instance and use "Sprite Set From JSON" action - it will restore its position, instance variables and all other properties from the saved JSON.

    I would like the console.log to also write the object variables not related to the family.

    You know which variables are related to the family - simply exclude/ignore them when running the "for (var key in o.instVars)" loop.

    for (var key in o.instVars) {
    
     if (key!="FamVar1" && key!="FamVar2") {
     console.log(key + ": " + o.instVars[key]);
     }
    }
    
    
  • It's probably only in preview. You will not see it when you export the game.

  • I would probably use a timeline for this. When the character collides with the vine, disable Platform behavior, start the timeline. You will need to move the character above/below the vine on z-axis during the playback.

  • rockpapershotgun.com/moonstone-islands-farming-doesnt-quite-gel-with-its-ghibli-esque-poke-like-battles

    Thanks! Seems like the author is not very familiar with the game yet, this explains some points of criticism in the article.

    For example, you can ask spirits not to follow you. You can receive a Spirit Barn quite early in the game by completing professor's quests. Spawn rate for spirits can be reduced in game settings.

  • If you need this to save/restore sprites on the layout, you can use Family.AsJSON expression. It will save all object properties, including the values of all instance variables. However, there will be unique codes instead of variable names.

    Or you can retrieve all instance variables with this script:

    const o = runtime.objects.Family.getFirstInstance();
    
    for (var key in o.instVars) {
     console.log(key + ": " + o.instVars[key]);
    }
    
    
  • In Construct all events are executed one by one at the start of the tick. Wait 0 allow to delay the action until the end of the current tick.

    Another option would be putting that event at the very bottom of the event sheet. But when you have lots of interlinked event sheets, it may be tricky to figure out in what order they are executed.

  • You can get platform speed using Sprite.Platform.vectorX and Sprite.Platform.vectorY expressions.

    Save these values in a pair of instance variables at the end of every tick:

    + System: Every tick
    --> System: Wait 0 seconds
    --> Player: Set speedX to Player.Platform.VectorX
    
    + Player: On collision with Wall
    --> TextSpeed: Set text to "Collision speed:" & Player.speedX
    
    
  • I don't think it's possible to do without a loop.

    You can add sheep value to the field value as sheep enter the field with "On collision" event. But if they are already there, this won't work, you'll still need for-each loop.

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 256 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