-
Some basic questions
Hi there!
I was just wondering some basic things.
1. How do I make an object move towards another object?
2. How do I make footstep sounds? (Like when you walk, you can hear footsteps... And when you don't walk, you don't hear footsteps.)
3. When an object shots out a specific object, can I maike it stop after a certain distance then?
I might post more questions as I can't come up with any more now. Answers are very appreciated!
-
Re: Some basic questions
1. You can set an Object to say something like Ball Movement, then add Always look in direction of player. For platformers see my example at my website for the PMO and AI.
2. You could have Speed is greater than 0 - Play and Loop Footstep Sample. Then add Speed = 0 - Stop Footstep Sample.
3. For this one depends on what you want to have happen. If you're talking about bullets disappearing after a certain distance, you could have Bullet is in Play Area - Always add 1 to Alt Val A of Bullet. Then If Alt Val A = Whatever number you want, destroy bullet. You're going to have to play with the Alt Val number to get it to stop at the correct distance.
Hope that helps
-
Re: Some basic questions
The ball movement thing worked perfectly. Thanks!
When I set the footstep thing my sound plays when I walk and so forth, nothing wrong with that. But I don't think MMF gets that it's only supposed to play one sample of it at a time. So it plays the song like a hundred times on top of each other. Hope you understand what I mean. Don't know if it's a bug just on my computer or if it has something to do with the file-format on my sound.
I wasn't actually thinking about bullets here. I was thinking more of like blood or something. When my bullets hit my enemies the "shoot out" blood then they stop after like 1 meter or so. If you get my point.
-
Re: Some basic questions
Ok for the sound you should add "Only one action when event loops" that should stop it from trying to play the sound repeatedly.
For the blood, before you destroy the blood active, add an event to "paste into background". You can find this in the Animations events. If you want a trail of blood, you'll have to add something along the lines of "Every 20/100 of a second, create blood splatter at 0,0 from "Shoot Blood", and paste into background, destroy blood splatter. Again, you're going to have to play with the timing to find what looks right.
Alternatively, instead of creating a blood splatter object, you might just try pasting the Shoot Blood into the background every 20/100 of a second, and bypass creating a blood splatter object completely. Not 100% sure on that, but worth a shot as that would be easier.
-
Re: Some basic questions
The sound works fine now.
For the blood part, I'll test that one later. Thanks! This really helped. I owe you one. : >
-
Re: Some basic questions
For the blood, you could use a bouncy ball movement for the blood objects, and give them a little decaleration, and make them destroy or paste into a backdrop and then destroy, when stopped.
-
Re: Some basic questions
For the blood, you could use a bouncy ball movement for the blood objects, and give them a little decaleration, and make them destroy or paste into a backdrop and then destroy, when stopped.
-
Re: Some basic questions
For the blood, you could use a bouncy ball movement for the blood objects, and give them a little decaleration, and make them destroy or paste into a backdrop and then destroy, when stopped.
-
Re: Some basic questions
Or make a bullet animation for disappear that splats blood and then at the end of that animation paste into background...
-
Re: Some basic questions
Aye, I think I've got the blood bit now. :) Thanks all!
But actually, I've got another question here... When I play one of my games, it stops creating abjects att 500 objects. Is there any way to get past this limit, so it could be up to like a 1000 objects on-screen at a time?
-
Re: Some basic questions
In the frame properties you can change it up to 20,000.
Marv