How to make a sound when slashing at any angle?
Dell7730
Member, PRO Posts: 388
How would you make a rule that if you move an object ay any angle and goes more than 5 velocity, you play sound?
Best Answer
-
RThurman Posts: 2,880
You could use the magnatidue function. Like this:
magnitude( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y )Here is a quick demo that changes color (not sound).
Answers
thanks, i'll try that tonight
for some reason the link of the sample file is not showing up anymore, can you please provide the link again? thanks.
The forums software has a bug that removes attached files when a post is marked as "Answered." Lovely, huh?
You can notify another user like this: @RThurman
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
still waiting for that sample file, lol
Second try:
Awesome! Thanks Very Much
@RThurman
your demo, it works but only if your mouse starts from the middle of the actor, how can I make it work outside of the actor anywhere on the screen?
Hmm..... it works on any place on the screen on a Mac. Is this a PC problem?
But beyond that, it only was meant to demonstrate how to determine the speed of an actor. (Not how to do a swipe.) You can get the actor to move in all sorts of ways and the "speed detection" will still work.
Yeah, it would seem like there's a lot of things that don't work on pc version, lol... let me try it on my phone and let you know if it works and thank you again
You are welcome!