Vallar's Forum Posts

  • Hello,

    I know this sounds really easy and basic; but for some reason it doesn't work. I have this sprite that I added the "Scroll To" effect and the camera won't move with it. For some reason at one point while moving upwards through the game, it will stop and won't move further. I tried doing a lot of things but nothing is working, any idea what I am doing wrong?

    Thank you very much.

  • EDIT: Thank you very much, you saved me with that remark. I failed to notice this one out ^_^

  • Hello all,

    I have been trying to fix this bug in my game for about 2 days now and with no success. I have tried multiple suggestions made here regarding the issue of making "enemy waves" but every time the same bug occurs.

    Currently what I want to do is that I am trying to spawn some enemies when all enemies on the screen are dead. So I pick a random spawn point and ask it to spawn an enemy. Unfortunately when the enemy spawns, it is killed instantly and the effect for killing it appears.

    I have attached the .capx file. Anyone can tell me what am I doing wrong?

    Thank you very much in advance

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello,

    Here is a .capx of how to test of an instance variable. It isn't the best example but what I could get out as fast as I can.

    Hope it helps.

  • Hmm...

    I see, alright. I'll try to create a .capx file for you. Just I am at work now so might take me sometime.

  • That did it, thank you very much!

  • I think Ashley had a tutorial about this part. It explained that principle where you can make an enemy sort of "patrol" and I think that is what you are after. It is the platformer tutorial.

    Essentially, however, what you do is create 2 sprites (just any colored squares would work) and place them exactly at the two points where your ball should move back and forth just like the below:

    * o * (the 2 square sprites would be the * and the ball is the o)

    Next you would add the bullet behavior to the ball (or the 8 direction movement and restrict it to 2 directions).

    You would want a condition then checking if the ball collides with one of the 2 sprites and add an action to reverse the direction of movement of the ball.

    I believe that should solve the problem.

  • Hello everyone,

    I have this breakout like game that I would like to have the bricks lunge themselves at the player on random intervals.

    Currently the setup I have for the bricks is that they are moving left and right until they hit something then switch their direction. I have tried a myriad of (if not silly then stupid) workarounds for the bricks to shoot at the player's position (and not follow him around or stop when they reach the position but continue along like a bullet) but failed.

    The bricks have the bullet behavior (that is how they move left and right) but I can't figure out the above; any ideas?

    Thank you very much.

  • First, sorry about the weird spelling in my previous post; I have been using my phone to post recently.

    As for your question JRoberts:

    Well I am still starting out with C2, too. However, I believe you would create an instance variable for each icon (icon represents a level in the level selection screen) and when the player finishes the level (when the ball touches the goal), you change that variable (for example from 1 to 2 or from 0 to 1).

    I believe it would be something like this:

    Create an instance variable for each icon called "finished" and with default value 0 (this is the LOCKED version for the icon and therefore the level).

    Use condition Player On Collision With Another Object Goal > Icon Add to "finished" 1

    In the layout where all the levels are created you would have the following:

    System On Start of Layout + Icon Compare Value "finished" = 1 > Icon Set Animation to "UNLOCKED"

    Mouse On Object Clicked "Icon" + Icon Animation Running "UNLOCKED" >System Go To "Icon's Level"

    Hope that helps.

    shirokuma

    I have tried exactly what you mentioned and it again didn't work. I checked whether I had anything set to invisible or if a layer is set to non-transparent... all of them were set correctly. Not sure if this is a C2 bug or is it something with my own game; any ideas what I can do from here?

  • JRoberts

    I believe you can achieve the concept by creating a layout with a list of icons on which the icons each is correspond ed with a level. When the player clicks on one you load that level.

    You can add an array of variablez to check with it.if the player has playes the level or not. Just a guess though since I am not quite that advanced in C2.

    shirokuma

    I'll give it a try with the system run once.

    I am also prett certain all layers are visible and transparent but I'll double check.

  • OK, I have tried to do the same as what is inside you project.

    The only difference is that I don't do the check every tick, the check is when every enemy is dead on the layout that the snapshot is taken then I save it to an empty sprite after which I load the next level with that sprite but it won't load anything.

    Here is a screenshot of my own setup.

  • Thank you very much.

    I have checked the file you have and that is weird... I have something similar setup on my own game and it doesn't work.

    I'll try copy and pasting your events and see what happens.

    Again, thank you very much!

  • Hello,

    I was wondering about your rates. However it seems PMing is out of the question, so I was wondering about your email perhaps?

  • Oh, I see. I am sorry I wasn't much help.

  • Hello everyone,

    I have been following the Breakout tutorial series. However I have decided to add a few extra features to continue learning about C2.

    One of the features I want to add is when the player wins or loses the game takes a screenshot right at that moment and transfer it to another layout (as background) where the win/lose message would display.

    I was able to display the screenshot in the same layout fine, however it seems when I use an event to switch to the next layout the screenshot is gone. So I am wondering how can I go about doing that?

    Thank you very much in advance.