Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   script command for arcs (https://forums.graalonline.com/forums/showthread.php?t=20500)

jeff335 01-06-2002 08:49 AM

script command for arcs
 
createarc name,number of points,center x,center y,radius,begin degree,end degree;

setarc createss arrays "[name]x" and "[name]y" of coordinates along circle with the given center point and radius, using a 360-degree system to determine where along the circle the given arc begins. Example:
PHP Code:

function projectarc(){
for(
i=0;i<arraylen(arcx);i++){
hideimg i;
showimg i,orez.png,arcx[i],arcy[i];
}
}
if(
playertouchsme){
toweapons ArcTest;
}
if(
weaponfired){
createarc arc,15,playerx,playery,1,300,60;
projectarc();
sleep 1;
createarc arc,15,playerx,playery,2,300,60;
projectarc();
sleep 1;
createarc arc,15,playerx,playery,3,300,600;
projectarc();
sleep 1;
createarc arc,15,playerx,playery,4,300,600;
projectarc();
sleep 1;
createarc arc,15,playerx,playery,5,300,600;
projectarc();
sleep 1;
for(
i=0;i<arraylen(arcx);i++){
putleaps 0,arcx[i],arcy[i];
hideimg i;
}


Yeah, you can do this with a lot of trig functions and stuff, but this, I believe, would be simpler and more efficient. Enjoy!

mikepg 01-06-2002 09:04 AM

umm
 
that would be a waste of memory. you can do that with trig (as you stated) much more efficiently.


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

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