Switching sprite frames and working with templates
by Arden · in Torque X 2D · 01/08/2011 (12:00 am) · 2 replies
Hiya all,
This will seem quite basic I guess to some of you, but I'm wondering what is the best way to switch between 3 sprite images representing a building being progressively destroyed by projectiles. Can I:
- Work from a StaticSprite template and trigger frame switching through code?
- Work from an AnimatedSprite template and triggerer single animation frames through code?
How do you guys handle it with situations where you have a lot of destructible objects? Can we use templates for that, or do we absolutely have to work from individual sprites and manually switch the materials?
Any help appreciated,
Thx
This will seem quite basic I guess to some of you, but I'm wondering what is the best way to switch between 3 sprite images representing a building being progressively destroyed by projectiles. Can I:
- Work from a StaticSprite template and trigger frame switching through code?
- Work from an AnimatedSprite template and triggerer single animation frames through code?
How do you guys handle it with situations where you have a lot of destructible objects? Can we use templates for that, or do we absolutely have to work from individual sprites and manually switch the materials?
Any help appreciated,
Thx
Torque 3D Owner Will O-Reagan
Modern Intrigues