How do I - Horror game, enemy appear, disappear, then reappear closer and bigger

0 favourites
  • 6 posts
From the Asset Store
The game will give you a dog that appeared and you must say if he appeared more, less or equal.
  • I have this neat idea for a horror game where you have a flashlight with limited battery charges. Each time you use a charge, you have a chance of an enemy appearing.

    I would like an enemy to appear once, then appear again, but this time closer and larger. Like those videos/gifs you see of someone seeing a ghost in a hallway, turning off a light, turning the light back on, and suddenly the ghost is much closer.

    I thought that I could do that with two different enemy sprites, one large and one small. I am running into trouble making the enemy move "towards" the camera (i.e. player). The Move To behavior seems to shift the enemy on its side, and I just cannot seem to get the timing down. Either the enemy shows up far away, or too close, or both show at the same time!

    Here is a link to the c3p file: drive.google.com/file/d/1Cm6q_Qjzvv5veZGGvPfxyMLOWBDuGL-y/view

    Any help would be great!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Any help would be great, thank you!

  • It is hard to follow your events as you have multiple "On Space Pressed".

    I would recommend you try to use just one trigger so you dont have to duplicate multiple times as this will make it so hard to follow what's going on and you could easily end up with bugs, also another benefit is that it will be more organised.

    Not sure if this is exactly what you wanted but at least it will help you as a starting base as it should be close to what you needed.

    Here is an example:

    https://www.dropbox.com/s/hjf2dqodlhqb8ul/Corridor.c3p?dl=0

    The enemy has the variables to adjust:

    -The starting Scale

    -Max moves can do before hitting the player

  • Wow! This only took you a couple of hours? That is a FAR more elegant solution to what I was trying to accomplish, thank you very much! I am in awe!

    If it is possible to explain, I have a hard time comprehending your formulas for EnemyChance and move_dist. In other words, I do not believe that I could replicate them again in another game! How did you find those? Is all of that under "Find Expressions", or is that all something from actual computer coding? I must admit that my trigonometry knowledge is lacking.

    I would love to learn more about the Construct platform to be able to replicate these sorts of events; I need to find some study material!

  • Np Glad it was helpful!

    Hoh they are just normal calculations:

    At the "Start of layout" those calculation has to do it so you can have a dynamic system where you change at any time the:

    -Max_Moves

    or

    -StartingScale

    So it will recalculate the values you need at the start of the layout.

    If you change "Max_Moves" it will affect the variable "Move_Dist" as we always have a fixed distance so we need to calculate how far each step can go until rich the endpoint.

    Is the same for the Scale, by reaching the endpoint has to end at the target scale. That's why we recalculate the "Scale_multiplier" at the start of the layout so we know how much scale to apply on each step.

    I would love to learn more about the Construct platform to be able to replicate these sorts of events; I need to find some study material!

    Look for tutorials and maybe construct 3 temples they have plenty and just practice as much as you can then you should get better each time.

    https://www.construct.net/en/tutorials?flang=1

  • Well thank you so much for your effort, time, and explanation. It is greatly appreciated!

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