Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Glow Effect On Player (https://forums.graalonline.com/forums/showthread.php?t=87450)

littlekinky 08-17-2009 11:34 PM

Glow Effect On Player
 
Ok, I dont really script infact i cant script im jsut wondering if i wanted to add a glow effect to players, how would i go around to doing that something like,

In a tailor when you press the color of the glow it sets the glow to the player i am jsut wondering how this could be doen im sure theres many ways jsut would like to no how?

thanks

Switch 08-18-2009 01:08 AM

Quote:

Originally Posted by littlekinky (Post 1515666)
Ok, I dont really script infact i cant script im jsut wondering if i wanted to add a glow effect to players, how would i go around to doing that something like,

In a tailor when you press the color of the glow it sets the glow to the player i am jsut wondering how this could be doen im sure theres many ways jsut would like to no how?

thanks

Gani scripting.

Chompy 08-18-2009 01:30 AM

Quote:

Originally Posted by Switch (Post 1515725)
Gani scripting.

and player attributes.

TESTRETIS 08-18-2009 02:17 AM

GULTHEX gives really good tips and advice on these sorts of things.

Schetti 08-18-2009 09:48 AM

I've made a simple CTF-game times ago, and to show the flag by the player, I used a weapon I added to the player.
You could do the same and add a weapon to the players.
The script could be like:
PHP Code:

function onGlow() {
if ( 
this.glowmod ) {
setImg("light.png");
setcoloreffect(0.4,0.4,0.4,0.5);
this.player.x;
this.player.y;
this.level player.level;
onGlow;
 }
}
//you need to try if it works with client or serverside


//#CLIENTSIDE

function onPlayerChats() {
if (
player.chat == "setglow") {
this.glowmode = !this.glowmode
onGlow
;
 }


Well, as I said, I didnt script for a while so this script will have some fails in it, but its a beginn.

Pelikano 08-18-2009 05:48 PM

Your script won't work...

You cannot call a serverside function like that clientside, you'd have to use triggerserver()

cbk1994 08-18-2009 10:13 PM

Quote:

Originally Posted by Schetti (Post 1515916)
I've made a simple CTF-game times ago, and to show the flag by the player, I used a weapon I added to the player.
You could do the same and add a weapon to the players.
The script could be like:
PHP Code:

function onGlow() {
if ( 
this.glowmod ) {
setImg("light.png");
setcoloreffect(0.4,0.4,0.4,0.5);
this.player.x;
this.player.y;
this.level player.level;
onGlow;
 }
}
//you need to try if it works with client or serverside


//#CLIENTSIDE

function onPlayerChats() {
if (
player.chat == "setglow") {
this.glowmode = !this.glowmode
onGlow
;
 }


Well, as I said, I didnt script for a while so this script will have some fails in it, but its a beginn.

There are quite a few things wrong with that, I recommend that anyone reading this not look at that code for pointers.

You should do something like this:

PHP Code:

//#CLIENTSIDE
function onCreated() {
  
onTimeOut();
}

function 
onTimeOut() {
  
hideimgs(200400); // lazy :[
  
  
for (temp.pl players) {
    
showimg(200 pl.id"light2.png"pl.1.5pl.1.5);
    
changeimgvis(200 pl.id0);
    
changeimgcolors(200 pl.id100.7);
  }
  
  
setTimer(0.05);


You can play around with the positions, and add a player.attr for the glow colors.

jkldogg 03-14-2010 06:00 PM

sweet
 
Quote:

Originally Posted by cbk1994 (Post 1516101)
There are quite a few things wrong with that, I recommend that anyone reading this not look at that code for pointers.

You should do something like this:

PHP Code:

//#CLIENTSIDE
function onCreated() {
  
onTimeOut();
}

function 
onTimeOut() {
  
hideimgs(200400); // lazy :[
  
  
for (temp.pl players) {
    
showimg(200 pl.id"light2.png"pl.1.5pl.1.5);
    
changeimgvis(200 pl.id0);
    
changeimgcolors(200 pl.id100.7);
  }
  
  
setTimer(0.05);


You can play around with the positions, and add a player.attr for the glow colors.

This script is awesome chris.


All times are GMT +2. The time now is 06:17 PM.

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