codah's Forum Posts

  • I had a go. Your main problem was not doing a 'pick all' in event 5. There are other improvements that could be done, but I only did a few essentials. One thing I did to make life easier was to create a container with sprite and planet_pulsar.

    [attachment=0:1mes32ct][/attachment:1mes32ct]

    [attachment=1:1mes32ct][/attachment:1mes32ct]

  • You can randomize targets easily with System: Pick Path_Car where Path_Car.path = random(1, max_path)

    For choosing a path at a crossroad, if you have 3 directions, just choose(1,2,3) or similar (say, 1 left, 2 straight, 3 right). You could store in each Path_Car, its available destination Path_Car(s).

    Also rather than check for overlapping with Path_Car once the car arrives, I'd set it when you first choose the target (suggestion).

    For performance, C2 won't render what's not onscreen, and you can't pathfind to something offscreen anyway.

  • There's a lot in that video For 'stretching' and other tween effects, there are various ways of doing it.. Have you looked at all the tweening add-ons, the effects, and behaviours (like Sine)?

  • Ok so I'm in this category... wrote my first games 32 years ago in 16kb.. still have the passion

    Currently working on random stuff, hoping to build enough skills to put out a quality game.

    Better on the coding side than the ideas/art/marketing side.

    Talk to me people

    PS: JJEvil your game looks great.

  • R0J0hound Not sure I understand how this works, or how to recreate it in Construct 2, but looks simple and resource cheap.

    what is the global number CUR aspect? current ? or a global variable?

    I have only one function right?

    Pretty much as he spelled out.. global var is for the same reason as my currFruit var ('current'). One function as shown. Should translate straight into C2.

  • You could have a scaled down version of the level that fits into the screen behind the actual level (or is set invisible) but always stays in frame. The pathfinding behavior could work on a single pixel representing a character. Then, calculate the position of the characters according to the position of the pixel. It would be something like a mini map where you calculate the position of a symbol off of the position of the character but in reverse.

    Great minds think alike While waiting for a response, I created a minimap with pathfinding! However I created it as an actual visible minimap. Problem is the pathfinding behaviour seems to break down on such a small scale.

    My mini dudes are 3x3 (down from 17x17) and I've toyed with cell size of 1, 2, 3.. (down from 16) and with cell border also, but that's back to -1. The space to move is about 7-8 pixels. They just don't seem to go to the centre of my room sprites properly, and sometimes get stuck or whatever. I might make them 1 pixel as you suggest and see if that works.

    However.. I could still make an invisible map, as big as my window, and use that. Great idea thanks.

    And I will either scale the movement up to my full size map as you suggest, or use some scheme that when the mini guys hit a room sprite, I can use that to trigger something. We'll see.

    I'd still be interested in a simple means to "auto navigate a map of numbered rooms using the room number".

  • Perfect

  • No use array.at() and index it with a variable incremented by % so it wraps around. But for 3 choices it does seem overkill (but I'd probably still do it by personal preference).

    e.g.

    [attachment=0:3ktrwyji][/attachment:3ktrwyji]

    Edit: made slightly more concise

  • Would you use an array?

  • Hey check this. "Tween2Effect" behaviour

  • Assuming event 91 is a top-level event (i.e. perhaps only in a group), it looks like you're adding 1 to highlight.maxUpgrade on all highlight objects in event 92, as none have been picked, it will pick them all. Just a stab in the dark.

    edit: unless you are using containers

  • lerp is a function that returns a value so you could plug it straight in, using some sort of loop.

    Edit: sorry this was out of sync. I didn't see earlier responses

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Can't right now sorry but I'm sure someone will soon! If you search lerp in the forum, manual and tutorials you will find lots of info.

    Also what spacedoubt said

  • Please see the mockup below.

    [attachment=0:2ccicwzn][/attachment:2ccicwzn]

    So in words.. I have a fixed building with an unchanging room structure. The map is larger than the viewing window, and the user can scroll around the map by clicking on a room (the room then scrolls to the centres of the window). At the same time, there are 5 little guys that can be directed around the building by the player, not directly but by clicking on the target room. At first I just used pathfinding, but you can't find a path to something that's not onscreen. In the real map there are about 60 rooms.

    So I need to roll my own room navigation/pathfinding. Each room/passage is numbered uniquely, and has a 'placemarker' sprite (not shown). I could come up with something, but I was wondering if there was any nice way that somebody has already come up with

    tl;dr: auto navigating in fixed room structure, not with Pathfinding behaviour

    PS: What I would like is if the Pathfinding behaviour let you access all nodes it calculated before it got dead-ended.. I could then pathfind to the last node. Not sure if that's possible with the algorithm.

  • codah I saw your litetween endorsement coming a mile away on this one. haha.

    you could also use a variable that you set the parameter to

    and have that variable add to itself while the key is down.

    Hey spacedoubt I mentioned lerp first