AIPlayer - how to make it shoot
by Mr Meikel · in Torque Game Engine · 02/12/2006 (12:22 pm) · 6 replies
I've been reading up on some resources on aiPlayer, and they reference methods which don't seem to work.
I have a clean install of TGE 1.4, and the default aiPlayer contains both "fire" and "singleShot" - however whenever I use either of these functions TGE freezes up completely. Does this happen to everyone else?
If so, what solution do you guys use to make your "AIPlayers"s shoot? I'm at a loss!
I have a clean install of TGE 1.4, and the default aiPlayer contains both "fire" and "singleShot" - however whenever I use either of these functions TGE freezes up completely. Does this happen to everyone else?
If so, what solution do you guys use to make your "AIPlayers"s shoot? I'm at a loss!
#2
02/12/2006 (1:09 pm)
%shapeBase.setImageTrigger(%slot, true);
#3
Very helpful responses, thanks to all!
02/12/2006 (3:04 pm)
Wow thanks Josh Moore! That is exactly what I was after!Very helpful responses, thanks to all!
#4
I'm sure I could rip each string apart and test for the 3 numbers in the vector one, but I wondered if there was a function intergrated into Torque (or a common method) that could do what I am needing.
Many Thanks!
edit: no worries, ALL problems solved!
02/12/2006 (3:57 pm)
I've run into a bit of bother concerning vectors. My problem boils down to being able to tell the difference between a "normal" number such as "16593" and a string in vector form "33.5 444.6 123.0".I'm sure I could rip each string apart and test for the 3 numbers in the vector one, but I wondered if there was a function intergrated into Torque (or a common method) that could do what I am needing.
Many Thanks!
edit: no worries, ALL problems solved!
#5
If you only want to tell the difference between a vector and some other number (like an object ID), use getWordCount(). 1 word is a single number (or object ID), 3 words is a vector and 7 words is a transform.
I do this in some script methods I have that support both objects, vectors and transforns as a single input.
02/13/2006 (4:44 am)
What exactly are you trying to do? If you only want to tell the difference between a vector and some other number (like an object ID), use getWordCount(). 1 word is a single number (or object ID), 3 words is a vector and 7 words is a transform.
I do this in some script methods I have that support both objects, vectors and transforns as a single input.
#6
You know it took me nearly a month to figure that one out ;)
02/13/2006 (4:55 am)
Just so you know the difference between a vector and a transform, a vector is primarily used to describe an objects location in 3D space, whereas a transform includes the orientation information as well as the location information.You know it took me nearly a month to figure that one out ;)
Associate Orion Elenzil
Real Life Plus
You might try a debug build of the engine and see where it's freezing up.
Maybe it needs some setup, like an Aim() function ?