'Smooth' Enter/Exit object movement
#5

Quote:
Originally Posted by VincentDunn
View Post
You could do cooler things using the trig functions, like explosion circles!
http://www.youtube.com/watch?v=clYmw4NSexY

Source
pawn Code:
#include <a_samp>
#include <zcmd>

main() {}

new
    g_timer,
    g_increment = 0,
    g_exploding = 0;

CMD:circle(playerid, params[])
{
    if(g_exploding) return 0;

    new
        Float:x,
        Float:y,
        Float:z;

    GetPlayerPos(playerid, x, y, z);

    g_timer = SetTimerEx("circle_explosion", 250, 1, "ffff", x, y, z, g_increment);
    g_exploding = 1;
    return 1;
}

forward circle_explosion(Float:x, Float:y, Float:z, angle);
public circle_explosion(Float:x, Float:y, Float:z, angle)
{
    if(g_increment <= 360) {
        CreateExplosion(x + (20.0 * floatsin(-g_increment, degrees)), y + (15.0 * floatcos(-g_increment, degrees)), z, 0, 5.0);
        g_increment += 10;
    }

    else {
        g_increment = 0;
        g_exploding = 0;
        KillTimer(g_timer);
    }

    return 1;
}
I've got an idea for this code, how about instead of explosions, it creates fire, all the around, then audio stream comes in "I fell into a burning ring of fire" Just saying!
Reply


Messages In This Thread
'Smooth' Enter/Exit object movement - by MP2 - 06.04.2013, 11:15
Re: 'Smooth' Enter/Exit object movement - by MP2 - 06.04.2013, 13:10
Re: 'Smooth' Enter/Exit object movement - by MP2 - 06.04.2013, 13:15
Re: 'Smooth' Enter/Exit object movement - by ReneG - 06.04.2013, 19:18
Re: 'Smooth' Enter/Exit object movement - by Isolated - 06.04.2013, 20:55
Re: 'Smooth' Enter/Exit object movement - by Macluawn - 06.04.2013, 21:51
Re: 'Smooth' Enter/Exit object movement - by Kar - 07.04.2013, 02:10
Re: 'Smooth' Enter/Exit object movement - by Scenario - 07.04.2013, 02:16
Re: 'Smooth' Enter/Exit object movement - by Luis- - 07.04.2013, 03:04
Re: 'Smooth' Enter/Exit object movement - by MP2 - 07.04.2013, 06:49
Re: 'Smooth' Enter/Exit object movement - by Universal - 07.04.2013, 20:02
Re: 'Smooth' Enter/Exit object movement - by Macluawn - 07.04.2013, 21:29
Re: 'Smooth' Enter/Exit object movement - by Scenario - 07.04.2013, 22:05
Re: 'Smooth' Enter/Exit object movement - by MP2 - 07.04.2013, 23:10
Re: 'Smooth' Enter/Exit object movement - by Pottus - 07.04.2013, 23:17
Re: 'Smooth' Enter/Exit object movement - by MP2 - 07.04.2013, 23:19

Forum Jump:


Users browsing this thread: 4 Guest(s)