codah's Recent Forum Activity

  • Hey check this. "Tween2Effect" behaviour

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

  • 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

  • You can use timers or look into lerp() or the LiteTween add-on. These last two can be used to change any value 'smoothly' or in different ways, including your effect value.

  • Sprite: Set effect "Pixellate" parameter 0 to <value>

  • Hi, we can't see what you're doing wrong without a capx or screenshot

  • I actually had another variable on the door to determine whether it's default state was "open" or closed" at the start of layout, but I've added that in myself and it works just fine.

    So it seems changing the toggle state to the switch instead of the door fixed it? Can you give any insight as to what was going wrong with my first attempt? Apart from all the unnecessary for loops

    EDIT: Just read your edit. I had gone through a previous attempt with families but thought that might have been clashing with something and reverted back to the individuals. Honestly I had gotten to the point where I wasn't sure which part was wrong and whether each change I made was breaking something else. I now realise I was over complicating things.

    Yes I often start from scratch when I've 'tried' too many things as they all start to conflict with each other. Definitely the KISS principle applies to C2. And families can be a big help, but there are some gotchas as well. At first I thought you had the free version because your avatar doesn't show it (so I couldn't suggest families) but then I saw you already had one..

  • Hi is this close to what you're after?

    Edit: slight change to capx

    [attachment=1:2tb70m1r][/attachment:2tb70m1r]

    without for loop

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

    Edit: Comments.. Any reason the block wasn't in the 'heavy' family? And also why weren't you using the family instead of individual objects in a big 'or' block? The comment about 'each door's starting state' is a bit misleading because those events are continually evaluated, not just at the start.

    Basically I started from scratch as the code looked way too complicated. I also used a boolean 'state' variable instead of the text one (personal preference, less error prone).

    I keep coming back to one general design principal: when a change of state occurs, toggle a variable, then 'do all the state change stuff elsewhere'; i.e. in an event that checks for the state variable's value. Don't do things at the point where the state changes. It keeps things simple, clean and readable.

  • > codah can you show a sample of writing it correctly since you said it is possible, for the sake of knowledge.

    >

    I started to but it was late. You can see now why I didn't bother

    It's too bad you can't do something like this Set text Function.Param(0) | "Placeholder"

    I guess because that has another meaning.

codah's avatar

codah

Member since 30 May, 2014

Twitter
codah has 1 followers

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies