dop2000's Forum Posts

  • I did a quick test a WeightedByName returns correct values when two or more probability tables are added.

    Make sure you are picking the right WildEncounterTiles instance, and Location variables contains the right value. You can use Debug View and Browser Log to troubleshoot issues like these.

  • Sprite set variable to (Sprite.IID<(Sprite.Count*0.30) ? 1 : 2)
    

    If you want to randomly distribute these values:

    For each Sprite Order by random(1)
     Sprite set variable to (loopindex<(Sprite.Count*0.30) ? 1 : 2)
    
  • It's difficult to tell from the screenshot.

    I suggest changing layer interactivity instead. When layer interactive=No, it doesn't receive mouse and touch events. So you will not need to check for layer/sprite visibility.

    Also, I suggest always using layer names in events rather than layer numbers. If you decide to add/remove any layers in the future, you will have to update layer numbers in all events. With names you won't have this problem.

  • You need to email supportnfl@construct.net

  • I don't use function maps because they are PITA to deal with. If I need to call functions by name I use scripting:

    try { 
     runtime.callFunction(localVars.functionName) 
    }
    catch(e) { 	
     // console.log("function does not exist");
    }
    
    
  • Maybe you've already added the Touch object earlier?

    Also check in Construct settings that you have disabled "Use simplified user interface" option.

  • No, AsJSON only stores the dictionary contents.

    I'm using an invisible global sprite to store a bunch of variables. (Instead of Globals addon). I'm saving Sprite.AsJSON to Local Storage, and this saves all its variables.

  • You might need to adjust grid size/border. See the official documentation, it explains it very well:

    construct.net/en/make-games/manuals/construct-3/behavior-reference/pathfinding

    You can also try disabling diagonals in Pathfinding properties, or using MoveTo to move along the pathfinding path.

  • You can try solid filters - you can specify different tags on solid objects and enable/disable collisions with these tags. But I'm worried managing all these tags may be quite difficult in your case.

    If enemies can't walk freely between floors, perhaps it would be easier to make each floor on a separate layout.

  • Are you sure it's global and that layers on other layouts have the same name? It should definitely work.

  • Hierarchy, or "scene graph". Extremely useful feature. Here is some info about it

    construct.net/en/blogs/construct-official-blog-1/lets-talk-scene-graph-1569

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Decryption is an asynchronous operation, which means that it can take some time to complete. Other events will continue running during this time.

    You can use "Wait for previous action to complete" action inside the function and change the function type to asynchronous, but it won't work with functions which return values.

  • You can use a combination of both methods. (this is what I do in our project) Pick by nearest, but if the cursor doesn't jump where you want - specify the destination icon in its instance variable.

    So on key pressed, you first check if there is a value in the variable. If there is, pick that destination icon. If there isn't, pick the nearest.

  • You can also pick the nearest icon. For example:

    On Up key pressed
    Icon compare Y<CursorSprite.Y
    Icon Pick nearest to (CursorSprite.x, CursorSprite.y-20)
    

    It works best when all icons are placed on a grid. With a map like on your screenshot it may require a lot of tweaking.

    Another option is to add 4 instance variables to icons and use them to configure where the cursor will jump to from each icon. It will be a lot of manual work though.