ezrubiera's Recent Forum Activity

  • Hi, I am having problems loading the game. When the 'intro' layout finishes I request a "load game from state" and this error appears:

    I don't know what I am not allowed to do that doesnt let me load the game correctly...

    any help will be appreciate, thank you.

  • VectorY is in pixels/seconds. Every where you see 'second' it is already dt corrected. Like every 3 seconds, also dt corrected.

    &

    Say you want to jump max twice in height ... then body.jump_strength_bonus cant be bigger then 2

    Thaaaank you so much, so I deleted the dt from the formula. I was afraid that in some computers the player could not reach some points.

    thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • use the camera.

    create object at (camera.x + random(-window_width / 2, window_width / 2), camera.y + random(-window_height / 2, window_height / 2))

  • Hi,

    I have two objects to create and want to spawn(or create) them randomly. This will be a infinite runner game so my objects has bullet behavior. Player has to jump over them. Each object to create must be positioned on different Y axes. And finally objects must come randomly. (random space between them but not too close or same posisioned)

    First i tried this:

    system > every random (1,2) sec > system create object Sprite1 on layer 1 at (720,275)

    system > every random (1,2) sec > system create object Sprite2 on layer 1 at (720,300)

    and tried different combinations of time values. But it didnt worked for me well. Objects come randomly but sometimes it comes too close to each other or same location.

    Then i tried to put them in a family folder and made them to spawn. It comes randomly but the Y coordinate must be the same for all family. So it wont work for me.

    I need help about that. Is there a proper way to do this?

    Thanks,

    You can create a function "constructor" for each object like:

    On function (create_object_1) -> Create object object_1 at X Y

    On function (create_object_2) -> Create object object_2 at X Y

    then:

    Every (X seconds) -> call function "create_object_"&int(random(1,3))

  • Hi, I am using the function "set platform vector Y" to make my own jump system, but I have one question.

    To jump, I use a custom sustain system with a timer, so when the jump button is down and timer is not over I apply a vector Y to the body to jump higher or not. The problem is that sometimes the body makes a great jump, I don't know why. I am using delta seconds on the vector, because is a continued action while the button is down.

    Do I have to use the delta time or the use of vectors uses internally the delta time??

    Edit:

    my code is something like:

    If(jump_key is down) -> apply vector Y (body.jumpstrength * body.jump_strength_bonus * dt)

  • Nope. Just add it as an object.

    can u give a literal example? I think I am making it harder than it really is

  • I can't destroy the number desired, I dont know why. I tried using "pick random instance" inside the loop. I dont know why is this happening. Maybe the enemy count is done when all the loop is finished, but that dont make sense :/

  • On Start of Layout - > Local Storage - Check item exists "The name of your save file"

    If Exists -> Load "Save File name"

    If does exist -> Go to layout whatever

    I dont have the local storage plugin. Is it external?

  • give me one moment, I create a new project and I try it

  • yes, i think that should work, try to get the int of the random number:

    int(random(enemy.count))

  • that is what im saying

    You destroy 100 - 40 = 60

    So u destroy 60, then 40 will stay

  • no, u destroy (100 - oponents(40)) = 60

ezrubiera's avatar

ezrubiera

Member since 25 Nov, 2012

None one is following ezrubiera yet!

Trophy Case

  • 11-Year Club

Progress

11/44
How to earn trophies