cenowador's Forum Posts

  • angle() is an expression that gives you the angle between two points, in this case from the sprite to your mouse.

    So every tick, set angle to angle(sprite.x,sprite.y,mouse.x,mouse.y)

    Welp, it didn't worked at all. It worked, but had the same issue that I was facing using the other way: it's not facing the right direction, the mouse is always tangentially to the ship. I took a print to show where the mouse was.

  • Try Set angle TO angle(sprite.x,sprite.y,mouse.x,mouse.y)

    Sorry, I didn't get it.

  • Hello, comunity :3

    I'm making a sort of an "Asteroids" game, but I'm trying to set the ship angle based on the mouse position, not by the arrow keys.

    I'm using this - Every Tick: Sprite > Set angle toward (Mouse.X, Mouse.Y)

    It's not working, since the nose of the ship does not follow the mouse, just the anchor point of the sprite, which makes it spin in the mouse direction, but not in the way that I want it to.

    Can anyone help me, pls? Thank You

  • Maybe you can create some rectangles and use them as "areas" and set: if touching rectangleX > set char speed to X; if touching rectangleY > set char speed to Y. Got it? If you put them on the HUD layer with 0 parallax they will be on the screen until you decide don't.

    If you have any doubts, just let me know and I can make an example for you :3

  • It's pretty simple: create a sprite > right click on the "animation frames" window > "import files" > "from sprite strip" > select your sprite > set the number of rows and columns of positions that have in your image > press Ok.

    If it doesn't recognize each position as a frame, try adjust the positions of your image on Photoshop, paint or any other editor that you want, but it'll probably recognize it.

  • Is your sprite in an unique file in some positions or each position in a different file?

  • I think that the easiest way is to create a global variable and add or subtract from it according to each answer.

  • I'm not sure about your question

    You can make global variables constant (checkbox when you create a variable) - here the variable can't be changed.

    But if you use local storage you can decide what happens.

    Like a condition when localStorage loaded | set variableX to 1

    If you use the standard system save and load (not recommended) you still can make another action after the load - like set value of variableX

    Excuse me, but since you touched the subject, why shouldn't we use the native saving scheme?

  • Have you tried to create a sprite and set an event that says "on click on sprite X"?

  • It's pretty simple, actually. It would be easier if you show us a print of your events. Mine looks like this:

    I'm making it to mobile, so I'm using the touch, but if you're using mouse, it will be the mouse object instead.

    By the way, you will only need the "go to layout X" action, not the other ones.

  • Like assign an overarching ID number to each section (idk if you levels are layouts or not). Then have a local variable for each section that specifies an x & y coordinate to spawn at. You can use instance variables, local variables, or global variables for IDs. Probably instance variables per tileset would be good.

    Uhm... I got it. I made a sprite called "zone", and according to their UID, if the players dies, it will toggle a boolean instance variable - by the way, a clever solution you've found, thank you -, but i'm using some tilesets that are randomly spawned to make the level. There is a way that I can make construct create an object - in case, the specific tileset where the player died - according to its UID or a variable?

  • You need to use layered Ids. Have each build platform have an Id, and have a specific location (x,y) on the build platform that is stored as the 'spawn' location, then just save the platform id of where the player died at.

    Sorry, bro, but how do I create a layered Id, and how do I make to spawn the object according to its Id?

  • The objects will spawn in a set X,Y? If yes, you can create a Function - the same way you create a sprite, or anything else -, then go to you event sheet, include your functions, and call them at random. Like this:

    imgur.com/kVGNSTa

    Of course that you'll set what your function does. To call them randomly, just create an action with "Call Function ------ choose("funcX","funcY", "funcZ")", and it will pick one of them randomly.

    imgur.com/7o9FP7r

    To make it spawn a limited set of times, set a local variable that whanever the object is spawned, it has 1 added to its value, then put another condition on your function that says "X<5", by example.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, there is some demos and i see some of them but with all the them you feel like the blocks are coming and in my game i want to feel that im who is going up to the top...

    A feeling like if you have all the blocks in the world where you can jump but all the blocks are being create once you are close enough to create.

    Can you show us an example? The way I'm imagining, only by spawning the scenario it'll already looks like you're going up. Do you already know how to make the scenario spawn "on demand"?

  • How are you making the explosion? When it explodes it creates a sprite? Have you tried to make this sprite gets bigger according to time, and whatever touches it, gets destroyed?