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 03-04-2002, 02:19 AM
ShadoWarrior911 ShadoWarrior911 is offline
Registered User
Join Date: Feb 2002
Location: United States
Posts: 16
ShadoWarrior911 is on a distinguished road
Send a message via AIM to ShadoWarrior911 Send a message via Yahoo to ShadoWarrior911
Question flickering light

Please help me design an Npc of a light effect of a light that flickers by changing in magnification slightly. I have tried and tried, but to no avail, and i have only recently started to learn c++(which I know Graal Uses in its own way). Also, would it be possible/easier to do this with a .gani?
Reply With Quote
  #2  
Old 03-04-2002, 03:01 AM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
{full rights preserved to graal2001 i think lol}
if (created)
dontblock;
//#CLIENTSIDE
if (playerenters) {
setcoloreffect 1,1,0,0.4;
drawaslight;
this.light = 2;
timeout = 0.05;
}
if (timeout) {
this.light += random(-0.2,0.2);
if (!(this.light in |1,3|))
this.light = 2;
setzoomeffect this.light;
timeout = 0.05;
}
__________________
Dark Frontier
The enemy is surrounding us all,more evil than a human could ever imagine.

Dark Fontier Coming Soon
Reply With Quote
  #3  
Old 03-04-2002, 03:12 AM
Faheria_LAT3 Faheria_LAT3 is offline
The **** hit the fan...
Faheria_LAT3's Avatar
Join Date: Jul 2001
Posts: 5,266
Faheria_LAT3 is on a distinguished road
Quote:
Originally posted by la_builder
all rights reserved
__________________
AIM:Shadrock17

Idiot of the millennium: Gonmon
Reply With Quote
  #4  
Old 03-04-2002, 05:16 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Quote:
Originally posted by Kaimetsu
Go for gani scripts, they make placement much neater.
yeah :P

a lot easier
__________________
[signature]insert here[/signature]
Reply With Quote
  #5  
Old 03-04-2002, 05:21 AM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
-=Josey=-
This may be rather long, but, I'm at work and had to do it quickly. You can change it or do whatever you want with it. It's attached.
Attached Files
File Type: txt defnpcbrighttodimlight.txt (1.7 KB, 220 views)
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #6  
Old 03-04-2002, 12:08 PM
ShadoWarrior911 ShadoWarrior911 is offline
Registered User
Join Date: Feb 2002
Location: United States
Posts: 16
ShadoWarrior911 is on a distinguished road
Send a message via AIM to ShadoWarrior911 Send a message via Yahoo to ShadoWarrior911
Talking Thanks

Hey Guys, Thanks alot for helpng me out with the code, ill try them all out when i have some time

~ShadoWarrior
Reply With Quote
  #7  
Old 03-04-2002, 12:55 PM
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
You could even use params with the ganis. That way you could just set the gani as like light4.png and than light4.png or something....
__________________

!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
  #8  
Old 03-05-2002, 03:13 AM
la_builder la_builder is offline
Registered User
Join Date: Jan 2002
Location: Holland
Posts: 154
la_builder is on a distinguished road
lol i wrote all right reserved caus i didnt make it its graal 2001's
because i didnt want some ******* people to say "you stole it from graal 2001 you noobie npc stealer" lol a p2p server can use it without any probs i think
__________________
Dark Frontier
The enemy is surrounding us all,more evil than a human could ever imagine.

Dark Fontier Coming Soon
Reply With Quote
  #9  
Old 03-06-2002, 06:16 PM
cell424 cell424 is offline
Registered User
Join Date: Mar 2001
Location: USA/PA
Posts: 184
cell424 is on a distinguished road
Send a message via AIM to cell424
These scripts are from g2k1 and must be given full credit to.

NPC Code:

if (created)
dontblock;
//#CLIENTSIDE
if (playerenters) {
setcoloreffect 1,1,0,0.4;
drawaslight;
this.light = 2;
timeout = 0.05;
}
if (timeout) {
this.light += random(-0.2,0.2);
if (!(this.light in |1,3|))
this.light = 2;
setzoomeffect this.light;
timeout = 0.05;
}



NPC Code:

if (created)
dontblock;
//#CLIENTSIDE
if (playerenters) {
setcoloreffect 1,0,0,0.99;
drawaslight;
this.light = 2;
timeout = 0.05;
}
if (timeout) {
this.light += random(-0.2,0.2);
if (!(this.light in |1,3|))
this.light = 2;
setzoomeffect this.light;
timeout = 0.05;
}

__________________
Trunks
Reply With Quote
  #10  
Old 03-06-2002, 08:24 PM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by la_builder
{full rights preserved to graal2001 i think lol}
if (created)
dontblock;
//#CLIENTSIDE
if (playerenters) {
setcoloreffect 1,1,0,0.4;
drawaslight;
this.light = 2;
timeout = 0.05;
}
if (timeout) {
this.light += random(-0.2,0.2);
if (!(this.light in |1,3|))
this.light = 2;
setzoomeffect this.light;
timeout = 0.05;
}
That one would skip when it gets above 3 or below 1
Reply With Quote
  #11  
Old 03-07-2002, 06:17 PM
SSRobgeta SSRobgeta is offline
Ebil Cloud = l337 *kupo*
SSRobgeta's Avatar
Join Date: Aug 2001
Location: Monroeville, PA
Posts: 1,084
SSRobgeta is on a distinguished road
Send a message via AIM to SSRobgeta
Why don't you just do...
NPC Code:

// NPC made by Rob Getashu
if (playerenters) {
setcoloreffect 215,0,1,0.99;
setzoomeffect 2;
dontblock;
drawaslight;
}
//#CLIENTSIDE
if (playerenters || timeout) {
setzoomeffect random(0.1,2);
timeout = random(0.1,0.5);
}

__________________
Rob Getashu
Anyone can show you the way, but the real adventure is finding it yourself..
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 PM.


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