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 02-01-2002, 09:05 PM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
Question anyone knows how to get a light effect



i saw the fire work thingie that was posted on this forum bud i cant really figur out how to make moving light effects my self can anyone teach me or post a example thank u
Reply With Quote
  #2  
Old 02-01-2002, 09:16 PM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
if (created){
setimg light2.png;
drawaslight;
setcoloreffect 0,1,1,0.5;
setzoomeffect 1.5;
}

Elite looking blue light.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #3  
Old 02-01-2002, 09:17 PM
AlexH AlexH is offline
Have A Drink On Me
AlexH's Avatar
Join Date: Jun 2001
Location: Somewhere In Time
Posts: 7,442
AlexH is on a distinguished road
Send a message via AIM to AlexH Send a message via MSN to AlexH
yes but hes talking about making them spin etc
making the spin is easy just use sin, cos
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #4  
Old 02-01-2002, 09:45 PM
AlexH AlexH is offline
Have A Drink On Me
AlexH's Avatar
Join Date: Jun 2001
Location: Somewhere In Time
Posts: 7,442
AlexH is on a distinguished road
Send a message via AIM to AlexH Send a message via MSN to AlexH
Quote:
Originally posted by Kaimetsu


Spin? What spinned?
the light effects that move in circles
like the ones in birdbirds house
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #5  
Old 02-01-2002, 10:01 PM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
Talking =D

thats the problem i want them moving i dont understand the cos thing
Reply With Quote
  #6  
Old 02-01-2002, 10:13 PM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 has a spectacular aura about
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
is lookie a word o.O
__________________
Reply With Quote
  #7  
Old 02-01-2002, 10:15 PM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
=)

yeah cool i see

bud how do i make it go spin arround or something like in the graaloween party level on 2k1 or like the water fall close to the crafting house
Reply With Quote
  #8  
Old 02-01-2002, 10:22 PM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 has a spectacular aura about
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
I just wish I could see em period
__________________
Reply With Quote
  #9  
Old 02-01-2002, 10:24 PM
AlexH AlexH is offline
Have A Drink On Me
AlexH's Avatar
Join Date: Jun 2001
Location: Somewhere In Time
Posts: 7,442
AlexH is on a distinguished road
Send a message via AIM to AlexH Send a message via MSN to AlexH
Re: Re: =D

Quote:
Originally posted by Kaimetsu


NPC Code:

if(playerenters||timeout){
timeout=0.05;
showimg 0,light2.png,a,20;
changeimgcolors 0,0.5,0.5,0.5,0.5;
a+=0.1;
}



Lookie, it moves!
you could use the move command to and put it in a timeout loop
__________________
QUICK LOOK BUSY JESUS IS COMING!
Reply With Quote
  #10  
Old 02-01-2002, 10:31 PM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
Question ?

mean this one








// NPC made by aylad
if (playerenters || wasthrown) {
// Initialize the this. variables
dirgo = {0,-1,-1,0,0,1,1,0};
timeout = 0.05;
this.walkmode = 1;
if (wasthrown && this.walkmode>1) this.walkmode = 1;
this.x1 = 0;
this.x2 = 63;
this.y1 = 0;
this.y2 = 63;
this.speed = 0.08;
this.mode = 0;
this.runcounter = int(random(10,40));
}

// Walking stuff
if (timeout && this.mode==0) { // WALKING
newx = x + dirgo[dir*2] * this.speed;
newy = y + dirgo[dir*2+1] * this.speed;
this.runcounter--;
if (this.walkmode==1) { // RANDOM
if (this.runcounter>0) {
testx = newx + 1.5 + dirgo[dir*2];
testy = newy + 2+ dirgo[dir*2+1];
if (onwall(testx,testy)) {
dir = (dir+2)%4;
this.runcounter = int(random(0,60));
} else {
x = newx;
y = newy;
}
} else {
this.runcounter = int(random(10,40));
dir = (dir+1+int(random(0,2))*2)%4;
}
} else if (this.walkmode==2) { // LEFTRIGHT
if (dir!=1 && dir!=3) dir = 3;
else {
x = newx;
y = newy;
if ((dir==1 && x<=this.x1) || (dir==3 && x>=this.x2))
dir = (dir+2)%4;
}
} else if (this.walkmode==3) { // UPDOWN
if (dir!=0 && dir!=2) dir = 2;
else {
x = newx;
y = newy;
if ((dir==0 && y<=this.y1) || (dir==2 && y>=this.y2))
dir = (dir+2)%4;
}
} else if (this.walkmode==4) { // RECTANGLE
x = newx;
y = newy;
if ((dir==0 && y<=this.y1) || (dir==1 && x<=this.x1) ||
(dir==2 && y>=this.y2) || (dir==3 && x>=this.x2))
dir = (dir+3)%4;
}
if (this.walkmode>1 && this.runcounter<=0)
this.runcounter = 20;
message;
timeout = 0.05;
}
Reply With Quote
  #11  
Old 02-01-2002, 11:22 PM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
Red face uh...................

im trying to learn with getting examples, caus i cant understand much of the newbie scripters bible
Reply With Quote
  #12  
Old 02-02-2002, 12:00 AM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
Talking got it

i gave the lights a walking script and it works fine thank u all for your good advise
Reply With Quote
  #13  
Old 02-02-2002, 04:40 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
use the predefined npc lights, then change the red, blue, and green values to something between 0 and 255
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #14  
Old 02-02-2002, 09:43 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Are you talking about this:
NPC Code:

for(i = 0; i<25; i++ {
this.mv+=.25;
this.x = 32+cos(this.mv)*5;
this.y = 32+sin(this.mv)*5;
showimg i,door.png,this.x,this.y;
}


?
cos and sin are reverse of eachother, so that means when cos is going up sin is going down on the same number.
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #15  
Old 02-02-2002, 05:20 PM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
Question ?

it doesnt really moves how can i make it move
Reply With Quote
  #16  
Old 02-02-2002, 09:13 PM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
Quote:
Originally posted by Kaimetsu


Incorrect. They are not inversions, one is merely shifted along from the other. And screen_name, it's 0-1 rather than 0-255.
whoops i just assumed 255, o well, thanks for correcting
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #17  
Old 02-03-2002, 04:08 AM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
Unhappy .......

thats verry bad of i wouldnt ask if i knew caus i dont understand the hole thing only that apperently you get a circle if ya use sin and cos tell me plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
Reply With Quote
  #18  
Old 02-03-2002, 04:20 AM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
........

as many times as noobish scripters ask you
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 07:43 PM.


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