shinkan's Forum Posts

  • Now it's perfect, thanks I've learned events...again :)

  • It's like normal lerp really. anglelerp(a,b,x) ie. anglelerp(sprite.angle, 90,dt)

  • anglelerp?

  • n creation you directly set a random angle, and then you store it in Last_Left_Angle to discard it afterward

    Yann Yes i know... I was playing with that stuff trying different solutions.

    I've tried your code but it still gives me same thing. Newly created sprite still can have angle from previous one.

  • <img src="http://dl.dropbox.com/u/34375299/Construct%202/issues/random%20angle.jpg" border="0" />

    still wrong,I'm really missing something obvious here.

  • Probably you are saving your file without alpha/transparency and that square around it is most likely your background from paining (edit: lol is that a word? pain+ing? - painting i meant) is application.

    as Savvy001 asked, are you saving your file as jpg or png?

    If jpg you won't have transparency. Have to use something that support alpha - png, tga...

  • haha yeah, it's a harsh solution but will do for now ;)

    get well sqiddster :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for answer sqiddster it should work but it's not :/

    floor(choose(random(0,Last_Left_Angle-90)/90,random(Last_Left_Angle+90, 360)/90))*90

    if Last_Left_Angle = 90

    then choose(random(0,0)/90, random(180,360)/90)*90

    • choose(0,[2 or 3 or 4])*90
    • will give 0, 180, 270, 360 - correct

    if Last_Left_Angle = 180

    then choose(random(0,90)/90, random(270,360)/90)*90

    • choose([0 or 1], [3 or 4])*90
    • will give 0, 90, 270, 360 - correct

    but sprites still are on the same angles :/

  • haha, thanks Kyatric

  • On my desktop computer, I do have some widget on the desktop that allows me to keep an eye on the performances of my nvidia graphic card, giving me the amount of VRAM used/available, usage percentage, etc...

    Could you share a link?

    Edit: To the widget, not your desktop ;)

  • Here's what i have.

    Event 4 is checking if newly created sprite angle is equal to the previous sprites angle. If both angles are equal then it sets new angle for new sprite.

    Example:

    If first sprites angle is equal 90 then second sprite is set to random(angle), but this random(angle) for second sprite can produce angle equal to 90 as well.

    How can I prevent this?

  • Ashley no, not a bug. But you could mention that somwhere, manual maybe or anglelerp exp. itself in editor, cause it's a bit confusing at begining.

  • It is weird behavior. I've deleted everything except layouts Game and Menu and it works correclty. Then I load capx again and did exactly the same and it's not working :)

  • Thanks

  • It's not lerping correctly - or am I missing something?

    System: "something" -> Sprite | Set angle to anglelerp(self.Angle, 45, dt)

    Red square indicates current angle of the sprite.

    <img src="http://dl.dropbox.com/u/34375299/Construct%202/bugs/alerp01.jpg" border="0" />

    Works as it should, nothings wrong here.

    But if sprite angle is changed to something different than 0, like here for example:

    <img src="http://dl.dropbox.com/u/34375299/Construct%202/bugs/alerp02.jpg" border="0" />

    Sprites angle should rotate to "green" position instead it's going all the way to "red" position (original angle position).