Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Level Dimmer? (https://forums.graalonline.com/forums/showthread.php?t=134267015)

VeriApplez 08-19-2012 02:46 PM

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.

Cubical 08-19-2012 03:03 PM

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.

VeriApplez 08-19-2012 03:09 PM

Thanks Cubical :D
Ill test it out.

VeriApplez 08-19-2012 03:11 PM

Awesome it worked thanks

VeriApplez 08-19-2012 03:13 PM

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))

Cubical 08-19-2012 03:17 PM

Quote:

Originally Posted by Cubical (Post 1702099)
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

VeriApplez 08-19-2012 03:21 PM

Ill try that

VeriApplez 08-19-2012 03:23 PM

dosent work still

Cubical 08-19-2012 03:27 PM

PHP Code:

//#CLIENTSIDE
function onCreated(){
  
seteffect(0.30.20.40.8);


I have that in a WNPC and it works fine for me.

Crow 08-19-2012 05:01 PM

Quote:

Originally Posted by VeriApplez (Post 1702106)
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.

VeriApplez 08-19-2012 05:45 PM

Ok, and sorry.

Emera 08-19-2012 07:09 PM

Quote:

Originally Posted by VeriApplez (Post 1702112)
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.


All times are GMT +2. The time now is 04:15 PM.

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