gkntrn's Recent Forum Activity

  • Hi there,

    I have a player that has platform behavier. Sometimes it does not jump when i press up key. It wont work properly. Do you have any idea why it is happening?

    Thanks

  • I finally do it:)

    I used choose(1,2) to replace random(1,2) and it works.

    Thanks again.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • keatingb, i understand what you suggest now. I made it but there is a problem.

    3. Every Next Timer Seconds > Set EnemyChance to random(1,2)

    it makes enemychance to randomly between 1 and 2. (1.1,1.2,1.0156156 etc.) so i never be 1 or 2. So objects never created. is there a way of set value 1 or 2 exactly? ( i searched and "|" means or but it wont work again)

    Thanks

  • Hey there! Can you explain a little more thoroughly what you're looking for? Do you need enemies to spawn at random times, or random enemies to spawn at the same time interval? Do you need random positioning, or just the set position?

    From what I understood, you have two enemies you want to spawn at random intervals. I would do this:

    1. Global variable: NextTimer = 1

    2. Local variable: EnemyChance

    3. Every Next Timer Seconds > Set EnemyChance to random(1,2)

    4. ^Subevent to 3 - If 1, Spawn enemy 1, If 2, Spawn enemy 2.

    5. ^Subevent to 3 - Set NextTimer to Random (0.5, 2)

    Only one of the enemies will spawn at a time, the interval between spawns will change every spawn, and you can play with the values to fine tune the effect.

    Hi,

    I think you understand right. But i dont understand the script you wrote:) I am new to C2. I need obstacles to come randomly to jump over them. The random thing here is the type of obstacle (there are 2 of them) and space between them. (this can be done with timing i think). Does your script work for that?

  • 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,

gkntrn's avatar

gkntrn

Member since 31 Mar, 2017

None one is following gkntrn yet!

Trophy Case

  • 7-Year Club
  • Email Verified

Progress

8/44
How to earn trophies