Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Old Scripting Engine (GS1)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-17-2006, 11:05 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
goggles

This is an NPC for Infrared goggles, half of the script isn't here (the part for setting the colors, because we have a day/night system that needs to be countered). Anyway, it kinda works, my only problems with it is that it counts some NPCs as players, not just npcs with showcharacter, but also random ones without showcharacter. Also, players can see the glow around themselves, even if they aren't using goggles. Any suggestions?
NPC Code:
//#CLIENTSIDE
if(weaponfired && this.inuse==0)
{
this.inuse=1;
setstring client.infgoggles,1;
setplayerprop #P1,dr-hat008.png;
}
else if(weaponfired && this.inuse==1)
{
this.inuse=0;
setstring client.infgoggles,0;
setplayerprop #P1,;
seteffect 0,0,0,0;
hideimg 914775;
for(this.i=0;this.i<playerscount;this.i++)
{
hideimg this.i;
hideimg this.i+1;
}
timeout=0;
}
if(this.inuse==1 || timeout)
{
for(this.i=0;this.i=<playerscount;this.i++)
{
setstring client.players,#v(this.i);
showtext 914775,550,10,Arial,b,Players:#s(client.players);
changeimgzoom 914775,.5;
changeimgvis 914775,5;
showimg this.i,ion.gif,players[strtofloat(#s(client.players))].x+.5,players[strtofloat(#s(client.players))].y+.75;
changeimgcolors this.i,1,.25,.25,.99;
changeimgzoom this.i,2;
changeimgvis this.i,1;
}
timeout=.05;
}

Attached Thumbnails
Click image for larger version

Name:	strangenpc.png
Views:	317
Size:	61.1 KB
ID:	34949  
Reply With Quote
 


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:01 AM.


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