SetGroup Curiously Not Working
by Christopher Franklin · in Torque Game Builder · 09/07/2006 (8:27 pm) · 2 replies
Up until now I've been letting collisions happen between all objects in my game (even collisions that didn't result in any action being taken) but I'd rather spend my CPU cycles elsewhere. So I tried setting up some collision masks to prevent craziness.
Unfortunately, when I ran %this.setGroup( X ); on every one of my sprites, they unanimously decided that setGroup wasn't a function of they were aware of. These are totally normal t2dStaticSprites. When I ran getGroup on them, it didn't deny it was a function, but it returned a value of -1. So now I'm really really confused as to what I'm doing wrong. Other t2dStaticSprite functions right next to my setGroup call work perfectly - setLayer, setImageMap, etc. I loaded up a test bed game and tried to run it there, but it still said it wasn't a real function. Have I royally messed something up, or is there something I've forgotten?
Unfortunately, when I ran %this.setGroup( X ); on every one of my sprites, they unanimously decided that setGroup wasn't a function of they were aware of. These are totally normal t2dStaticSprites. When I ran getGroup on them, it didn't deny it was a function, but it returned a value of -1. So now I'm really really confused as to what I'm doing wrong. Other t2dStaticSprite functions right next to my setGroup call work perfectly - setLayer, setImageMap, etc. I loaded up a test bed game and tried to run it there, but it still said it wasn't a real function. Have I royally messed something up, or is there something I've forgotten?
#2
09/08/2006 (5:15 am)
Ah, that'd do it. I was searching the documentation like crazy for a new function call, but all I had to go on was "setGroup." Thanks a lot!
Torque 3D Owner Stephen Zepp