Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   no body will show (https://forums.graalonline.com/forums/showthread.php?t=78045)

Angel_Light 12-24-2007 05:08 AM

no body will show
 
I have a simple custom char showing script (this.actor.blah) it works fine but when I use stretchx or change the alpha/mode it hides the body but the head/shield and shadow are still showing. Why is this?

PHP Code:

withfindImg10))
  {
  
    
this.player.2.5;
    
this.player.y;
    
    
layer 1;
    
    
playerlook false;
    
    
this.ani "idle";
    
this.actor.mode  
    
this.actor.red =
    
this.actor.green =
    
this.actor.blue 1;
    
this.actor.alpha 0.5;
  
    
this.actor.head "head0.png";
    
this.actor.body "body.png";
    
this.actor.shield "shield1.png";
    
    
this.actor.colors0] = "orange";
    
this.actor.colors1] = "white";
    
this.actor.colors2] = "blue";
    
this.actor.colors3] = "red";
    
this.actor.colors4] = "black";
    
  } 


coreys 12-24-2007 05:13 AM

showcharacter();?

DustyPorViva 12-24-2007 05:18 AM

I have this problem a lot... no idea how to fix it. Showcharacter is used for setting an NPC as a character, won't help here.
Also, not sure of your intentions, but remember showimgs with an index lower than 200 will be shown to everyone.

Angel_Light 12-24-2007 05:18 AM

nope, and yes Dusty I know. =P

cbk1994 12-24-2007 03:25 PM

May not help in your case, but if you can I would use a GuiShowImgCtrl.

coreys 12-24-2007 05:39 PM

Use setcharani() rather than setting this.ani.

Angel_Light 12-24-2007 07:21 PM

Quote:

Originally Posted by coreys (Post 1365570)
Use setcharani() rather than setting this.ani.

shouldn't really matter, According the Invern I guess, this.ani is the correct wayand setcharani() is just there for compatibility with GS1.

gemini2 12-24-2007 11:35 PM

PHP Code:

this.actor.ani "idle";
this.actor.dir 2

?

Angel_Light 12-25-2007 07:48 AM

no this.actor.ani is not a valid var, just use getvarnames() to get the vars. =P

gemini2 12-25-2007 04:23 PM

Quote:

Originally Posted by Angel_Light (Post 1365676)
no this.actor.ani is not a valid var, just use getvarnames() to get the vars. =P

then I would suggest you to do what Chris said:

Quote:

Originally Posted by cbkbud (Post 1365556)
May not help in your case, but if you can I would use a GuiShowImgCtrl.

PHP Code:

new GuiShowImgCtrl("test_actor") {
  
10;
  
10;
  
width 60;
  
height 60;
  
layer 1;
  
playerlook false;
  
// start actor
  
ani "idle";
  
actor.headimg "head.png";
  
actor.bodyimg "body.png";
  
actor.shieldimg "no-shield.png";
  
temp.0;
  for(
temp.color : {"orange""white""blue""red""black"}) {
    
actor.colors[i] = color;
    
++;
  }


Oh, and:
PHP Code:

sword  -> player.swordimg
shield 
-> player.shieldimg
head   
-> player.headimg
Body   
-> player.bodyimg 



All times are GMT +2. The time now is 08:23 AM.

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