GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Stop repeating

casparwyliecasparwylie Posts: 15Member
edited July 2012 in Tech Support
hello,


I have a problem that is probably EASY to fix.

i have a rule that says "When All conditions are valid: Attribute game.comp1 = 1:


for 10 secs (do not run till completion):

Move To: (do not run till completion)

xxxxxx
x
xxxxxx


Display Text:

xxxxxxxxxxxxx



After 10 secs:


Change scence:


xxxxxxx "




Now, my problem is, is that i only want it to display the text, and move the actor once,

at the moment it moves, then goes outside the visible scene, then moves back again, etc….untill game.comp1 does not equal 1, but i only want it to do the above once!


What am i missing?


Thanks!

Best Answer

  • gyroscopegyroscope I am here.Posts: 6,577Member, Sous Chef, PRO
    edited July 2012 Accepted Answer

    That's OK, strange it's still repeating; perhaps we'll look at that problem again later if it doest get fixed.

    In the meantime, to answer your other question: self.YourMovingActor.Position.X, etc., is found via the Attribute Browser. This opens when you click on the 3 little dots in the Interpolate behaviour (as well as other behaviours).

    So when it's open, you click on the name of your actor, then "Position" and then double click on X. It'll appear in the field as you want.

    By the way, I mislead you a little bit: it'll be in the form of self.Position.X where self is your moving actor... (not self.YourMovingActor.Position.X)

    I'm thinking you might benefit by going through the GameSalad manual and you'll come across more of these hidden aspects in the Creator. Only thing is, the link has disappeared from the stickies for some reason.... hopefully someone else will know where it went....

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Answers

  • gyroscopegyroscope I am here.Posts: 6,577Member, Sous Chef, PRO
    edited July 2012

    @casparwylie

    Hi Caspar, it's because the Move To behaviour has a timer associated with it; there's some sort of clash...

    So not completely understanding if you want your actor to move to it's new position, and take 10 seconds doing it; or move quicker than that but then wait until the 10 seconds is up before you go to the next scene...

    Either way, 10 seconds is a long time in the gaming world.... you might get your users drumming their fingers!

    So try the following (including changing the Move To behaviour to Interpolate, if it really doesn't matter that it can't be interrupted...):

    Version 1:

    Rule: When All conditions are valid: Attribute game.comp1 = 1:
    Interpolate behaviour over 10 seconds
    xxxxxx
    x
    xxxxxx


    Display Text: xxxxxxxxxxxxx

    Timer: After 10 secs:
    Change scene: xxxxxxx


    Version 2:

    Rule: When All conditions are valid: Attribute game.comp1 = 1:

    Interpolate behaviour over 2 seconds ---as an example
    xxxxxx
    x
    xxxxxx

    Display Text: xxxxxxxxxxxxx

    Timer: After 10 secs:
    Change scene: xxxxxxx

    Surely it can't be version 2.... I'm still confused why you need to wait a whole 10 seconds before changing scenes....

    Anyway, hope that's some help.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • casparwyliecasparwylie Posts: 15Member
    I am on an Itouch so can't test it now, but firstly thanks for the quick reply!

    So the reason it's 10 is because it's a warning that comes up that may take 10 seconds to read!!!!! Sorry I can't test now. But when I get to my computer it will be the first thing I do!

    And then I should be able to except your answer!!! Thanks again and I will say if it is a success!
  • casparwyliecasparwylie Posts: 15Member
    ok, just drag 'interpolate to the rule and it seems quite a different thing to what i have used before, how do is work? Thanks.
  • gyroscopegyroscope I am here.Posts: 6,577Member, Sous Chef, PRO
    edited July 2012

    It's really straightforward, though you'll need 2 interpolate behaviours if the actor moving, changes both axes, one for X nd one for Y.

    Interpolate attribute: self.YourMovingActor.Position.X
    --- same for 2nd one except position.y-----

    To: ----your X or Y new position

    Duration: time to get to it's destination in seconds

    Function: constant speed to destination (linear) or variations of speed starting and/or finishing

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • casparwyliecasparwylie Posts: 15Member
    right got it, so it works but still repeats, there is one thing, i put :

    Interpolate attribute: self.Position.X etc.

    Because i do not understand about how to get self.YourMovingActor.Position.X .

    Thank you very much for all this help and time!!!
  • casparwyliecasparwylie Posts: 15Member
    OOh, thank you, well in fact i had a command afterwards that was screwing it up!!!!
    So its not repeating know!!! Thanks for all the help!
This discussion has been closed.