The logic for getting a character to move around an area?

Hi,

I’ve got a rig setup for a character, and it moves, I can get it to animate in the engine.

I just want it to move around.

How would I create something like that?

Near, And, what ever.

Does there need to be an object located somewhere for the model to go to it. Like a cube, sort of a sensor?

Attachments


You have to decide what you want to trigger the animation and movement.

To move it, parent the rig to a dynamic cube and in the game move the cube around.
If you want it simply to always move add an always and connect this with a motion actuator on the cube object. Then while this is happening also play the walking animation.

The questions you have been asking literally have built-in solutions, do some research man!

Also, tinker and play :slight_smile:

download examples of stuff from resources

get your hands dirty, throw stuff away. start new stuff with new thoughts each time, you will able to reach your current progress in moments in the future.

your game is not the important thing, your skills are for now*

I suppose I want the character to run around, but not sort of like a mad yo yo. Have stationary moments, and then move around.

I have been reading the game development book, and the video site has assisted me with various examples in the first place, and a few examples from here.

So Wissam instead of nagging on, I have done some research. I probably lack the skill to workout programming intiuitively. You may be better at some tasks than I.

I imagine keyframe animation would be the way to go, Location around the perimeter of the deck.

I know what it’s like to try to get any help as a noob.

Do you want to have the character move around by itself, or do you want it to be directed by the user through the mouse or keyboard?

No, totally AI, it wouldn’t make sense for it to be controlled.

I can get it to go around and animate it, I have a sound effect to add to it. So moving around the deck randomly, and then may be a delay and then again moving around the place.

You can use a steering actuator and whenever it reaches the destination it switches to another state where there is a delay and after that switching back to the original state and picking another random destination and going there and repeat the whole thing.

This video should help you:

Thanks, but unfortunately that is using code.

For now I’m sticking with the bricks.

I’ll keep this character’s movement circular, but I’d need it on the spot, as eventually the cube in motion just sort of swings around and will eventually leave the map.

Could be a rotation animation of the cube be a better option.

Can you show us what you have right now? It would help.

I imagine keyframe animation would be the way to go, Location around the perimeter of the deck.

That would work for moving the character around on its own. You could then set up an empty or another object that when the character gets near enough it triggers a Near sensor that causes the character to delay for a certain length of time. That should be easy to set up. You’ll need a property on the character that the Near recognizes.

You can use the Follow Path constraint in Blender Render to create the movement as an action, then bake the action to keyframes and use that in the BGE. I’ve found out the hard way that the BGE doesn’t allow you to use the curve modifier, which you will need to use with the Follow Path constraint.

Hmm, as for the bake procedure, I don’t know about that.

The character itself is there for atmosphere really, a demo project.

It will have a sound effect, I can easily add, but only works when the FP is near it.

But the motion of it is what is important. I don’t think a keyframe animation would work very well.

Really? In this video the curve modifier seems to be working fine.
Skip to 7:15

Really? In this video the curve modifier seems to be working fine.

Yes, really. In the video you linked to, the road that follows the curve isn’t expected to move at all, which makes a difference. Try using a curve modifier to set up a path to direct the movement of an object in the BGE. It doesn’t work.

I tried a simple forward location animation, but that didn’t work. It didn’t move forward.

What logic bricks did you use? How did you configure them?

None, I’ve deleted the bricks, it just remains static with a sound effect. I’m more concerned about the robot, since that is more interesting.

You won’t get much help with the way you fail to accommodate anyone who tries.

I’m not bothered about it, the character leans against the pillar, end of. The robot is driving me mad, I repeat the processes wissam did in an example file and it doesn’t work out.

I’m also working on the new face, hopefully should solve that glitch or whatever is causing that error with the other character.

I’m scheduling my demo release lower deck for May 26 with all the pieces, but I had to change plan with my agenda. So I want the robot to work for sure.