Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Showani (Simple, I know right?) (https://forums.graalonline.com/forums/showthread.php?t=81103)

DarkReaper0 08-08-2008 12:36 AM

Showani (Simple, I know right?)
 
PHP Code:

//#CLIENTSIDE
function onWeaponFired() {
  
showani(300,player.x,player.y,player.dir,player.ani);


Any Idea how to make a showani change colors?

I've tried all my ideas.

DrakilorP2P 08-08-2008 12:38 AM

TGaniObject.red
TGaniObject.green
TGaniObject.blue

cbk1994 08-08-2008 12:39 AM

PHP Code:

new GuiShowImgCtrl("Whatever") {
  
ani player.ani;
  
red .1;


Works fine like this on Vesporia (I didn't check the code, but that's the way we're doing it)

You tried changeimgcolors and findimg(300).red = .1, right?

DarkReaper0 08-08-2008 12:40 AM

Quote:

Originally Posted by DrakilorP2P (Post 1412333)
TGaniObject.red
TGaniObject.green
TGaniObject.blue


Tried that.

Changeimgcolors doesn't work either.

I guess I'll just go for a showimg control.

Inverness 08-08-2008 12:51 AM

Dusty, GuiShowImgCtrl is not the same as showimg() or showani().
Quote:

Originally Posted by DarkReaper0 (Post 1412335)
I guess I'll just go for a showimg control.

Do not.

PHP Code:

//#CLIENTSIDE
function onWeaponFired() {
  
with (findimg(300)) {
    
this.ani player.ani;
    
this.dir player.dir;
    
this.player.x;
    
this.player.y
  }


http://wiki.graal.net/index.php/Crea...lient/TShowImg

DarkReaper0 08-08-2008 12:56 AM

In retrospect a guishowimg won't suit my needs afterall >_<

Crow 08-08-2008 12:56 AM

Inverness, Dusty is not the same thing as Chris.

DarkReaper0 08-08-2008 01:00 AM

I've tried changeimgcolors() and findimg().red/blue/green with indexes both above and below 300.

I can make the damn thing zoom but not change colors, how irritating.

cbk1994 08-08-2008 01:03 AM

Quote:

Originally Posted by Inverness (Post 1412340)
Dusty, GuiShowImgCtrl is not the same as showimg() or showani().

I'm assuming you're talking to me? :confused:

I realize they are not the same; it seemed like it would work for him though, since he is displaying at an index above 200 (only to the player).

Crow 08-08-2008 01:14 AM

When using findImg(), use actor.red instead of red, and so on. Keep in mind the defaults of the rgb values are 1 here, so you have to set something lower if you want to change something. Example:

PHP Code:

with (findImg(666)) {
  
ani "idle";
  
layer 4;
  
200;
  
actor.red 1;
  
actor.green 1;
  
actor.blue 0;


Yellow idle gani.

Inverness 08-08-2008 01:20 AM

Crow is correct.
Quote:

Originally Posted by Crow (Post 1412343)
Inverness, Dusty is not the same thing as Chris.

:blush: Oh dear...

DarkReaper0 08-08-2008 01:27 AM

Issue resolved, crow solved it

Ty

xXziroXx 08-08-2008 01:38 AM

Quote:

Originally Posted by cbk1994 (Post 1412347)
I realize they are not the same; it seemed like it would work for him though, since he is displaying at an index above 200 (only to the player).

You do realize a GuiShowImgCtrl would be able to steal focus, while a TShowImg wouldn't? Use Gui stuff for Gui's only, and you'll live a much more healthy life.

cbk1994 08-08-2008 01:49 AM

Quote:

Originally Posted by xXziroXx (Post 1412363)
You do realize a GuiShowImgCtrl would be able to steal focus, while a TShowImg wouldn't? Use Gui stuff for Gui's only, and you'll live a much more healthy life.

Yeah, good point.


All times are GMT +2. The time now is 09:34 PM.

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