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 08-19-2012, 02:46 PM
VeriApplez VeriApplez is offline
VeriApplez
VeriApplez's Avatar
Join Date: Aug 2012
Posts: 25
VeriApplez is an unknown quantity at this point
Level Dimmer?

I was wondering how do people make a whole level darker and lighter >.> Im really curious also I was thinking of using it in one of my levels.
Reply With Quote
  #2  
Old 08-19-2012, 03:03 PM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
My last post was kind of sloppy so I'll rewrite it.

You'll want to use seteffect(r,g,b,a); I'm not sure if you're talking about creating a fade effect or not but if you are you'll need to modify the alpha in a loop to get the desired effect. If you want to test it in the offline editor you'll have to use seteffect r,g,b,a;

PHP Code:
//#CLIENTSIDE
function onCreated(){
  
setEffect(0.4,0.9,0.2,.8); // setEffect(red,green,blue,alpha)

Alternatively you can use backpals if you want to get punched in the face.

Last edited by Cubical; 08-19-2012 at 03:16 PM.. Reason: rewriting post
Reply With Quote
  #3  
Old 08-19-2012, 03:09 PM
VeriApplez VeriApplez is offline
VeriApplez
VeriApplez's Avatar
Join Date: Aug 2012
Posts: 25
VeriApplez is an unknown quantity at this point
Thanks Cubical
Ill test it out.
Reply With Quote
  #4  
Old 08-19-2012, 03:11 PM
VeriApplez VeriApplez is offline
VeriApplez
VeriApplez's Avatar
Join Date: Aug 2012
Posts: 25
VeriApplez is an unknown quantity at this point
Awesome it worked thanks
Reply With Quote
  #5  
Old 08-19-2012, 03:13 PM
VeriApplez VeriApplez is offline
VeriApplez
VeriApplez's Avatar
Join Date: Aug 2012
Posts: 25
VeriApplez is an unknown quantity at this point
It works on graal editor but not online mode
Script: Function seteffect not found at line 1 in script of npcs[2] (in level onlinestartlocal.graal at pos (19, 31))
Reply With Quote
  #6  
Old 08-19-2012, 03:17 PM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
Quote:
Originally Posted by Cubical View Post
My last post was kind of sloppy so I'll rewrite it.

You'll want to use seteffect(r,g,b,a); I'm not sure if you're talking about creating a fade effect or not but if you are you'll need to modify the alpha in a loop to get the desired effect. If you want to test it in the offline editor you'll have to use seteffect r,g,b,a;

PHP Code:
//#CLIENTSIDE
function onCreated(){
  
setEffect(0.4,0.9,0.2,.8); // setEffect(red,green,blue,alpha)

Alternatively you can use backpals if you want to get punched in the face.

That works for me
Reply With Quote
  #7  
Old 08-19-2012, 03:21 PM
VeriApplez VeriApplez is offline
VeriApplez
VeriApplez's Avatar
Join Date: Aug 2012
Posts: 25
VeriApplez is an unknown quantity at this point
Ill try that
Reply With Quote
  #8  
Old 08-19-2012, 03:23 PM
VeriApplez VeriApplez is offline
VeriApplez
VeriApplez's Avatar
Join Date: Aug 2012
Posts: 25
VeriApplez is an unknown quantity at this point
dosent work still
Reply With Quote
  #9  
Old 08-19-2012, 03:27 PM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
PHP Code:
//#CLIENTSIDE
function onCreated(){
  
seteffect(0.30.20.40.8);

I have that in a WNPC and it works fine for me.
Reply With Quote
  #10  
Old 08-19-2012, 05:01 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by VeriApplez View Post
dosent work still
Works perfectly fine. If it doesn't, you're doing something wrong. Make sure to remove the space after the "//#CLIENTSIDE" the forum throws in there, since that'll break it. Also, stop double and triple posting.
__________________
Reply With Quote
  #11  
Old 08-19-2012, 05:45 PM
VeriApplez VeriApplez is offline
VeriApplez
VeriApplez's Avatar
Join Date: Aug 2012
Posts: 25
VeriApplez is an unknown quantity at this point
Ok, and sorry.
Reply With Quote
  #12  
Old 08-19-2012, 07:09 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by VeriApplez View Post
Ok, and sorry.
It's not a problem You're only learning remember. You made a decently good attempt at it anyway, but just take in what the others have said and play around. Good job.
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 09:59 PM.


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