Zathan's Forum Posts

  • Hehe perfect

    Thanks again, !

  • So, I know this isn't a solution for the bug, but it is a good workaround. See the attached capx.

    Use a separate controller to hold the sine behavior off screen. Then multiply the size of the sprite you want re-sizing by the difference in the original controller size and the current controller size.

    Thank you, dude

    It's a very good workaround.

  • Problem Description

    I have a sprite that spawn with random size. but when I put the sine 'size', the sprite always spawn with the default size.

    Attach a Capx

    https://dl.dropboxusercontent.com/u/191 ... nebug.capx

    Description of Capx

    A simple example of the problem.

    Expected Result

    Sine could not reset the sprite size to the default value.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    Windows 8.1

    Construct 2 Version ID

    r170

  • Works fine when i try it.

    I discovered the error... is with the 'size' sine.

    How can I fix that?

    Thanks

  • I have a sprite that spawn with random size. but I want to put sine in it.. and when I do this, the sprite spawn with the default size... it is a bug?

  • 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 do something like that too... but html5 doesn't help much..

    For example, my pc doesn't open a .capx with a very large layout. A resolution like 20k x 20k just crash everything.

    I think something like that can't be done for now. *my opinion. I tried, but got nothing*

    Good luck.

  • >

    > > Yes 6000x2000 it's perfectly fine

    > >

    > > Check this post https://www.scirra.com/forum/viewtopic.php?f=146&t=97614&hilit=+layout+size I've put an example there with 20.000x20.000 and it still works fine. And Ashley there explains some stuff about layout too.

    > >

    > Thank you very much

    > Very cool explanation. But.. when I try to open the 20kx20k example, my pc just crash lol

    >

    Well. That answers your question - at least for your pc abilities to handle large games (in size not content)

    hehe it's true..

    Thanks bro

  • Yes 6000x2000 it's perfectly fine

    Check this post https://www.scirra.com/forum/viewtopic.php?f=146&t=97614&hilit=+layout+size I've put an example there with 20.000x20.000 and it still works fine. And Ashley there explains some stuff about layout too.

    Thank you very much

    Very cool explanation. But.. when I try to open the 20kx20k example, my pc just crash lol

  • Layout in theory do not have any size limit - but you should keep the size reasonable.

    it's something like 6000x2000 reasonable?

    What's 'reasonable' for you?

    Thanks

  • Did the layout have any limit?

    For example... the game Limbo have no loadings, so the level is just one, right?

    Can I achieve something like this with C2?

  • What about that cast shadows? is a third-party plugin?

    edit: oh sh... I haven't seen the new update

  • Here, look at this capx:

    [attachment=0:28pn47nj][/attachment:28pn47nj]

    Input a number (0-640) into the text field and hit ENTER. The object will move to those values (on it's horizontal axis). The trail is just for cosmetic purposes

    Perfect!

    Thank you very much, dude

  • Tell me what you wish to do when the key is pressed. Move an object from point A to point B? Also, please verify, is the key press a trigger that it fires just once, or you will have to hold the key pressed in order to complete the lerp action?

    I want to trigger just once... the object must move smooth from point A to B.

  • Can you be more specific? The lerp takes 3 values, one as a starting value, an other as an ending value and a third one that determines how much in-between of these two values you will get.

    For example: lerp(10, 20, 0) is 10, lerp(10, 20, 1) is 20 and lerp(10, 20, 0.5) is 15. That is of course when you trigger it once. If you triggering the lerp every tick (as when a key is pressed down), you will gradually get the second value and the speed by which it'll get there is determined by the third value. A lerp(10, 20. 0.01) will have a slow transition towards 20, while a lerp(10, 20. 0.9) will reach 20 almost instantly.

    Of course there are other ways to move stuff around. Have a look to the moveto behavior () and to the Litetween/EaseTween behaviors (https://www.scirra.com/forum/viewtopic.php?t=70700&start=0). These are very useful tools!

    And here, in this example you can test the lerp speed in action. Use the mouse wheel to increase/decrease the 3rd value which determines the speed of the lerp.

    Awesome example, dude

    But I want a way to use the lerp whit 'on key pressed' for example... with a trigger, u know?

    How can I achieve that?

    Thanks

    edit: preferably, I want do this without plugins.. that's why the lerp question.

  • Like when a key is pressed. Thanks