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 04-15-2007, 11:41 PM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
Cool seteffect aka daynight...

Ok, i have a cave where it gets dark when you go inside (which works fine...), then when you walk out u link to the gmap. on the gmap i want it to be light again, but whatever i do it wont work >

This is what i have in the cave:
PHP Code:
//#CLIENTSIDE
if (created){
dontblock;
drawaslight;
setcoloreffect 1,1,0,0.50;
timeout .5;
}
if (
timeout) {
seteffect ,,,random(.30,.60);
sleep random(.2,.1);
timeout .1;

And i also have:
PHP Code:
//#CLIENTSIDE
if (playerleaves) {
seteffect 0,0,0,.0;

non of this works... so on the gmap i have this script:
PHP Code:
//#CLIENTSIDE
if (created){
seteffect ,,,0;
}
if (
playerenters){
seteffect ,,,0;

and still it wont work x.x

can somone help me out?
__________________
**FLIP OUT**
Reply With Quote
  #2  
Old 04-15-2007, 11:52 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Just make a master control system that sets lighteffects based on the levels you are in or so (a wNPC).

If you're on the map, then you'd do:

PHP Code:
if (isonmap)
{
 
//seteffect here
}
else if (
startswith(whatever_cave.gmap,#L))
{
 
//seteffect here


etc...
Reply With Quote
  #3  
Old 04-16-2007, 12:05 AM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
Quote:
Originally Posted by Gambet View Post
Just make a master control system that sets lighteffects based on the levels you are in or so (a wNPC).

If you're on the map, then you'd do:

PHP Code:
if (isonmap)
{
 
//seteffect here
}
else if (
startswith(whatever_cave.gmap,#L))
{
 
//seteffect here


etc...
there would be alot of "else if's"...
__________________
**FLIP OUT**
Reply With Quote
  #4  
Old 04-16-2007, 12:09 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by theHAWKER View Post
there would be alot of "else if's"...
Then make the system with a for loop. And have an array of level prefixes and seteffect parameters for the loop to use.
__________________
Reply With Quote
  #5  
Old 04-16-2007, 03:01 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
PHP Code:
setstring this.levelslevel1.nwlevel2.nw;
setstring this.level_level1.nw0001;
setstring this.level_level2.nw0011;
setstring this.startoverworldcavegmapelitehouse;
setstring this.start_overworld0001;
setstring this.start_cavegmap0.5.51;
setstring this.start_elitehouse1.501;
for ( 
0this.levels.size(); a++ ) // I don't know the GS1 size var for an array, sorry!
{
  if ( 
strequals#L, #s( this.levels[a] ) ) )
  
{
    
setstring this.tempthis.( @ "level_" #s( this.levels[a] ) ); // Really sorry, not sure if this is possible in GS1
    
seteffect this.temp[0], this.temp[1], this.temp[2], this.temp[3];
  }
}
for ( 
0this.start.size(); a++ ) // I don't know the GS1 size var for an array, sorry!
{
  if ( 
startswith#s( this.start[a] ), #L ) )
  
{
    
setstring this.tempthis.( @ "start_" #s( this.start[a] ) ); // Really sorry, not sure if this is possible in GS1
    
seteffect this.temp[0], this.temp[1], this.temp[2], this.temp[3];
  }

A few things might need tweaked but I think that will work ...
__________________
Reply With Quote
  #6  
Old 04-17-2007, 12:29 AM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
ok thx to u guys i fixed it thank you
__________________
**FLIP OUT**
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 05:40 AM.


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