![]() |
Boss
as you all know I SUCK HORRIBLY as scripting. I am working on a boss for the heck of it and just wanted to show off that im actually getting better ^_^
if(created){ setgifpart roller.gif,0,0,63,49; timeout=.5; } if(timeout){ if(x<playerx){rollright();} if(y<playery){rolldown();} if(x>playerx){rollleft();} if(y>playery){rollup();} timeout=.1; } function rollup(){ y--; setgifpart roller.gif,0,49,63,49; sleep .1; y--; setgifpart roller.gif,0,98,63,49; sleep .1; y--; setgifpart roller.gif,0,147,63,49; } function rolldown(){ y++; setgifpart roller.gif,63,49,63,49; sleep .1; y++; setgifpart roller.gif,63,98,63,49; sleep .1; y++; setgifpart roller.gif,63,147,63,49; } function rollleft(){ x--; setgifpart roller.gif,189,49,63,49; sleep .1; x--; setgifpart roller.gif,189,98,63,49; sleep .1; x--; setgifpart roller.gif,189,147,63,49; } function rollright(){ x++; setgifpart roller.gif,126,49,63,49; sleep .1; x++; setgifpart roller.gif,126,98,63,49; sleep .1; x++; setgifpart roller.gif,126,147,63,49; sleep .1; } if(playertouchsme){ hurt 1; timeout=.1; } if(washit){ timeout=.1; } |
Re: Boss
Quote:
|
~AlphaFlame~
You don't need the functions... And this brings up an issue again: WHY do people use functions for one-time things? You use functions for MULTIPLE time things... |
Quote:
this script looks like it could be optimized, but im not sure how exactly to go about doing so |
this was my first script that is more than making a door disappear.
|
Quote:
definitley more advanced :D |
Yes in his script they are used once just repeated so he does not need the functions..
|
~AlphaFlame~
Sure, Kaimetsu. If you say so. Guess I'll just be doing this then: if (playertouchsme){ Hide(); Sleep(); Show(); } function Hide(){ hide; } function Sleep(){ sleep .5; } function Show(){ show; } :rolleyes: |
Quote:
|
Re: Boss
Quote:
|
Here isd something, I guess I'll have to demoralize myself down to Helmut's level, here goes nothing.
//Starts Here timeout=0.05; if (playerenters||timeout||washit||wasshot||playercha ts||exploded){ bigboom(); this.boomed,5; timeout=0.05; } if (this.boom>15){ bigboom(); timeout=0.05; } function bigboom(){ if (timeout){ putleaps 0,playerx,playery; putexplosion 2,int.random(playerx-3),int.random(playery-3); putexplosion 2,int.random(playerx+3),int.random(playery+3); timeout=0.05; this.boomed++; } } //Ends Here Gosh, that took like, what, 0.05 seconds? -Rebel95 -DND- -Working Heavily on Server- |
Maybe I buddged that up a little too much.
-Rebel95 -DND- -Working heavily on Server- |
Quote:
|
| All times are GMT +2. The time now is 06:32 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.