Borgi's Recent Forum Activity

  • You can use polar cordinates:

    https://en.wikipedia.org/wiki/Polar_coordinate_system

    You generate an angle -> ANGLE = random(360)

    and a distance -> DIST = random(100)

    The new destination position of your sprite will be:

    x = current.X + cos(ANGLE) * DIST

    y = current.Y + sin(ANGLE) * DIS

    Or it can be simplier if the distance can be in manhattan distance, you can simply use something like this:

    x = current.X + random(200) - 100

    y = current.Y + random(200) - 100

  • Some serious events are going on:

  • Random(0,15) generates a number from 0 to up to 15, but not 15.

    With floor, he makes this random number an integer.

    You could use this, with Floor(Random(45)) -> this will generate an integer between 0 and 44.

    Generate 30 of these.

    After that, loop through the array, and base on what the value of the array -> create your object.

    Generate different object based on all the random value could be in the array

  • You can set the origion point ofthe button to its center and you can also set the "Hotspot" for SpriteFont. Put them at the same position (X,Y). Now you can freely scale them as you want, the text will always be at the center of the button

  • You can make a variable which is for example 0 when the player can control the hero, and 1 when the hero is hurting (lets call it HERO_STATE). Like a very basic state machine. And an other variable will also be good to detect which direction should the hero "hurt" (HERO_DIRECTION). So, I would make it like something like this:

    • HERO_STATE = 0

    -- enable Hero player input

    + add standard movement events here as subevents

    • HERO_STATE = 1 and HERO_DIRECTION = 0

    -- hero -> move left

    -- wait x

    -- set HERO_STATE = 0

    • HERO_STATE = 1 and HERO_DIRECTION = 1

    -- hero -> move right

    -- wait x

    -- set HERO_STATE = 0

    • on hero collision with enemy

    -- set HERO_STATE = 1

    -- disable Hero player input

    -- hero -> jump

    -- set HERO_DIRECTION = Hero.X < Enemy.X ? 1 : 0

    You also should handle when they are at the same position, or let it be like this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would disable player control for the hero for a period of time, and use "simulate control" for a jump with the correct direction. You can even set the platform behaviour properties up, like smaller jump.

  • From my experiences, var2 would be set first.

    I find the "OnCreated" event is like a parameterless constructor in programming languages.

    I wanted to do something like what you did here and I had to use a seperate instance variable "JustCreated" with default value 1. I set up my object when it is 1 and immediately set it back to 0. It is not event based, but works fine.

  • I can not try it our right now, but isn't this newly added feature solves the problem?

    https://www.scirra.com/construct2/releases/r212.2

    "The ability to hold shift and drag the right mouse button over a tilemap to select a patch of tiles"

  • I am not 100% sure, but I think blending might help you:

    https://www.scirra.com/manual/146/effects

    "Destination out" looks like what you have described

    edit: typo

  • Cool idea! It was kind of hard for me, or I have not played enoguht with it

    Maybe I would put the energy bar somewhere fixed on the screen.

    It is so easy to catch me with these minimalistic pixelart style graphics. All I wanted to say is I liked the graphics very much

  • YAY i got the solution!

    If anybody interrested changing

    -Explosion -> Spawn ExplosionBig on layer 1 (image point 0)

    to

    -System -> Create object ExplosionBig on layer 1 at (Explosion.X, Explosion.Y)

    solved the issue! I really don't know why. So if anybody could tell me, I would be so happy ;->

  • I might be not exactly what you want, but you could use the grid system like this:

    (care pro illustraion)

    Its not perfect iso-tiling but there are way less "not possible" arrangements than without it

Borgi's avatar

Borgi

Member since 15 Aug, 2015

None one is following Borgi yet!

Trophy Case

  • 9-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

11/44
How to earn trophies