Created
April 23, 2014 09:44
-
-
Save andr3wmac/11208941 to your computer and use it in GitHub Desktop.
Torque3D - ServerPlayExplosion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ServerPlayExplosion(%position, %datablock) | |
{ | |
// Play the given explosion on every client. | |
// The explosion will be transmitted as an event, not attached to any object. | |
for(%idx = 0; %idx < ClientGroup.getCount(); %idx++) | |
{ | |
%client = ClientGroup.getObject(%idx); | |
commandToClient(%client, 'PlayExplosion', %position, %datablock.getId()); | |
} | |
} | |
function clientCmdPlayExplosion(%position, %effectDataBlock) | |
{ | |
if (isObject(%effectDataBlock)) | |
{ | |
new Explosion() | |
{ | |
position = %position; | |
dataBlock = %effectDataBlock; | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment