Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-14-2006, 10:07 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Circle fade in/out

I guess I forgot to post this when I made it, so here it is.
pressing f will trigger the effect, if you can't figure out how to make use of it, ohwell
Attached Files
File Type: nw chad_fader.nw (10.7 KB, 217 views)
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #2  
Old 01-15-2006, 06:02 AM
Raeiphon Raeiphon is offline
I never asked for this.
Join Date: Jun 2005
Posts: 855
Raeiphon is on a distinguished road
Actually, thank you. Quite useful, i've never really done much work on effects, good for learning off.
__________________

I hope for nothing. I fear nothing. I am free.
Reply With Quote
  #3  
Old 01-15-2006, 03:17 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
I think that is wonderfully made, and a very nice effect.

Great work.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #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
Reply


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 04:44 AM.


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