Need help with a couple of things please.

0 favourites
  • 7 posts
From the Asset Store
A collection of various characters spritesheets for creating a 2D top down, RPG, tower defense, or other similar game.
  • Hi all,

    I'm new at using Construct 2 and I'm trying to do a simple game. It is indeed a simple idea, but as I'm NOT a Construct 2 expert I can't understand which is the best way to do some stuff, so I end up doing strange workarounds that suck.

    So this is the setting of the game:

    • I have a character on the right side of the screen that can only move up and down and shoot ONLY towards the right side of the screen.
    • Enemies come from the right side of the screen in a straight line, and if they get to the left end of the screen you lose some health. ( basically like a tower defense without towers).
    • I'm still thinking about the enemy spawns. Not sure if I will put enemy waves with an upgrade shop between waves, or 1 huge wave with increasing difficulty and a button to open the upgrade shop whenever you want.

    Here come the PROBLEMS:

    1) I put an "enrage" status for the enemies, which triggers randomly on an enemy on screen every certain period of time. "Enrage" causes the enemy to change animation and go faster. What I can't seem to do correctly is spawn a flame animation behind the enemy's aircraft (to give the impression of a boost) ONLY when they get enraged. On event 12 of the event sheet in the uploaded picture you can see what happens when an enemy becomes enraged. There i had a "spawn EngineBoost" but the result was a trail of sprites behind the moving enemy (obviously, because the enemy keeps being enraged and alive, so that event keeps playing).What is the best way to implement this thing?

    2) I haven't totally tried this yet, but I don't want to mess up the code before getting advice. How should I manage the enemy waves? which is the best way to write these events? (possibily analyzing both "wave" modes that i wrote above)

    Sorry about the long post. I hope someone can help me, and thanks in advance!!

    EDIT: Forgot to post the Screenshot, silly me

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1) You could perhaps have your 'boost' animation pinned to your enemy aircraft, instead of spawning it, and when the enemy becomes enraged you could then unhide the boost animation. Then you cold hide it again whilst the enemy is no longer enraged.

    2) You could make it easy for yourself and set up the whole wave system to trigger on a time basis. For example, 5 seconds in spawn these guys, then 10 seconds in spawn these guys, etc...

    Check out the simple timer on here: and then you could check the time and then spawn when appropriate.

  • Thank you for your fast reply galacticfan!

    1) But when I spawn an enemy, will the pinned sprite spawn with it? Does it become part of the instance? or do I have to spawn a bunch of 'boost' sprits out of the layout and then pin one to the spawned enemy?

    2)I will check the link you sent me right away and write back. But I already have a spawn family with 8 spawns that works at random intervals.. what I was actually asking is how could I do a wave system similar to a tower defense game: meaning a wave with 30 enemies starts > enemies spawn at determined intervals > when "EnemiesRemaining=0" pause the game > open the shop> on input close the shop and start next wave on SAME layout. Is it possible? if yes, how please?

  • A simple action like this would solve question1:

    On enemy created -

    enemy spawn boost at enemy.x,enemy.y

    boost pin to enemy

  • ok I got point 1) to ALMOST work. I pinned the boost at the enemies, set it invisible, and when the enemy is enraged it becomes visible for ALL enemies on screen. This is a problem. I want it to be visibile ONLY on the enraged enemy (which will be 1 out of a bunch at the beginning, and possibly also more on screen at the same time).

    The only option I can put is "Set Visible", but this doesn't let me choose which boost to be visible. How can I solve this pleasE? Thank you

  • give the boost an instance variable enemyuid

    On enemy created -

    enemy spawn boost at enemy.x,enemy.y

    boost pin to enemy

    boost set variable enemyuid = enemy.uid

    When enemy gets enraged

    system pick by comparison boost where boost.enemyuid = enemy.uid

    boost set visible

  • I did it without a UID. Thank you very much!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)