Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 01-15-2006, 10:45 PM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Although it would be better if you used:
NPC Code:

this.nodes = 30; // number of points used to create this illusion of a circle through polygons
setarray this.circle,this.nodes * 2; // sets up the array
for(i=0; i<this.nodes; i++) { // uses a for loop to set the points
this.circle[2*i] = playerx + 1.5 + r * cos(theta);
this.circle[2*i+1] = playery + 1.5 + r * sin(theta);
}


where r is the size of the circle, and theta would be the angle swept out by the for loop in terms of i, pi and this.nodes.
Of course this is just an example, and cannot be used to substitute the code in chad's level.
The idea here is that it would fade in/out using the player's coordinates. Since it looks weird when the player is at the edge of the level and it just fades in/out on grass tiles.

I'm not sure if that made any sense, but if you have questions, post them here.
__________________
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:36 PM.


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