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-17-2009, 11:34 PM
littlekinky littlekinky is offline
Registered User
littlekinky's Avatar
Join Date: Sep 2007
Posts: 185
littlekinky has a little shameless behaviour in the past
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
Reply With Quote
  #2  
Old 08-18-2009, 01:08 AM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by littlekinky View Post
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.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #3  
Old 08-18-2009, 01:30 AM
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
Quote:
Originally Posted by Switch View Post
Gani scripting.
and player attributes.
__________________
Reply With Quote
  #4  
Old 08-18-2009, 02:17 AM
TESTRETIS TESTRETIS is offline
Zvarri!
TESTRETIS's Avatar
Join Date: Oct 2003
Posts: 970
TESTRETIS has a spectacular aura about
GULTHEX gives really good tips and advice on these sorts of things.
Reply With Quote
  #5  
Old 08-18-2009, 09:48 AM
Schetti Schetti is offline
SC2 Player
Schetti's Avatar
Join Date: Nov 2008
Location: Austria
Posts: 269
Schetti is on a distinguished road
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.
__________________
“Peace cannot be kept by force. It can only be achieved by understanding.” – Albert Einstein
Reply With Quote
  #6  
Old 08-18-2009, 05:48 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
Your script won't work...

You cannot call a serverside function like that clientside, you'd have to use triggerserver()
Reply With Quote
  #7  
Old 08-18-2009, 10:13 PM
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
Quote:
Originally Posted by Schetti View Post
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.
__________________
Reply With Quote
  #8  
Old 03-14-2010, 06:00 PM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
sweet

Quote:
Originally Posted by cbk1994 View Post
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.
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
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 11:04 PM.


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