Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function createBrick(%client, %pos, %data, %angleID, %baseplate, %color, %colorFX, %shapeFX, %isRaycasting, %isColliding, %isRendering)
- {
- %brick = new fxDTSBrick()
- {
- client = %client;
- position = %pos;
- datablock = %data;
- angleID = %angleID;
- rotation = rotationFromAngleID(%angleID);
- isBaseplate = %baseplate;
- colorID = %color;
- colorFX = %colorFX;
- shapeFX = %shapeFX;
- isRendering = %isRendering;
- isColliding = %isColliding;
- isRaycasting = %isRaycasting;
- isPlanted = 1;
- };
- %error = %brick.plant();
- if(%error == 1 || %error == 5 || %error == 3)
- {
- %brick.delete();
- return;
- }
- %brick.setTrusted(1);
- BrickGroup_888888.add(%brick);
- %brick.setRendering(%brick.isRendering);
- %brick.setRayCasting(%brick.isRaycasting);
- %brick.setColliding(%brick.isColliding);
- %brick.setColorFX(%brick.colorFX);
- return %brick;
- }
- function rotationFromAngleID(%angle)
- {
- switch(%angle)
- {
- case 0:
- %rotation = "1 0 0 0";
- case 1:
- %rotation = "0 0 1 90";
- case 2:
- %rotation = "0 0 1 180";
- default:
- %rotation = "0 0 -1 90";
- }
- return %rotation;
- }
Advertisement
Add Comment
Please, Sign In to add comment