Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   player (https://forums.graalonline.com/forums/showthread.php?t=75883)

WanDaMan 07-27-2007 08:53 AM

player
 
1 Attachment(s)
so y dun't this show my player???

PHP Code:

new GuiShowImgCtrl("Test_ShowImg") {
  
10;
  
10;
  
width 60;
  
height 60;
  
playerlook true;
  
ani "walk";


instead it shows stefan [look at image, bottom right]

Chompy 07-27-2007 12:49 PM

PHP Code:

new GuiShowImgCtrl("actor_player") {
  
10;
  
10;
  
width 60;
  
height 60;
  
ani "idle";
  
with(showimg){
    
actor.head player.headimg;
    
actor.body player.bodyimg;
    
actor.colors[0] = player.colors[0];
    
actor.colors[1] = player.colors[1];
    
actor.colors[2] = player.colors[2];
    
actor.colors[3] = player.colors[3];
    
actor.shield player.shieldimg;
    
actor.dir 2;
    
actor.attr[1] = player.attr[1];
  }



cbk1994 07-27-2007 02:52 PM

Simply actor.playerlook = true would have solved the problem ^^

Edit: And why did you do with ( showimg )?

Chompy 07-27-2007 03:25 PM

Quote:

Originally Posted by cbkbud (Post 1334752)
Simply actor.playerlook = true would have solved the problem ^^

Edit: And why did you do with ( showimg )?

Old habbit >_<

WanDaMan 07-27-2007 07:16 PM

are u sure...? didn't work
PHP Code:

//#CLIENTSIDE
new GuiShowImgCtrl("Test_ShowImg") { 
  
10
  
10
  
width 60
  
height 60
  
actor.playerlook true
  
ani "walk"



Twinny 07-27-2007 08:12 PM

I grabbed this from an old script of mine. I found playerlook to be shifty for myself as well.

PHP Code:

function setactor() 
{
  
temp.Tailorani.actor;
  for (
i=0;i<6;i++) a.colors[i] = player.colors[i];
  
a.body player.body;
  
a.head player.head;
  
a.body player.body;
  
a.shield player.shield;


From this, you could do

PHP Code:

//#CLIENTSIDE
new GuiShowImgCtrl("Test_ShowImg"

  
10
  
10
  
width 60
  
height 60
  for (
i=0;i<6;i++) actor.colors[i] = player.colors[i]; 
  
actor.body player.body;
  
actor.head player.head;
  
actor.body player.body;
  
actor.shield player.shield;
  
ani "walk"


Should hopefully work for ya

WanDaMan 07-28-2007 07:27 PM

no work.
PHP Code:


  this
.drawImage = function(imageData)
  {    
    new 
GuiShowImgCtrl("image_" temp.imageData[0]) 
    {
      for (
temp.objectDatatemp.imageData[1])
      {
        if (
temp.objectData[0] == "playerlook")
        {
          
actor.playerlook true;
          
actor.body player.body;
          
actor.head player.head;
          
actor.shield player.shield;
          for (
temp.0temp.6temp.i++)
          {
            
actor.colors[temp.i] = player.colors[temp.i];
          }
          continue;
        }
        ( @ 
temp.objectData[0]) = temp.objectData[1];
      }

      if (
temp.imageData[2].size() != 0)
      {
        
thiso.catchevent(this"onMouseDown"temp.imageData[2][0]);
      }
      
      
this.bringtofront();
    }
  }; 

here is how it is called

PHP Code:

  drawImage( {"image-Player", { {"position", {(thiso.backgroundSize[0] - 64), temp.newPosition[1] }}, {"extent", {4848}}, {"playerlook"} } }); 

the position and everything should work, it even reads the playerlook. Doesn't display the player look tho

godofwarares 07-28-2007 08:35 PM

Quote:

Originally Posted by WanDaMan (Post 1335060)
no work.
PHP Code:


  this
.drawImage = function(imageData)
  {    
    new 
GuiShowImgCtrl("image_" temp.imageData[0]) 
    {
      for (
temp.objectDatatemp.imageData[1])
      {
        if (
temp.objectData[0] == "playerlook")
        {
          
actor.playerlook true;
          
actor.body player.body;
          
actor.head player.head;
          
actor.shield player.shield;
          for (
temp.0temp.6temp.i++)
          {
            
actor.colors[temp.i] = player.colors[temp.i];
          }
          continue;
        }
        ( @ 
temp.objectData[0]) = temp.objectData[1];
      }

      if (
temp.imageData[2].size() != 0)
      {
        
thiso.catchevent(this"onMouseDown"temp.imageData[2][0]);
      }
      
      
this.bringtofront();
    }
  }; 

here is how it is called

PHP Code:

  drawImage( {"image-Player", { {"position", {(thiso.backgroundSize[0] - 64), temp.newPosition[1] }}, {"extent", {4848}}, {"playerlook"} } }); 

the position and everything should work, it even reads the playerlook. Doesn't display the player look tho


showimg.actor.playerLook = true;
I suppose.

zokemon 07-29-2007 05:12 AM

You can always do actor.copyfrom(player) but that might copy some funny things.

Chompy 07-29-2007 09:05 AM

Have you tried what I suggested?


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

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