Shapebaseimagedata question
by Steve D · in Torque Game Engine · 09/04/2007 (9:34 pm) · 2 replies
Anyone know how to make an aiplayer fire his weapon assuming he has one mounted? Right now my client has control of the camera and I have some ai players with weapons mounted. When your client has control of a player a left click seems to automatically trigger the state machine within the image datablock but how do I make that happen manually?
Torque Owner Stefan Lundmark
Always try to search the forums before asking a question. This is mainly to save time, and the fact that a tutorial can explain these things a lot better than a forum post can, and to avoid duplication.
If you haven't seen this gem yet, take a look. It's a great introducer to AIPlayers and how to command them!
To answer your question, you need to find out what slot the image resides in (not mountpoint, mind you! this can be confusing) and trigger it. Via script: