diamantico21's Recent Forum Activity

  • Oof, didn't know that it assigned different polygons for each frame.

    Thanks for the help.

  • https://i.imgur.com/LB2k0uT.gif[/img]

    As you can see, in some frames the sprite is hovering above the platform and in others he collides with the platform. Don't know if it's a feature or a bug, but it would be very nice to know if there is a way to get him to stay above the platform.

    As a sidenote, every frame has the same hight and width.

  • Hey diamantico21!

    If you adjust the angle right after the spawn action, it will automatically apply to the last spawned object only.

    See this capx: https://www.dropbox.com/s/wzylu65g7jhu6 ... .capx?dl=0

    I'm using the amount of sprites to determine the angle, but if you really prefer a variable, I suggest you set it to the remainder of the new value, so you don't have to adjust it everytime it gets to 361.

    For instance:

    > currentAngle = 0
    Evry 0.1 seconds
       Spawn Sprite
       Set angle to currentAngle
       Set currentAngle to (currentAngle + 1) % 360
    [/code:38vwdmx5]
    
    [EDIT] It seems your specific problem is you're using two different events for adjusting the variable and spwaning the objects. They should be both inside the same event, like above.
    
    Hope this helps. Cheers!
    

    Thank you.

    I never knew that the set angle event works just with the last spawned object and since I had other events going between the spawn and the set angle event it didn't actually work as intended.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm trying to experiment a bit with construct 2 and I got stuck while trying to emulate some of my favorite run and gun patterns.

    I want to create the same object every tick and every time it spawns it spawns with a different angle (from 1 - 360).

    I have a every tick event rasing a variable by 1; once it reaches 360 the variable gets reset to 1;

    -and here comes my problem-

    I spawn the object every 0.1 sec and If I try to set his angle equal to the variable above every istance of this object gets that variable.

    Any way to set the angle to the newest created istance of an object?

diamantico21's avatar

diamantico21

Member since 15 Nov, 2015

None one is following diamantico21 yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies