Member Posts: 37

Hello guys! this is pretty simple thing to do (in my head) but I just don't know how to "import" that "logic" from my head to GameSalad!

I am trying to achieve this - If I move (press and drag) my actor along the Y axis, every Y+100 that he moves _ play sound.

So, every time my actor moves +100 pixels UP, play sound.

Thank you on you're time guys, i really appreciate you're help!

• Posts: 2,313

if self.position.Y >= self.saveY+100
do
change self.saveY to self.position.Y
play sound

# ✮ Available for hire! support@gsinvention.com ✮

• London, UKMember Posts: 1,893

A couple of questions that might help if answered:

*Are you allowing the actor to be dragged down at all and does that affect the up count? i.e. if you drag the actor up 40, down 10 and then up again by 20 are you counting that as only going up 50 pixels or 60 pixels?
*Is it basically at every 100 pixels on the screen/scene i.e. if y = 100, 200, 300, 400, 500, 600 etc. I'm not saying you would write an if line like this but you could achieve this with mod if so.

• Member Posts: 37

@KevinCross, @timolapre1998 hey guys! Thank you a lot on you're time and effort to help mi with my problem . The solution from @timolapre1998 worked perfectly! Thank you one more time!

@KevinCross if you have a different solution to this problem, i would like to know about it! Let me answer you're questions. 1. - I am allowing the actor to be dragged down, 2. - i am counting that as 50 pix, 3. - That is the idea!

• London, UKMember Posts: 1,893

@RedCubeGames said:
@KevinCross if you have a different solution to this problem, i would like to know about it! Let me answer you're questions. 1. - I am allowing the actor to be dragged down, 2. - i am counting that as 50 pix, 3. - That is the idea!

I don't have another solution. @timolapre1998's solution looks good enough.