Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-09-2007, 10:13 PM
pig132 pig132 is offline
professional troll
Join Date: May 2006
Posts: 260
pig132 will become famous soon enough
seteffect

Is it possible to have seteffect for just one area of a level? Like, for seteffect over a house..that part a color, the rest of the level be normal?
Reply With Quote
  #2  
Old 01-10-2007, 12:15 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
No, But you could simulate it with a big white image, and color it accordingly. Then use transparency mode (mode = 1 I believe).

PHP Code:
//Serverside 
function onCreated() {
  
setimg("some_white_image_thatyou_made.png");
  
dontblock();
}
//#CLIENTSIDE
function onCreated() {
  
drawaslight();
  
this.red 0this.green 0this.blue .5this.alpha .5;
  
setcoloreffect(this.red,this.green,this.blue,this.alpha);
  
seteffectmode(1);

Could also be done with showpoly too, might even be more flexible

PHP Code:

//#CLIENTSIDE
function onPlayerEnters() {
  
this.red 0this.green 0this.blue .5this.alpha .5;
  
this.wd 10//How many tiles wide?
  
this.ht 10//How many tiles long?
  
showpoly(200,{this.x,this.y,this.x+this.wd,this.y,this.x+this.wd,this.y+this.ht,this.x,this.y+this.ht});
  
changeimgvis(200,3);
  
changeimgcolors(200,this.red,this.green.this.blue,this.alpha);
  
changeimgmode(200,1);

__________________

subliminal message: 1+1=3
Reply With Quote
  #3  
Old 01-10-2007, 12:22 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
The showpoly would be the best way.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #4  
Old 01-10-2007, 12:44 AM
pig132 pig132 is offline
professional troll
Join Date: May 2006
Posts: 260
pig132 will become famous soon enough
Yeah, i tried it.. But when i try setting the alpha it stays set to .99 (pure white).
Reply With Quote
  #5  
Old 01-10-2007, 12:47 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
have you messed with seteffectmode()?
__________________
Deep into the Darkness peering...
Reply With Quote
  #6  
Old 01-10-2007, 12:51 AM
pig132 pig132 is offline
professional troll
Join Date: May 2006
Posts: 260
pig132 will become famous soon enough
No, i kept everything the same but this.alpha
Reply With Quote
  #7  
Old 01-11-2007, 12:13 AM
Falcor Falcor is offline
Darth Cucumber
Falcor's Avatar
Join Date: Mar 2001
Location: At School
Posts: 2,874
Falcor is on a distinguished road
Send a message via ICQ to Falcor Send a message via AIM to Falcor Send a message via MSN to Falcor Send a message via Yahoo to Falcor
Try this alternate code, it seems to work better for some reason:

PHP Code:
//#CLIENTSIDE
function onPlayerEnters() {
  
this.red 0;
  
this.green 0;
  
this.blue .5;
  
this.alpha .5;
  
this.wd 10//How many tiles wide?
  
this.ht 10//How many tiles long?
  
showpoly(200,{this.x,this.y,this.x+this.wd,this.y,this.x+this.wd,this.y+this.ht,this.x,this.y+this.ht});
  
with(findimg(200)) {
    
red thiso.red;
    
green thiso.green;
    
blue thiso.blue;
    
alpha thiso.alpha;
    
layer 3;
    
mode 1;
  }

__________________

subliminal message: 1+1=3
Reply With Quote
  #8  
Old 01-12-2007, 02:33 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
The seteffect thing is now just a fullscreen-showpoly with mode 3.

Update: fixed the description on the wiki.

Last edited by Admins; 01-12-2007 at 02:46 PM..
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 09:49 AM.


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