Creating circle Effect

Need help with your JScripts? Got questions concerning the DFNs? Come forward, step inside :)
Post Reply
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Creating circle Effect

Post by dragon slayer »

This is a circle moving effect for anything you like to use it on.
    for ( var i = 0; i < 100; i++ )
    {
        // Circle Effect around the item used.
        var radius = 50; // Radius of the circle
        var xOffset = 100; // X coordinate offset
        var yOffset = 100; // Y coordinate offset
        var x = iUsed.x + RandomNumber( - xOffset, radius ); // Calculate the x coordinate
        var y = iUsed.y + RandomNumber( - yOffset, radius ); // Calculate the y coordinate

        DoMovingEffect( iUsed, x, y, iUsed.z, 0x36E4, 0x02, 0x00, false, 0x1EC );
    }
Post Reply