codah's Forum Posts

  • Hey I also did my own movement initially but re did it using a kind of hybrid pathfinding with the standard plugin and my own code. With my c2 knowledge now i could probably redo it but who knows. Will check out your game when I can but atm i'm on Mobile. Thanks for the comment!

  • Thanks for the feedback. It's supposed to be hard, like the original (I added a link to a YouTube video of the original for comparison).

    Thanks again!

    Edit: added Arrows and Space bar controls.

  • You got it. There are definitely times when using IID or UID is useful, but I don't think it's necessary in your case.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Also in most situations You should use a text for variables.

    Bass_X why do you say that?

  • In addition to your unlocked variable have an instance variable 'doorLevel' (to replace how you're using IID at the moment). Assign whatever level you want each door to be. Then do Door: Compare instance variable doorLevel <= levelsPassed (or similar), and also the unlocked variable. You generally don't want to loop through IIDs like that. Also, you have to control somehow the order in which the doors are created. Sounds like the hard way.

  • For my intro to C2 I decided to pay homage to one of my favourite games from what I think of as the start of the golden era of arcade games, Berzerk! from 1980

    This is still WIP but it's pretty much on hold while I venture into some original stuff I learnt a lot from doing this.

    I've tried to make this pretty close to the original, but the AI itself is not quite the same. It should give the overall feel of the original though. There are some bugs but overall it's quite playable.

    Trivia: I used basically the same maze-creating method as the original

    Hope you have some fun with it.

    Berzerk!

    Edit: added link below

    Subscribe to Construct videos now
  • I'm not commenting on performance, but there there is the obvious difference with instance variables vs global/local, which is that each object instance has its own copy of an instance variable. So if you need a value that can be different for each instance, then an instance variable is your first choice. I'm not ruling out other possibilities for tracking per-instance data, such as an array that might store instance UIDs along with the associated data.

    For the other decision, there is a rule of thumb called locality of reference, which says that you should declare something close to where you use it. This would mean using local variables where you need a value only in a particular 'scope', e.g. within a single event and/or sub-events. This is a kind of 'data hiding', which is generally a useful thing and helps to modularise your code. For everything else, there are global variables.

  • np.. pretty sure it's also recommended to have a 'platform sprite' when using the platform behaviour.

  • All good.. there's no upvoting here Do read the manual though!

  • I modified the code and also reduced more of the transparent part of the sprites. You should add animations for the other platform states e.g. falling.

  • I shouldn't have used the word triggered; 'evaluated' might've been a better word. A non-triggered event is like an evaluation of an expression rather than, say, a mouse click 'triggering' an event.

  • See attached capx. You're using an Else, so if the first condition is met (i.e. one or more sprites within 90deg of 0) then the second event is not triggered (no change of animation frame).

    Edit: minor wording, and modified a log statement in the capx

  • Sample capx would make it a lot easier.. but if you have an event to check line of sight (inverted) and then disable turrent behaviour.. it should work I would've thought. I have a combination of LOS and turret behaviour and it works ok. What is your LOS cone of view?

  • You go to layout by name (Text). So just construct your layout names based on some numbering scheme, and construct the layout name Text in your Go to action based on your randomly chosen number or other expression.