[SOLVED]Add ".Play" behind a statement

Started by arj0n, Mon 26/07/2010 19:48:57

Previous topic - Next topic

arj0n

The following code causes an object to move, how can I add "aClick.Play();" to this line?
The object should move and aClick should be played...


else if (((myobject.X+120<=oBlock4.X && myobject.Y-60==oBlock4.Y-120) && myobject.X <=420 &&
             myobject.ClickedRightHalf())) myobject.Move(myobject.X+60, myobject.Y, 10, eNoBlock, eAnywhere)

Sorry if this question is a bit silly but I can't figure it out myself at the moment... :-[

Matti

...with brackets?

Code: ags

else if ((myobject.X+120<=oBlock4.X && myobject.Y-60==oBlock4.Y-120) && myobject.X <=420 && myobject.ClickedRightHalf()) {
  myobject.Move(myobject.X+60, myobject.Y, 10, eNoBlock, eAnywhere);
  aClick.Play();
}


Or what do you mean?

Oh, and 1x "()" was superfluous and you forgot a semicolon ;)

arj0n

Ahhh, an opening bracked before the move statement and a closing bracket after the play statement.
Thank you very much  :)

And yes, I forgot to copy-paste the semicolon ;)

SMF spam blocked by CleanTalk