Game Development Community

T3D 1.1 Beta 2 - setShapename() on AI doesn't work NOT A BUG!!!

by Richard Marrevee · in Torque 3D Professional · 09/09/2010 (7:02 pm) · 7 replies

Build: 1.1 Beta 2

Platform: Windows Vista, 32 bit

Target: Gameplay, Visual Studio, Torsion

Issues: When calling setShapename() on an AIPlayer object, this name is not set.

Steps to Repeat:
1. Launch the world-editor.
2. Add an AIPlayer object.
3. Launch console.
4. On the previously created AI call setShapename("MyAI");
5. Console returns with message that string is tagged. This is right. When using 'MyAI' in stead of "MyAI" you don't get this message. By using a normal string you can get some sort of confirmation that the function has executed.
6. Call getShapename() on the AI.
7. Console returns blank line.

Suggested Fix: Don't know, but debuggijng the code (I used guiCrossHairHud.cpp) it seems that there is nothing stored in the shapes mShapeNameHandle.

Original Post
Somehow I'm not able to set the shapename of an AI. When executing bot.setShapename("bot"); I get a mapping string to .. message in the console, which is logical, the string is converted to a tagged string. Then calling bot.getShapename(); I just get a blank line in return.

The strange thing here is that this works fine on any other object, so I don't know where to start searching.

Is there anybody else experiencing the same problem?

edit:
Problem seems to be caused by a lot of subsequent calls in AI scripts to setShapename.

About the author

Started programming in 1984 on an Oric, when time progressed switched to MSX, Amiga and finally the Windows PC with T3D. Now developing an epic fantasy game: The Master's Eye. Creator of the DoorClass pack and VolumetricFog pack @ richardsgamestudio.com


#1
09/09/2010 (7:53 pm)
I can see same issue - no actual display of the shapename.
#2
09/09/2010 (7:58 pm)
Mmm, maybe this looks like a bug.`

Edit:
Reported as a possible bug.
#3
09/09/2010 (8:04 pm)
Hmm... works for me.
#4
09/09/2010 (9:27 pm)
You've got trunk ...

Works in FPS Example ------> Does NOT work in New Project
#5
09/09/2010 (10:02 pm)
True, but I was actually using mostly stock Full Template (AImanager uncommented + test level) fresh from the installer with an old bot testing level thrown in. How are you guys spawning your bots? The ones I tested were the dumb pathed AI's through the AIManager and I was able to set & get shapenames with no problem -- they even showed up in the shapename hud soon as changes were made.
#6
09/09/2010 (10:33 pm)
I was testing custom Ai and player ... but I don't see how that would affect the shapename as that's not something I've fiddled with ... but sure enough, stock seems to work but customized script/codebase isn't.
#7
09/10/2010 (10:16 am)
I am using the UAIsk and AI is spawned at mission loading time.

A have run a few more test and it seems that the problem is somewhere in the AI scripts. So there is NO bug in the source.

@Steve:
Do a search in files (scripts) on setShapeName.

I disabled all the calls to setShapename and in game entered a name manually in console and everything works!!! Don't know what call exactly is causing this but I will found out soon.

Changing back the header, because this is NOT, I repeat NOT a bug.