combo scoring

djdeedjdee Member Posts: 180
hi,
I have an actors called evil that when touched it destroys and changes attribute to game.score to game.score+200. i have created another actor called combo and a game boolean attribute called double. In the combo actor, when it is touched it destroys and changes attribute game.double to true and in the same rule theres a timer that say after 3 sec change attribute game.double to false. In my evil actor i have passed rules that if attribute game.double is true change game.score to game.score+400. it seems to work fine. but game.double does not go to false even after the timer is set continues going on after 3 secounds and never goes.

Best Answers

  • youdvdkyoudvdk Posts: 21
    Accepted Answer
    maybe put a timer and change attribute behaviour in otherwise, and set that to something like timer- after __ seconds change attribute game.score to game.score+0.
    i hope this helps if you haven't found a solution already.
  • jckmcgrawjckmcgraw Posts: 647
    Accepted Answer
    When you destroy the actor, the timer cannot run because the actor is destroyed. That's why it isn't triggering.

Answers

  • djdeedjdee Member Posts: 180
    i have the screen shots but dont know how to upload it here... :(
  • jn2002dkjn2002dk Member Posts: 102
    edited May 2012
    Did you check the run to completion box in the timer?

    Also, do you really need a boolean and rules to check it?
    Wouldn't it be easier to make the double variable an integer and then just multiply the score with it when adding to score?

    That way you wont need to check if it's true or false
  • djdeedjdee Member Posts: 180
    hi @jn2002dk
    yes, i have checked the run to completion on the timer
    no its not compulsory to have boolean
    thanks for the suggestion will try doing it and will let u know if it works... thanks :D
  • jn2002dkjn2002dk Member Posts: 102
    edited May 2012
    hi @jn2002dk
    yes, i have checked the run to completion on the timer
    no its not compulsory to have boolean
    thanks for the suggestion will try doing it and will let u know if it works... thanks :D
    np:)

    Do you have the timer behavior before or after you destroy the actor?

    Try putting the timer behavior first, maybe that's the issue

  • djdeedjdee Member Posts: 180
    hi jn2002dk
    i tried as u said but its the same issue.. it does not work. it adds combo points but after that it does not stop adding it. :(
  • jn2002dkjn2002dk Member Posts: 102
    hi jn2002dk
    i tried as u said but its the same issue.. it does not work. it adds combo points but after that it does not stop adding it. :(
    And you have the timer behavior first in that rule?

    If so, maybe move the timer behavior to your player actor instead? Make a collision rule and put it there

  • djdeedjdee Member Posts: 180
    @jn2002dk
    i tried shifting the time up too. i dont know whats not stopping it.. if u dont mind ill send u the file pls have look
  • jn2002dkjn2002dk Member Posts: 102
    @jn2002dk
    i tried shifting the time up too. i dont know whats not stopping it.. if u dont mind ill send u the file pls have look
    I'm not at home with my mac right now so i can't look at it until tonight but if you could post screenshots maybe we can figure out what's wrong:)

  • djdeedjdee Member Posts: 180
    am a newb here so dont know how to upload the screen shots... sry
  • jn2002dkjn2002dk Member Posts: 102
    am a newb here so dont know how to upload the screen shots... sry
    np

    I'm at my mac now so send me the file and i'll take a look or you can just upload a screenshot to an image host and i'll have a look there
  • djdeedjdee Member Posts: 180
    my file is in the office mac... but i had stored the screen shots in my pen drive.... so here they are

    http://postimage.org/image/g8tgke4nv/

    http://postimage.org/image/v61xlehwb/

    http://postimage.org/image/xc0ttnaqj/
  • djdeedjdee Member Posts: 180
    @jn2002dk
    and if u want me to send the file pls give me ur email id :)
  • jn2002dkjn2002dk Member Posts: 102
    Looks good to me

    Did you try simply deleting your time behavior and making it again?
    Oh and don't use the expression editor (the small e button) when typing true or false

    Worth a shot
  • djdeedjdee Member Posts: 180
    hey..
    no i dont use the expression button for true or false.
    and without timer i dont think u can do this... cuz u need to tell the double power when to stop adding double points... so i guess it is important to use timer.... can u give me ur email id where i can send the file so that u can have a better look... thank u for ur patience and suggestions.. :D
  • jn2002dkjn2002dk Member Posts: 102
    hey..
    no i dont use the expression button for true or false.
    and without timer i dont think u can do this... cuz u need to tell the double power when to stop adding double points... so i guess it is important to use timer.... can u give me ur email id where i can send the file so that u can have a better look... thank u for ur patience and suggestions.. :D
    np:)

    Yea, i meant deleting the timer and then remaking it:p

    Send the file to jn2002dk@gmail.com and i'll take a look at it

  • djdeedjdee Member Posts: 180
    @jn2002dk,
    hey
    i have mailed u the file :D pls have a look..
  • djdeedjdee Member Posts: 180
    hey @jn2002dk
    for some reason even i cant open ur file that u mailed me. can u please share screen shots or explain how did u get that thing working. :D thank you
  • djdeedjdee Member Posts: 180
    hey @youdvdk - ill try doing this... lets c if this wrks...
    hey @jckmcgraw - yes it does not do that...
  • jn2002dkjn2002dk Member Posts: 102
    hey @youdvdk - ill try doing this... lets c if this wrks...
    hey @jckmcgraw - yes it does not do that...
    Didn't you get the working example i send you and the behavior screenshot?
  • djdeedjdee Member Posts: 180
    edited May 2012
    hey @jn2002dk,
    yes i got it.. and it works .... :D but just 4 my knowledge i wanna c wht are the other ways that we can do this.... :D
  • jn2002dkjn2002dk Member Posts: 102
    edited May 2012
    hey @jn2002dk,
    yes i got it.. and it works .... :D but just 4 my knowledge i wanna c wht are the other ways that we can do this.... :D
    Ok cool
    Was worried for a second that you never got it:)
  • djdeedjdee Member Posts: 180
    @jn2002dk,
    thanks jn2002dk .... ur very helping and friendly....... :D
Sign In or Register to comment.