Looking for Random Hummingbird type Movement
floatingwoo
Los Angeles, Calif.Member Posts: 393
I have a little "Flappy bird" like animated character that can be moved with a mouse click with Interpolation.
When attribute game.mouse.button is true_
Change attribute:game .clickX to game.mouse .positonX
Change attribute:game .clickY to game.mouse .positonY
Interpolate attribute:self.position.X to game.clickX
Interpolate attribute:self.position.Y to game.clickY
And then I have my animations set up...
I have no gravity (accelerate) setup it's not like a side scrolling game. What I would like to do is give him a little life by creating small random movements when he is hovering. Sort of like a Humming bird. Especially when he is still, it might be cool if there were randomness in his flight path too but not necessary.
Any ideas of where to start? Like change attribute: self.positionx to game.clickx + random????
Comments
Here's a little demo, it's quicker to make than to explain, but basically move the object in a 'circle', but with all the values screwed up and compounded with more screwed up values, hope that makes sense (it makes no sense to me and I wrote it).
File attached:
Click somewhere on the screen.
@floatingwoo said:
Here's a version (file attached) with more randomness in the flight path (the move between the current position and the clicked position).
@Socks I always like how much "life" your creations seem to have.
Do you mind if I use this for the last page of my book when it's published?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
If by 'life' you mean 'sine wave', then yes
Lol
To increase or decrease the amount of randomness in the flight path . . . (using the 2nd demo "Humming Bird2.zip") . . .
Same thing, what is life other than a sine wave?
Follow us: Twitter - Website
I think @Socks needs to get out more.
...check that, we would miss out on stuff like this!
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
What is this 'out' ? Sounds good, can you get it delivered to your home ?
A cosine wave ?
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
You can but you have to be there to sine for it.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Crop circles ... anyone make the connection?
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
... cos it's not free!
@tatiang, you missed that
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Sorry for all the tangents. We're happy to help if you have other questions!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Just don't drop it on the floor, it may contain a log, probably 10 of them.
Ooo now that's good, hard to tell if intentional or just being a mod()
Follow us: Twitter - Website
Thanks guys, much more than I expected . You rock!!!
Wow, you guys are much better at this than me. Are they just random() things that pop into your mind??
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
That demo made me laugh, thats funny looking on it's own!
Can someone help me adjust the hummingbird example for touch? Sorry if that sounds dumb - but I'm new to all of this and its hard for me..
@monkeyboy simian said:
It works with touch as it is.
oh - I thought that you had to change those bits depending on what platform you intend publishing to.. Does that all get converted through GS automatically when you publish? It's just that all of those references to click and mouse make me think that it's meant for a desktop.
Mouse click = touch on a tablet.
so I can just use those click and mouse settings and GS understands that it needs to be converted when being published for tablet/phone etc?
Converted to what ?
It seems to me that GS can accept any input and at the time of publishing, make it work on whatever device that you designate? Is this true? Sorry if I sound remedial - but I think I am.. I am trying though.
Have I annoyed you? Sorry if I did.
What ?!?
P.S. if you just post in a thread without alerting the person your post is aimed at they are very very unlikely to see your post. Think of it like picking your phone up and starting to talk in the hope that maybe, somehow, the right person will hear you ! In the same way that you need to dial an actual number, you need to notify someone that you are attempting to talk to them. Otherwise you are relying on someone just happening to spot that there's been a reply in a thread they posted in days/weeks/months ago, a little like replying on the person you want to speak to on the phone just happening to wonder passed !