Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   RETURN of the Useless Grid Thingy (https://forums.graalonline.com/forums/showthread.php?t=44105)

DarkDragoon_Lloyd 04-08-2003 04:56 AM

RETURN of the Useless Grid Thingy
 
1 Attachment(s)
OKOK, so I am still new to scripting, but I made a new useless grid thingy.
Please give me suggestions on how I can improve my scripting skills...

Things to try:
-Stand in the corners of the level.
-Walk from one corner to another.
-Walk along the sides.

I think the effect it produces is cool...
I cant fix how its kinda off a bit in some places(where the lines don't quite make it to the corners). Its because Graal reads the players x and y as the very top corner of the player...

DarkDragoon_Lloyd 04-08-2003 05:06 AM

o¯O
Dunt know LOOPS...
I go learn now...

screen_name 04-08-2003 08:08 AM

Looky, from 71 lines to 13. Loops and mathematics are amazing aren't they?
NPC Code:

//#CLIENTSIDE
if (created || timeout) {
timeout = .05;
for (a=0;a<22;a++) {
i = (a+int(a/21))*3;
showpoly a,{playerx,i,i,playery+3};
showpoly a+22,{i,playerx,playery+3,i};
changeimgcolors a,random(0,1),random(0,1),random(0,1),1;
changeimgcolors a+22,random(0,1),random(0,1),random(0,1),1;
changeimgvis a,0;
changeimgvis a+22,0;
}
}


Knuckles 04-08-2003 08:44 AM

Quote:

Originally posted by screen_name
Looky, from 71 lines to 13. Loops and mathematics are amazing aren't they?
NPC Code:

//#CLIENTSIDE
if (created || timeout) {
timeout = .05;
for (a=0;a<22;a++) {
i = (a+int(a/21))*3;
showpoly a,{playerx,i,i,playery+3};
showpoly a+22,{i,playerx,playery+3,i};
changeimgcolors a,random(0,1),random(0,1),random(0,1),1;
changeimgcolors a+22,random(0,1),random(0,1),random(0,1),1;
changeimgvis a,0;
changeimgvis a+22,0;
}
}


Lmao... and the thing looks cool ;o

GoZelda 04-08-2003 05:35 PM

Southeast corner looks like something i did for math at school.

Knuckles 04-08-2003 09:34 PM

....Uhh....? All I see is a grid, that moves with the player.

DarkDragoon_Lloyd 04-08-2003 11:50 PM

Yes, well... As you can see, I am not very good at scripting...

In fact, that is one of the main reasons why I posted this... I need to learn more and get better...

screen_name 04-09-2003 08:47 PM

Quote:

Originally posted by Kaimetsu


The best thing you could do is to examine screen_name's adaptation. Loops are indispensable for this kind of program.

I just looked over the script and I feel bashful... I made a mistake. The below includes the correction

NPC Code:

//#CLIENTSIDE
if (created || timeout) {
timeout = .05;
for (a=0;a<22;a++) {
i = (a*3)+int(a/21);
showpoly a,{playerx,i,i,playery+3};
showpoly a+22,{i,playerx,playery+3,i};
changeimgcolors a,random(0,1),random(0,1),random(0,1),1;
changeimgcolors a+22,random(0,1),random(0,1),random(0,1),1;
changeimgvis a,0;
changeimgvis a+22,0;
}
}



All times are GMT +2. The time now is 09:03 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.