Face Object Behavior - no objects in drop down list
by Django Zeaman · in Torque Game Builder · 11/03/2009 (4:10 pm) · 7 replies
Hi,
New to TGB, I'm probably doing something fairly rudimentary wrong. Any help would be greatly appreciated.
I installed the Face Object behavior (put it in the game->behavior folder). I then add that behavior to an object in the scene (the attacker) and when I click the drop down "object" list box the only option is "none". I don't see any of the other objects I have in the scene.
What am I missing?
Thanks,
Django
New to TGB, I'm probably doing something fairly rudimentary wrong. Any help would be greatly appreciated.
I installed the Face Object behavior (put it in the game->behavior folder). I then add that behavior to an object in the scene (the attacker) and when I click the drop down "object" list box the only option is "none". I don't see any of the other objects I have in the scene.
What am I missing?
Thanks,
Django
About the author
I worked in learning simulations, then spent a few years working at Apple. I started to think about creating games for the iPhone and left to do that last summer. Our first game is coming out this summer.
Recent Threads
#2
11/03/2009 (9:06 pm)
Select the object that you want your attacker to face, click the Edit button on the upper right. Then, open the Scripting drop down menu and fill in a Name for the object. This Name will then show up in the drop down for the face object behavior.
#3
I can now select the object in the drop down list. However the other object (the attacker) is not rotating or moving at all in relation to the object that is moving across the scene.
I've tried all the different turnSpeed and rotationOffset settings and it just sits there. Again, probably something simple I'm not doing. Any help would be grand.
Nick - thanks, yes I did figure that out earlier, but my understanding is pretty rudimentary at this point. I completed the Fish tutorial and I have some basic C working knowledge, but this is my first time creating my own design from scratch with TGB.
11/03/2009 (9:52 pm)
Thanks Eric, that worked.I can now select the object in the drop down list. However the other object (the attacker) is not rotating or moving at all in relation to the object that is moving across the scene.
I've tried all the different turnSpeed and rotationOffset settings and it just sits there. Again, probably something simple I'm not doing. Any help would be grand.
Nick - thanks, yes I did figure that out earlier, but my understanding is pretty rudimentary at this point. I completed the Fish tutorial and I have some basic C working knowledge, but this is my first time creating my own design from scratch with TGB.
#4
1) I placed the downloaded behavior in the game->behaviors folder
2) I named the sprite in the scripting drop down for the object to face and the object which will face it.
3) I added the behavior to the attacker and set the "object" to the sprite it should be facing.
4) I play the scene and the sprite runs across the scene and the attacker sits there and does not move or appear to "face" the sprite at all.
As with Eric's suggestion, my mistake is probably quite basic. I'd greatly appreciate any suggestions.
11/04/2009 (9:42 pm)
Sorry to bump, but I could really use some help. Could someone tell me if I did the following things correctly:1) I placed the downloaded behavior in the game->behaviors folder
2) I named the sprite in the scripting drop down for the object to face and the object which will face it.
3) I added the behavior to the attacker and set the "object" to the sprite it should be facing.
4) I play the scene and the sprite runs across the scene and the attacker sits there and does not move or appear to "face" the sprite at all.
As with Eric's suggestion, my mistake is probably quite basic. I'd greatly appreciate any suggestions.
#5
Have you made any changes to the FaceObjectBehavior code? Have you made any other Edit changes to the attacker? What is different?
As a test, create a new project, add an object and give it a name, add a different object and add the FaceObjectBehavior to the second object and set it to face the first object. Run the project. The second object should turn to face the first object.
11/05/2009 (8:22 am)
I don't really know what is going wrong. One thing you could check - open the Physics drop down for the attacker and make sure that there is a positive value for Maximum Angular Velocity. You don't want both Minimum Angular Velocity and Maximum Angular Velocity to be zero.Have you made any changes to the FaceObjectBehavior code? Have you made any other Edit changes to the attacker? What is different?
As a test, create a new project, add an object and give it a name, add a different object and add the FaceObjectBehavior to the second object and set it to face the first object. Run the project. The second object should turn to face the first object.
#6
Would that make a difference?
Thanks for your help.
11/05/2009 (4:07 pm)
I opened a new project and started with two new objects and now it does indeed seem to work. The only difference I can see is that I had the object in the first example mounted to a path, and in the second I just move it left to right across the scene.Would that make a difference?
Thanks for your help.
#7
11/05/2009 (5:56 pm)
I think that an object mounted to a path is only controlled by the path code until it is dismounted. That is, I think that the object only gets updates from the path update. Apparently it's position is not being updated while it is on the path. Anyone else know if this is true?
Nick Rafalski
Did you re-load the level? This is necessary to update the list of behaviors.