Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-25-2008, 07:38 AM
[email protected] zeektheman2@hotmail.com is offline
SirZeek
Join Date: May 2008
Posts: 37
zeektheman2@hotmail.com is on a distinguished road
Player Position

I am use showani to display an ani. It works fine on an single level but, when i go on to the gmap it does not stay with the player. I am check position with player.x, and player.y . Any Ideas?
Reply With Quote
  #2  
Old 12-25-2008, 09:17 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
In the future it's best if you show the script you're using that's giving you a problem, but here is my advice:

PHP Code:
showani(indexplayer.getmapx(player.level.name) * 64player.getmapy(player.level.name) * 64player.dir"aniname"); 
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #3  
Old 12-26-2008, 07:33 AM
[email protected] zeektheman2@hotmail.com is offline
SirZeek
Join Date: May 2008
Posts: 37
zeektheman2@hotmail.com is on a distinguished road
Ok i tried what you gave to me but theres a problem, it works on the first level of the gmap but after, you leave that level to another on the gmap the ani doesnt appears no more.

PHP Code:
//#CLIENTSIDE
function onTimeOut()
{
  if ( 
client.infected.speed )
  {
    if ( 
client.mud.punching ) return;
     if ( 
client.casting ) return;
      for(
temp.04++)
      {
        if (
keydown(i))
        {
          if (!
canmove(i) && !player.ani.starts("sword"))
          {
            
player.+= vecx(i)* 0.5;
            
player.+= vecy(i)* 0.5;
          }
        }
      }
   
showTrail();
  }else
   
hideimgs200 206 );  

  if ( 
client.infected.heal )
  {
   
showani(1player.getmapx(player.level.name) * 64player.getmapy(player.level.name) * 64player.dir"zeek_effect_heal"); 
   
changeimgvis(1,3);
  }else
   
hideimg(1);
}   


setTimer(0.005); 
Reply With Quote
  #4  
Old 12-26-2008, 07:37 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
May need to do some better order of operations, I'm not entirely sure.
PHP Code:
showani(1player.+ (getmapx(player.level.name) * 64), player.+ (getmapy(player.level.name) * 64), player.dir"zeek_effect_heal"); 
See if that works for you.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #5  
Old 12-26-2008, 07:56 AM
[email protected] zeektheman2@hotmail.com is offline
SirZeek
Join Date: May 2008
Posts: 37
zeektheman2@hotmail.com is on a distinguished road
hmm its still the same, wonder whats the problem.
Reply With Quote
  #6  
Old 12-26-2008, 11:34 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
tried something like

PHP Code:
showani(1player.x%64player.y%64player.dir"zeek_effect_heal"); 
?


Or you could take a look at player.attr[1-30] and use those to show effects (Just assign a gani to one of the attr's like.. player.attr[20] = "zeek_effect_heal.gani";)
__________________
Reply With Quote
  #7  
Old 12-26-2008, 01:32 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Chompy's position%64 should work.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #8  
Old 12-26-2008, 01:38 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
You also have the timeout outside of the timeout event block. More over, a timeout can't be smaller than 0.05, I believe. Yours is 0.005. I doubt this is actually the problem but it's worth fixing and remembering for the future.
Reply With Quote
  #9  
Old 12-26-2008, 01:54 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Codein View Post
You also have the timeout outside of the timeout event block. More over, a timeout can't be smaller than 0.05, I believe. Yours is 0.005. I doubt this is actually the problem but it's worth fixing and remembering for the future.
The smallest might be 0.05 on clientside, but on serverside it's 0.1.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #10  
Old 12-26-2008, 07:20 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Ah yeah, I think mine would have worked better for a serverside situation :P
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #11  
Old 12-26-2008, 07:29 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Tigairius View Post
Ah yeah, I think mine would have worked better for a serverside situation :P
You could have just used player.x, player.y for that though
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #12  
Old 12-27-2008, 01:07 AM
[email protected] zeektheman2@hotmail.com is offline
SirZeek
Join Date: May 2008
Posts: 37
zeektheman2@hotmail.com is on a distinguished road
hmm, Its still not working

Last edited by [email protected]; 12-27-2008 at 10:17 AM..
Reply With Quote
  #13  
Old 12-27-2008, 11:28 AM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Post the script you're currently using at the moment, please.
Reply With Quote
Reply


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 06:24 AM.


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