totoyan's Forum Posts

  • thanks!

  • > yes, just like you did,

    > first step, create a new sprite object load images from your file and named.

    > secondly, create a global variable, on the start of layout, set this variable to random(sprite.animationFrameCount+1)

    > last, set sprite frame to variable.

    >

    Thank you so much.One question,I want to know how to set sprite frame to variable?Do you mean use the sprite event "load image from url"?Or any other way?

    ... i mean when you create a sprite object, import frames from your file and choose all your images, then set the event that "on the start of layout -- action: set sprite frame to int(random(sprite.framecount+1))"

  • yes, just like you did,

    first step, create a new sprite object load images from your file and named.

    secondly, create a global variable, on the start of layout, set this variable to random(sprite.animationFrameCount+1)

    last, set sprite frame to variable.

  • Closing, see the bug report guidelines and note that if the sine behavior is controlling the size then it will override other changes to the size (and mirror/flip are implemented as set negative width/height).

    so it doesn't a bug, and we need to find another way to change the object direction while changing the size

  • Problem Description

    ____ A concise description of your problem here ____

    when the object created and active on start set "yes" to adjusting size with sine behavior, it can't set mirrored or flipped.

    Expected Result

    ____ What do you expect to happen? ____

    we want to create auto change size fish at both side

    Affected Browsers

    • Chrome: (YES)

    Operating System and Service Pack

    ____ Your operating system and service pack ____

    win7 sp1 x64

    Construct 2 Version ID

    ____ Exact version ID of Construct 2 you're using ____

    r239

  • it looks nice !

  • Vegamon007 thanks a lot!

  • nice idea! but it is nice to their creator?

  • In lots of events i need to add a "wait 0 second" between two actions, sometime it's not enough then i add twice.

  • wow nice job!

  • Thanks for sharing!

  • Awesome! thanks!

  • Here try this

    http://headbangames.com/localstorage.capx

    OMG, i forgot the condition event " on canvas snapshot " and set localstorage value directly.

    now it works!

    thanks a lot !!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • don't wait in the same event to check for item exists, it'll probably take more than 1 tick.

    Add another event,

    - localstorage - On Item Set "snapshot"

    text set text"Snapshot exists"

    -- sprite load image from LocalStorage.ItemValue

    thanks your reply,

    i had been commented the "wait event",

    and i add your advised events but doesn't work...

  • there comes with a issue about the CanvasSnapshot,

    e.g.

    first test:

    -on the start of layout -- system take snapshot of canvas

    -- LoacalStorage set item "snapshot" to CanvasSnapshot

    //-- wait 0 second

    -- check "snapshot" exists

    -on " sanpshot" exists -- text set text"Snapshot exists"

    -- sprite load image from LocalStorage.ItemValue

    then, text shows "Snapshot exists", but sprite load nothing...

    another way the same step:

    -on the start of layout -- system take snapshot of canvas

    -- LoacalStorage set item "snapshot" to CanvasSnapshot

    //-- wait 0 second

    -- check "snapshot" exists

    -on " sanpshot" exists -- text set text"Snapshot exists"

    -- sprite load image from CanvasSnapshot

    then, text shows "Snapshot exists", and sprite load the CanvasSnapshot

    so does the localstorage cannot save the CanvasSnapshot?

    how can i take the CanvasSnapshot then save it or load it?

    looking forward to your replies, thanks!