Making Footprint Decals Dynamic?
by Chad Kilgore · in Torque Game Engine · 09/27/2007 (8:31 am) · 2 replies
Is it possible to have the Player.decalData variable change dynamically during play? Adding this feature would allow footprints to gradually become bloody as a player becomes damaged. But the variable looks as though it is preloaded. Of course, I do not know how to make it dynamic.
Is it simply a matter of adding a ConsoleMethod.setDecalData?
Is it simply a matter of adding a ConsoleMethod.setDecalData?
#2
10/02/2007 (11:21 am)
However, if you want to have this feature for AI enemies sharing datablocks, that approach won't work. If you shoot one of them, all of their footprints will change. This is the way Torque is set up by default - the Kork AIPlayers share the Player's datablock. If you want a solution for individual objects, you'll have to port the decalData from PlayerData to Player, then you can just change it per Player.
Torque 3D Owner Chad Kilgore
%player.getDataBlock().decalData = new DecalData() {...};