Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-20-2009, 05:38 PM
Mattehy Mattehy is offline
Developer
Mattehy's Avatar
Join Date: Jul 2009
Posts: 58
Mattehy is on a distinguished road
Nickname script. (Help Please)

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
this.img1 findimg(1);
  
with (this.img1) {
    
font "Comic Sans MS";
    
style "cb";
    
zoom 1;
  }
  
setTimer0.05 );
}

function 
onTimeout() {
  
with (this.img1) {
    
text player.nick;
    
player.1.5;
    
player.3;
  }
  
setTimer0.05 );

/\ My Current Nick Name Script.
Would their be a way to showunderplayer(); and change the color as well?
__________________
Develop 4 Lyf
Reply With Quote
  #2  
Old 08-20-2009, 06:06 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
You can change the color in findimg, with the variables: red, green, blue

I.e:

PHP Code:
with (findimg(1)) {
  
text player.nick;
  
player.1.5;
  
player.3;
  
layer 1// Play around with this, to determine where it draws anything.
  
red 1;
  
green 0;
  
blue 0;

However I would suggest you take a different route with your nickname script, and this would be for better as players would be able to disable them and such as.

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
setTimer(0.05);
}

function 
onTimeout() {
  
hideimgs(2001000); // This will need to be re-optimized as hiding then redrawing every frame is bad :(
  
drawNicknames();
}

function 
drawNicknames() {
  
// Loop through Players
  
for (temp.pplayers) {
    
// Draw Text under Player
    
with (findimg(200 temp.p.id)) {
      
temp.p.1.5;
      
temp.p.3;
      
style "bc";
      
text temp.p.nick;
    }
  }

I didn't include the enablefeatures part of the script because I assume you already know how to use it, also I noticed you deleted your thread when you had your problem fixed. Don't do that!
__________________
Quote:

Last edited by fowlplay4; 08-20-2009 at 06:23 PM..
Reply With Quote
  #3  
Old 08-20-2009, 06:22 PM
Mattehy Mattehy is offline
Developer
Mattehy's Avatar
Join Date: Jul 2009
Posts: 58
Mattehy is on a distinguished road
thanks that helped alot
__________________
Develop 4 Lyf
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:59 AM.


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