Community Forum

List of new functions and tables

Forum Overview >> Demolition Company

CategoryDemolition Company
Created09.08.2010 18:51


Thomas H. (Patar) 09.08.2010 18:54
Hi all,

does it give new functions for Demolition Company?

And what is with new tables? for example the parts of a destroyed house?

Stefan Geiger - GIANTS Software 11.08.2010 10:08
There is a documentation on the GDN of the destruction engine functions here:
http://gdn.giants.ch/documentation_scripting.php#runtime_function_reference_destruction

The buildings are built with multiple shapes (the ones you can select in the editor), each consisting of multiple chunks (or destruction shape, referenced with destructionShapeIndex in the script functions).


If you want to get all destructible shapes in a given node, you can use:
local shapes = {};
g_currentMission:collectDestructionShapes(nodeId, shapes)

for _,shapeId in pairs(shapes) do
print(getName(shapeId) .. " is a destruction shape. It has "..getNumDestructionJoints(shapeId).." joints.");
end;


Thomas H. (Patar) 11.08.2010 16:15
Is it new? On the day i write this post, i looked at the reference, but i dont see that ;-)

but thanks!


Note: Log in to post. Create a new account here.