Difference between revisions of "Zoltea's Tweaked Whirled SDK"

From Whirled Club Wiki
Jump to: navigation, search
Line 31: Line 31:
  
  
This SDK is set up just like the other SDK. For information on this, go [http://wiki.whirled.club/Whirled_SDK here].
+
This SDK is set up just like the other SDK. For information on this, go [https://wiki.whirled.club/wiki/Whirled_SDK here].
  
  

Revision as of 20:22, 5 September 2018

This has attributes similar to the Ultimate SDK; however, this SDK has been tweaked to include new methods, events, and more into the Whirled classes. Before we get started, a simple definition for you. In the case of Whirled, an entity is an avatar, pet, piece of furniture, or a toy. However EntityControl also extends to backdrops.


Tweak Version: 0.03

Whirled SDK Version: 0.67

LSA Version: 2.0


This SDK includes: LSA, Team LSA, ConfigXP, ImpatientBody


LSA credits to Nordenx, Conrad500, and The Cosmic Cheese.

Team LSA credits to Extramrdo.

ConfigXP credits to The Cosmic Cheese.

ImpatientBody credits to The Cosmic Cheese].

NameTextUtil credits to Riazaku.

Emotive Avi credits to The Cosmic Cheese.

FollowBrain2 credits to Shango.


To download this SDK, click here.


This SDK is set up just like the other SDK. For information on this, go here.



Updates

V0.03 notes:

-RightBody.as and ImpatientRightBody.as added. Expect ImpatientMovieClipBody.as in the next.

(If you already have the tweaked SDK, you can just add in the new files from here: V0.03 Individual files)


V0.02 notes:

-ConfigXP has been edited for columns. When you do it, just set how many rows you want it to go down till it loops, format: _body = new ConfigXPBody(_ctrl, this, w, rows);

-NameTextUtil has been added

(If you already have the tweak ed SDK, you can just add in the new files from here: V0.02 Individual files)

Information:

Methods added:

To EntityControl

(This will work with Avatars, Pets, Furniture, and Backdrops)


showAboutPopup(aboutText:String, backgroundColor:uint = 0x000000, fontColor:uint = 0xFFFFFF, width:Number = 300, height:Number = 300, backgroundAlpha:Number = 1, fontSize:int = 12);


aboutText - this is a string which will contain the text that will appear in the About Popup. Format is your text between quotations. e.g.: _ctrl.showAboutPopup("Hello Whirled!")

- note, instead of putting line breaks (pressing the enter key to go to a new line), you should put \n

backgroundColor - this is the background color of your popup, format is 0x000000 and replace the 000000 with the color hex. Default is 0x000000 if nothing is defined.

fontColor - this is the color your text will be on the popup, format is 0x000000 and replace the 000000 with the color hex. Default is 0xFFFFFF if nothing is defined.

width - this is the width of your popup in pixels, keep it reasonable. Default is 300 if nothing is defined.

height - this is the height of your popup in pixels, keep it reasonable. Default is 300 if nothing is defined.

backgroundAlpha - this is the opacity of your background. 0 is transparent and 1 is fully opaque. Default is 1 if nothing is defined.

fontSize - this is the size of your text, just like font size in any text editor program. Default is 12 if nothing is defined.


How to use:

If you're not adding anything besides text, just do _ctrl.showAboutPopup("Text here");

Otherwise use any of them you'd like, here's an example with all of the options used: _ctrl.showAboutPopup("Hello", 0xFF0000, 0xFFFFFF, 200, 200, 1, 14); (Displays a popup that says "Hello" with a red background and white text.)



addOutline(displayObject:DisplayObject, outlineColor:uint = 0x000000, outlineAlpha:Number = 1, thickness:Number = 5, strength:Number = 2, outlineQuality:int = 1);


displayObject - this would be the name of the MovieClip or symbol you're adding the outline to. If it's a symbol then use its instance name. If it's the entire entity use 'this'.

outlineColor - this is the color of your outline, format is 0x000000 and replace the 000000 with the color hex. Default is 0x000000 if nothing is defined.

outlineAlpha - this is the opacity of your outline. 0 is transparent and 1 is fully opaque. Default is 1 if nothing is defined.

thickness - this is the thickness of your outline in pixels. Default is 5 if nothing is defined.

strength - this is the strength of the outline - or how much it is not faded. Default is 2 if nothing is defined.

outlineQuality - this is the quality, it's either low, medium, or high (1, 2, 3), but you may choose to make it as high as 15. Note that higher quality makes it lag more. Default is 1 if nothing is defined.


How to use:

If you're adding a simple black outline to your avatar, just use _ctrl.addOutline(this);

Otherwise use as many options as you'd like, an example with all of the options used is _ctrl.addOutline(this, 0xFFFFFF, 1, 3, 5, 1); (makes a red outline 3 pixels thick around the entity)



removeOutline(displayObject:DisplayObject);


displayObject - this would be the name of the MovieClip or symbol you're removing the outline from. If it's a symbol then use its instance name. If it's the entire entity use 'this'.


How to use:

For the entire entity (such as an avatar with an outline) use _ctrl.removeOutline(this);

Otherwise just specify the instance name of the symbol in place of 'this'.





To ActorControl

(This will work with Avatars and Pets)


noFlip(displayObject:DisplayObject); // Credits to the wiki for this, might bug sometimes, I'll work out a way to fix it


displayObject - this would be the name of the MovieClip or symbol you're preventing from flipping. If it's a symbol then use its instance name. If it's the entire entity use 'this'.


How to use:

For the entire entity use _ctrl.noFlip(this);

Otherwise just specify the instance name of the symbol in place of 'this'.





To AvatarControl

(This will work with Avatars)


fly(flyHeight:Number = 0.2); // Credits for this go to whoever made it


flyHeight - the number indicating the ratio of the room's height you're flying at. It is a number between 0 and 1 or it can be 0 or 1. Default is 0.2 if nothing is defined.


How to use:

If you wish to leave the height at 0.2, then just do _ctrl.fly();

Otherwise specify a number between 0 and 1. Example is _ctrl.fly(0.4);



unfly(); // Credits for this go to whoever made it


How to use:

If the avatar is currently "flying", or the fly code has been used, just use _ctrl.unfly(); to make it stop flying.




General Edits and Advanced Techniques

Currently not much. Body.as and MovieClipBody.as have public arrays called _avatarScenes that can be accessed from the fla to look at all of your avatar's scenes. Be creative with this. Access via _body._avatarScenes.




ToDo

-Implement a secure way of doing an anti-rip, has to be hard to find or better yet impossible.

-Make my Config V2, that will come eventually, it will be compatible with Body.as giving you more coding freedom.

-For fun, though first we must get permission from Clair to do it as it is his idea, we will make a frameBody so you can put states on labeled frames.

-Make an event in Body.as and probably the pet Brain that dispatches whenever it changes scenes or loops a state animation, this can be used for things like non-MCB config.

-Edit the About Popup thing so you can make it a gradient background.

-Include public arrays for states and actions, just if you want them.