Page 1 of 1

Zap DANCER

PostPosted: Fri Mar 22, 2013 7:28 pm
by Fordcars
YEAH! I finally finished this thing! Well, it took me a couple of hours :P

So yeah, I just made a Zap Dancing bot :zapdance:

UPDATE: Works in 019

  Code:
---------ZAPDANCER
---------by fordcars
function getName() -- Called once
    return("Zapdancer")
end

function main() -- This is the first code ran, after loose code
    botAng = 4.7 -- 4.7 is straight up (I think)
    bot:setAngle(botAng)
    rotright = true
end

function onTick()
    if(rotright == true) then
        botAng = botAng + 0.1 -- Rotate variable
        bot:setAngle(botAng) -- Set bot at the right angle
        local angofbot = bot:getAngle() -- Angle of the bot
        if(angofbot >= 5.5) then
            rotright = false
        end
    end

    if(rotright == false) then
        botAng = botAng - 0.1  -- Rotate variable
        bot:setAngle(botAng) -- Set bot at the right angle
        local angofbot = bot:getAngle() -- Angle of the bot
        if(angofbot <= 4) then
            rotright = true
        end
    end
end


I want feedback :evil:

Re: Zap DANCER

PostPosted: Fri Mar 22, 2013 8:00 pm
by Fordcars
This was kinda a test, though

Re: Zap DANCER

PostPosted: Sat Mar 23, 2013 12:43 am
by bobdaduck
Hee hee

That's awesome.

Alas, the port flames don't go off when its turning.

Still adding this to all of my robot folders.

Re: Zap DANCER

PostPosted: Sat Mar 23, 2013 9:43 am
by Fordcars
Yeah, the flames do come out but only a fraction of a frame so we don't see it :(

Thanks!

Re: Zap DANCER

PostPosted: Sat Nov 09, 2013 5:29 am
by destroyerimo
your a GENIUS! :D

Re: Zap DANCER

PostPosted: Sat Nov 09, 2013 1:02 pm
by Fordcars
Haha thanks!!

Re: Zap DANCER

PostPosted: Tue Dec 24, 2013 4:49 pm
by Fordcars
Updated for 019 :)

Re: Zap DANCER

PostPosted: Tue Dec 24, 2013 11:25 pm
by bobdaduck
Fordcars wrote:Updated for 019 :)

Nothing could be more important.

Re: Zap DANCER

PostPosted: Thu Dec 26, 2013 10:49 am
by Fordcars
Exactly what I was thinking. Great minds think alike!

Re: Zap DANCER

PostPosted: Tue Jan 07, 2014 2:37 pm
by amgine
Lol 42 version updates later.