After unpause lines deleted

feromanferoman Member, PRO Posts: 130
edited July 2012 in Working with GS (Mac)
I'm starting to use systems code, Pause and Reset, without using behaviors "pause game" and "reset game".
So not loading when I press Pause button or Reset button.

In my case, I draw lines on the scene,
I press Pause, I can’t draw, so it works,
except that after the resumption of play, the lines are erased.

Something is missing, for that someone on the forum will help me:
I rely on members like "tshirtboot", "utopian games", "tenrdrmer" etc. ....
to help me, if they have the solution ............

Comments

  • feromanferoman Member, PRO Posts: 130
    nobody knows solve this problem in this forum
  • MotherHooseMotherHoose Member Posts: 2,456
    @feroman

    what is the behavior that unPauses your scene?

    can you post a screenshot of your rules/behaviors for that action?
    or write them in a post?

    for me … it is difficult to figure out what is wrong
    … when I do not know what is happening

    guessing … that when unPaused the scene or actor is reset
    and, of course, when the scene resets everything in the scene is in its original state

    perhaps having a boolean gameAttribute: paused

    adding a condition to the rule for drawing/touch: when game.paused is false

    on your Pause Actor: when touch is pressed change game.pause to true
    on your ending pauseActor: when touch is pressed change game.pause to false

    image MH
  • feromanferoman Member, PRO Posts: 130
    in response to MotherHouse
    to be more precise, here is a video for my problem,
    unpause after the line disappears.
    (remember I avoided to use the attribute "Pause game »)


    Uploaded with ImageShack.us

    You see, that line disappears
  • feromanferoman Member, PRO Posts: 130
    edited August 2012
    The assistance of MotherHoose, I thank
    but not enough! because this code I already know.
    for put on pause, I made
    game.pauseinteger to (game.pauseinteger+1) 2%
    also
    IF game.pauseinteger = 1, game.Pause Change Attribute (boolean) to 1 (true)
    Otherwise game.Pause (boolean) to 0 (false)

    all function conditons, except:
    I draw with my actor "segment"
    Rule: if game.Pause is false (by default this attribute is false) I draw.
    this is enough.
    Following the resumed after a pause, the lines drawn are deleted.

    unpause the work the same way as "to game.pauseinteger (game.pauseinteger+1)% 2"

    You have the video on the previous post.
    If anyone can help me to avoid erasing the lines.
  • MotherHooseMotherHoose Member Posts: 2,456
    edited August 2012
    I tried many times using @ORBZ Drawer demo
    with buttons for pause/unpause
    with the boolean … then with the modulo function

    all my lines stayed … either method

    recheck the code on the pause button
    (use only one type … boolean or index … for event calls)

    or does the drawingPaper have something to reset/spawn self?

    did you change any thing in the System Pen?
    I only added a condition after the mouse down
    … when game.pause = 0

    can you post a screenshot of the code for your pause?

    image MH
  • feromanferoman Member, PRO Posts: 130
    I tried many times using @ORBZ Drawer demo
    with buttons for pause/unpause
    with the boolean … then with the modulo function

    all my lines stayed … either method

    recheck the code on the pause button
    (use only one type … boolean or index … for event calls)

    or does the drawingPaper have something to reset/spawn self?

    did you change any thing in the System Pen?
    I only added a condition after the mouse down
    … when game.pause = 0

    can you post a screenshot of the code for your pause?

    image MH
    Message to MetherHoose:
    yes, I try to delete the condition "pause" the system "Pen"
    this one does not clear.
    But the problem during Pause, I draw, then it is not good.

    send me your screenshot of your code on the system "Pen"
  • feromanferoman Member, PRO Posts: 130
    @MotherHoose
    I did not answer, so I put the below screenshot:
    - Capture rule "pause" on player pause.

    image
    Uploaded with ImageShack.us

    - Capture of the rule on the "Pen system."

    image
    Uploaded with ImageShack.us

    Thank you to respond to my message.
  • MotherHooseMotherHoose Member Posts: 2,456
    you don't need lots of attributes … for pause Action

    demo: http://www.mediafire.com/?vn0vnctiomgk3yp

    image MH
  • feromanferoman Member, PRO Posts: 130
    I presume that with this file "draw Pause" download, it does not have a loading.
    thank you
  • MotherHooseMotherHoose Member Posts: 2,456
    any pause scene with intense graphics may involve noticeable loading time

    uncheck:
       Preload Art …
       also, things like layer scrollable if layer does not scroll
    and, the Physic functions to 0 and un√ moveable

    use: changeAttribute: self.Image instead of Change Image behavior
    have actors with locked to prototype behaviors … unless a controlActor

    image MH
  • feromanferoman Member, PRO Posts: 130
    it's OK to Pause, but to "reset" this is how?
Sign In or Register to comment.