Quexinos Posted July 18, 2009 Report Share Posted July 18, 2009 Basically I want to do an engine like the tiny chao garden. Has anyone done something like this before? What I want to know is is it possible to have your pet move around the screen at random intervals? Does that make sense? Link to comment Share on other sites More sharing options...
OverbounD Posted July 18, 2009 Report Share Posted July 18, 2009 Its possible in Game Maker, MMF, or any number of programing languages but it'd help to know what program or language you are talking about. Link to comment Share on other sites More sharing options...
Quexinos Posted July 18, 2009 Author Report Share Posted July 18, 2009 Yep I just came back here to edit my post to mention that XD You reply too fast I was talking about MMF I know how to make a counter display a random number, I Just need it to display a random number at a random set of time Link to comment Share on other sites More sharing options...
OverbounD Posted July 18, 2009 Report Share Posted July 18, 2009 I don't know MMF well so I cannot help you sorry. But eh if you ever thought of switching to Game Maker here's a game called Chao Life made in it. Chao Life GMC Link to comment Share on other sites More sharing options...
LarkSS Posted July 18, 2009 Report Share Posted July 18, 2009 You could just use a timer countdown. You would have two counters for this. The first counts down and the second decides what action the chao shall take. Whenever the first counter's value is 0, it sets the second counter AND itself to a random value. The second counter is set so that a new action can take place. Why is the first set to a random value too though? This counter will count down from its value back to 0, in which a new action can take place again, and by setting it up to a random amount, the chao can actually randomize action at random time intervals! Here's an example. Let's name the first counter Duration and the second counter Action. If "Duration" = 0; Set "Action" to: random( *number of actions here* ) Set "Duration" to: random( 120 ) + 30 If your game runs at 60fps, adding 30 will always have each action last for half a second minimum and the random 120 will allow each action to last roughly 2 seconds max above the minimum. Always; Set "Duration" to: "Duration" - 1 I realize it's not EXACTLY Multimedia Fusion 2 syntax, but it should be close enough for you to understand what's going on and be able to adapt it to your own needs. Also remember, setting the duration to your fps is the same as it taking 1 second to count down. 1 Link to comment Share on other sites More sharing options...
Quexinos Posted July 18, 2009 Author Report Share Posted July 18, 2009 ahh that actually makes perfect sense, thank you so much. I would have never thought of that... uihm do you want me to poz you? I don't have much rep to spread >_> Link to comment Share on other sites More sharing options...
LarkSS Posted July 19, 2009 Report Share Posted July 19, 2009 Lol don't worry about it; it's all just in the spirit of helping. ;> Link to comment Share on other sites More sharing options...
Quexinos Posted July 21, 2009 Author Report Share Posted July 21, 2009 I just want you to know that this worked beautifully, thank you. Link to comment Share on other sites More sharing options...
Recommended Posts