What can and can’t be done in GE? I wanted an object to appear when my player goes near another object. I was trying to do this with layer ipo but guys found out it does not work in GE. I also wanted to make a NPC head to track my player location when my player comes close enough to that NPC. I tried to add a copy rot constraint from the bone to a box and than apply track to from the box to my player. That also did not work. Is there any more on what the Blender GE can do and not do?
The “make me a cool game” button is broken…
everything has to be done manually now
Try this in the meantime… it explains a bunch of nice things
Can’t really find what I’m look for.
I think you have solved these problems
For the visiblity thing didn’t the visible and invisible actutor.
For the track to actually i don’t know what do you mean by NPC - may be if you post some screenies show which object to track what i will try to help. There are more than one ways to solve a problem. So even if i don’t know to use a armature to Trackto there may be some other way.
But i would need information on the problem to solve it
NPC = None Playable Character
For the object been visible, I can only get to be visible once and than it won’t rest back to been invisible. Whats more, been invisible is not what I want. Even if the object is visible, it is still there just that you can’t c it. Thats not what I want.
Shellfish, these things can be accomplish in the BGE rather easily, you just need to know how to do them.
To have the NPC’s head track to the player, you need the head to be a separate object from the body, then use a TrackTo or some very complicated Python utilizing the Orientation Matrix.
To have the object appear when the player gets near a different object, you could use Visible/Invisible or you could use an empty and an Add Object actuator. Put a counter on the empty if you only want it to add the object once. Also, you could use an alpha IPO (ColA in the Object IPO’s panel). Just start the object at invisible (ColA with a value of 0), then animate to visible (ColA with a value of 1) when the player gets near the other object. This has the added benefit of allowing for a slow fade in.
Edit: You edited while I was posting. It seems the “AddObject” solution would work best for you. You can still combine that with the fade in animation, though, if you’re sharp enough.
What you mean by counter? How do I add it? and If i separate the head object wont it look weird when the head moves as the neck will not link to the characters body.
One more thing is why my character is able to go through a building or a invisible wall if I press and force it through ?
With GLSL you can do a lot. You’ll only have to make a script and voilá, you get parallax-bump mapping.
Try reducing the value in the motion actuator. That might help with your collision problems.
A counter would be a value that keeps count of something. You would add a new property called “counter” (no quotes), set it to Int, and give it a value of zero. Then instead of using an AND controller to pass the info and make the Add Object actuator run, you would use an Expression controller with the expression “counter == 0” (no quotes). Also, you should run two actuators from that expression: The Add Object actuator and a Property actuator to add 1 to “counter”.
I’ve come up with a way to make your armatured-NPC look at your player character.
Take a look at this file:
W,A,S,D = movement
Note the two “Empties” and two heads(one is parented to the armature). The NPC has one and so does the PC. You’ll notice that everytime the PC is near the NPC, the NPC will turn it’s head to look at you/PC’s empty; when you back off from it, it looks back at the default Empty. As long as the PC is near the NPC, the armatured head is invisible while the tracking head is visible. When you move away from the NPC, a timer goes off as the “tracking” head is looking back at the default Empty; when the empty reaches a certain value, the armatured head becomes visible while the other one becomes invisible. This seems confusing but trust me it works. Quite nicely, in fact.
Believe it or not, you can actually achieve some nice effects with the some workarounds.
A… I dont think your matter work on a head that is not separate from the body.
That’s the point. For this feature to work properly, you’d need to seperate the head from the body. If you notice in the file, there are two heads, one parented to the armature but seperated from the rest of the body and the other just sitting there in place. Naturally since the GE doesn’t support single-bone tracking, we have to come up with creative alternatives.
ok…i’ll give it a try