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 05-19-2007, 04:41 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Online lights

I have a light effect. The entire script is run clientside. It works offline but not online (even though the entire script is clientside.) Why is this?
__________________
Reply With Quote
  #2  
Old 05-19-2007, 04:48 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
What's the script?
Reply With Quote
  #3  
Old 05-19-2007, 06:39 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
Quote:
Originally Posted by DustyPorViva View Post
What's the script?
We're allowed to post complete scripts now?
__________________
Reply With Quote
  #4  
Old 05-19-2007, 06:54 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Lol, yeah Googie.
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #5  
Old 05-19-2007, 08:00 AM
Deadly_Killer Deadly_Killer is offline
Registered User
Join Date: Feb 2002
Posts: 227
Deadly_Killer is on a distinguished road
Quote:
Originally Posted by killerogue View Post
Googie.
Undefined user.
__________________
- Zidane / Zidaya
Reply With Quote
  #6  
Old 05-19-2007, 08:03 AM
Googi Googi is offline
A Serious Epidemic
Googi's Avatar
Join Date: Oct 2001
Location: Canada
Posts: 18,866
Googi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud ofGoogi has much to be proud of
Send a message via AIM to Googi
PHP Code:
//#CLIENTSIDE
if (playerenters||timeout) {
  
this.max=90;
  
setarray this.x,this.max;
  
setarray this.y,this.max;
  
setarray this.movex,this.max;
  
setarray this.movey,this.max;
  
setarray this.active,this.max;
  
setarray this.speed,this.max;
  
setarray this.zoom,this.max;
  
setarray this.color1,this.max;
  
setarray this.color2,this.max;
  
setarray this.color3,this.max;
  for (
this.i=0;this.i<this.max;this.i++) {
    if (
this.active[this.i]=false) {
      
this.movex[this.i]=cos(this.angle);
      
this.movey[this.i]=sin(this.angle);
      
this.x[this.i]=x;
      
this.y[this.i]=y;
      
this.zoom[this.i]=random(.1,1.3);
      
this.color1[this.i]=random(0,1);
      
this.color2[this.i]=random(0,1);
      
this.color3[this.i]=random(0,1);
      
this.speed[this.i]=random(.3,1);
      
this.angle+=random(1,10);
      
this.active[this.i]=true;
    }
    else {
      if (
this.x[this.iin <-6,66> && this.y[this.iin <-6,66>) {
        
showimg this.i,light2.png,this.x[this.i],this.y[this.i];
        
changeimgzoom this.i,this.zoom[this.i];
        
changeimgcolors this.i,this.color1[this.i],this.color2[this.i],this.color3[this.i],.99;
        
this.x[this.i]+=this.movex[this.i]*this.speed[this.i];
        
this.y[this.i]+=this.movey[this.i]*this.speed[this.i];
      }
      else {
        
this.active[this.i]=false;
      }
    }
  }
  if (
this.angle>1000) {
    
this.angle=0;
  }
  
timeout=0.05;

__________________
Reply With Quote
  #7  
Old 05-19-2007, 01:29 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
What's the layer (changeimgvis()) for the light effects?
They would work if they were 4 or higher, since the x and y is setted to 90..

tried an other max value?

And, it might be that you are uploading it on a gs2 enabled server and some stuff might not work as it should do as it did offline/on a gs1 server
__________________
Reply With Quote
  #8  
Old 05-19-2007, 01: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
Rename this.x and this.y (e.g. to this.lightx and this.lighty), eventually also this.zoom and this.angle
Reply With Quote
  #9  
Old 05-19-2007, 03:23 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Stefan View Post
Rename this.x and this.y (e.g. to this.lightx and this.lighty), eventually also this.zoom and this.angle


Correct.


Such variables are predefined by the engine.
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 11:08 PM.


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