Zathan's Forum Posts

  • Calculate the angle from your asteroids X,Y values to the spaceships X,Y values. And use that angle in "Set angle of motion" (bullet behavior).

    I think you can use the expression "angle(x1, y1, x2, y2)" for that.

    I understand the idea, but what about that expression?

  • oh, and the asteroids rotate on their own axes.. therefore, i don't know how to do this

  • 'choose' would also work.

    what's the best way to use preload?

    with 'on start of layout'?

  • i need that spawned objects are attracted for this other...

    like asteroids. when they spawn, go in the spaceship direction.

    edit: i'm using the bullet behavior in the asteroids and custom movement in spaceship;

  • No. You are trying to preload a sound called "explosion1explosion2explosion3explosion4".

    Just load each individually.

    To play: Play by name: "explosion"&int(random(1,5))

    oh, i get it

    but what about the 'choose' to play random sounds? works fine?

  • -XY will spawn outside.

    You should be able to use the layoutWidth/Height for the right and bottom.

    Thank you

  • to preload multiply audio files:

    Preload (by name): "explosion1"&"explosion2"&"explosion3"&"explosion4"

    is that right?

    and how do i play this sounds randomly?

  • Like asteroids to my game... i'm using 'scale inner', so the layout size isn't always the same.

    I want that asteroids to spawn random in every side of the screen. Thanks

  • When you say it doesn't work, what are you expecting to happen? It seems to work ok for me.

    I get it now...

    I thought it was for something else lol

    anyway, thank you ^^

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes, use 768*480 with landscape =)!

    ok, thank you ^^

  • I'm making a mobile game with 480*768. So, height > width.

    But I want the orientation of my game is landscape...

    So, I'll have to use 768*480 and mark the landscape option?

    ..sorry for the english

  • i put the behavior in a text object, but isn't working...

    i've already set the layer to parallex 0,0.

  • Just restart the timer in the 'On timer' event.

    Dude, you did a tutorial project for me... thank you vmuch

    it's exactly what i need. ^^

  • Use the Timer behaviour rather than Every X second. You have complete control over it.

    lol I had forgotten this behavior.. anyway, I never used it.

    how to solve my problem with it?

    I can set a timer with a random number to my meteor spawn?

    *yeah... i'm a noob. :\</p>