Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-17-2005, 10:16 AM
Aethorpe Aethorpe is offline
Their black hands protect
Aethorpe's Avatar
Join Date: Dec 2004
Location: Beyond infinite.
Posts: 265
Aethorpe is on a distinguished road
Send a message via AIM to Aethorpe Send a message via MSN to Aethorpe
Showimg is a pain in the...

I am trying to use an NPC with a list of showimg to display all the images for each level, rather that just setting the NPC image and making alot of useless empty NPCs, and I can't get it to work if I set the x,y. I did, however, manage to get it to work if I set the NPC at the first image location and do showimg at x,y and then base all the other images off of the coordinates of the first image, like so.

NPC Code:

showimg 1,smokeani.mng,x,y;
showimg 2,smokeani.mng,x + 2,y;
showimg 3,smokeani.mng,x + 1,y - 1;
showimg 4,treetop.png,x -1,y + 23;



But now my problem is, if I walk out of range of the original NPC, all the rest disappear, even some that I would still need to be able to see, is there anyway to make them stay visible regardless of where I am in relation to the NPC containing the scripts?

Any suggestions are welcome, thanks.
__________________
Reply With Quote
  #2  
Old 01-17-2005, 10:19 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Perhaps your drawing layer was off, so the coordinates were not showing properly? Also, you can't see NPCs in levels you aren't in, unless you are using a gmap.

Could you post your original attempt to display it with set coordinates?
Reply With Quote
  #3  
Old 01-17-2005, 10:24 AM
Aethorpe Aethorpe is offline
Their black hands protect
Aethorpe's Avatar
Join Date: Dec 2004
Location: Beyond infinite.
Posts: 265
Aethorpe is on a distinguished road
Send a message via AIM to Aethorpe Send a message via MSN to Aethorpe
Quote:
Originally Posted by Lance
Perhaps your drawing layer was off, so the coordinates were not showing properly? Also, you can't see NPCs in levels you aren't in, unless you are using a gmap.

Could you post your original attempt to display it with set coordinates?
Well, I am using a gmap, and I never left the level, just walked off the screen from where the NPC was located.

My original attempt was something like this;

NPC Code:

showimg 1,smokeani.mng,48,6;

__________________
Reply With Quote
  #4  
Old 01-17-2005, 10:27 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Aethorpe
Well, I am using a gmap, and I never left the level, just walked off the screen from where the NPC was located.

My original attempt was something like this;

NPC Code:

showimg 1,smokeani.mng,48,6;

Are you in the upper-left-most level of the gmap? That is where that image would be shown.
Reply With Quote
  #5  
Old 01-17-2005, 10:34 AM
Aethorpe Aethorpe is offline
Their black hands protect
Aethorpe's Avatar
Join Date: Dec 2004
Location: Beyond infinite.
Posts: 265
Aethorpe is on a distinguished road
Send a message via AIM to Aethorpe Send a message via MSN to Aethorpe
Quote:
Originally Posted by Lance
Are you in the upper-left-most level of the gmap? That is where that image would be shown.
You mean, upper right? 48 x, 6 y? :o I tried it at 32 32 as well, and I was in the middle of the level, I tried lots of coordinates, it just didn't seem to help. :|

Oh, you mean in the top of the map. :O

Why would it be shown there, and not my current level?
__________________
Reply With Quote
  #6  
Old 01-17-2005, 10:39 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Aethorpe
You mean, upper right? 48 x, 6 y? :o I tried it at 32 32 as well, and I was in the middle of the level, I tried lots of coordinates, it just didn't seem to help. :|
I'm talking about the position of the level in the gmap. When you have a gmap, the coordinates measure from the top-left corner of the top-left level of the gmap. If you were in the top-left level of the gmap, you would have x and y-coordinates between 0 and 60. If you were in the second level along the top of the gmap, you would have x-coordinates between 60 and 120 and y-coordinates between 0 and 60. If you were in the second level down along the left side of the gmap, you would have x-coordinates between 0 and 60, but y-coordinates between 60 and 120.

If you were drawing something at any coordinates between 0 and 60, it would be shown at the top-left level of the gmap.
Reply With Quote
  #7  
Old 01-17-2005, 10:42 AM
Aethorpe Aethorpe is offline
Their black hands protect
Aethorpe's Avatar
Join Date: Dec 2004
Location: Beyond infinite.
Posts: 265
Aethorpe is on a distinguished road
Send a message via AIM to Aethorpe Send a message via MSN to Aethorpe
Quote:
Originally Posted by Lance
I'm talking about the position of the level in the gmap. When you have a gmap, the coordinates measure from the top-left corner of the top-left level of the gmap. If you were in the top-left level of the gmap, you would have x and y-coordinates between 0 and 60. If you were in the second level along the top of the gmap, you would have x-coordinates between 60 and 120 and y-coordinates between 0 and 60. If you were in the second level down along the left side of the gmap, you would have x-coordinates between 0 and 60, but y-coordinates between 60 and 120.

If you were drawing something at any coordinates between 0 and 60, it would be shown at the top-left level of the gmap.
Oh my, so my x needs to be something like 1190, and y needs to be like, 800ish? Yikes.

Thank you sir.

After some adjustments I found it sitting in a nearby tree, but it's still giving me the problem of if I walk away from the NPC, all the images it's meant to disappear. Do you know of a remedy for this?
__________________
Reply With Quote
  #8  
Old 01-17-2005, 10:48 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Aethorpe
Oh my, so my x needs to be something like 1190, and y needs to be like, 800ish? Yikes.

Thank you sir.
Something like that, yeah. The easiest way to find those coordinates out would be to add an NPC in there and have it report its x and y, then figure out the positions for the images based on that.
Reply With Quote
  #9  
Old 01-17-2005, 10:55 AM
Aethorpe Aethorpe is offline
Their black hands protect
Aethorpe's Avatar
Join Date: Dec 2004
Location: Beyond infinite.
Posts: 265
Aethorpe is on a distinguished road
Send a message via AIM to Aethorpe Send a message via MSN to Aethorpe
Quote:
Originally Posted by Lance
Something like that, yeah. The easiest way to find those coordinates out would be to add an NPC in there and have it report its x and y, then figure out the positions for the images based on that.
Good idea, is there some sort of print function?

But what of the problem of not being able to see them if you leave the range of the NPC, perhaps some way to attach the NPC to the player so it never goes out of range? Or to only display images with a certain x,y radius of a player?

I can't think of a way to do that. :|
__________________
Reply With Quote
  #10  
Old 01-17-2005, 11:00 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by Aethorpe
Good idea, is there some sort of print function?
NPC Code:
message x: #v(x), y: #v(y);



Quote:
But what of the problem of not being able to see them if you leave the range of the NPC, perhaps some way to attach the NPC to the player so it never goes out of range? Or to only display images with a certain x,y radius of a player?

I can't think of a way to do that. :|
I'm not sure I've encountered the behavior you're describing.
Reply With Quote
  #11  
Old 01-17-2005, 11:07 AM
Aethorpe Aethorpe is offline
Their black hands protect
Aethorpe's Avatar
Join Date: Dec 2004
Location: Beyond infinite.
Posts: 265
Aethorpe is on a distinguished road
Send a message via AIM to Aethorpe Send a message via MSN to Aethorpe
Quote:
Originally Posted by Lance
NPC Code:
message x: #v(x), y: #v(y);





I'm not sure I've encountered the behavior you're describing.
Try placing a working showimg NPC at the bottom left of a gmap'd level, and tell it to show it's image at the top right of that same level, then walk up to the top right and when the hidden location of the NPC is about 1-2 tiles out of view, the image on the other side of the map, that you can plainly see, vanishes. :|

It's a downright annoying.
__________________
Reply With Quote
  #12  
Old 01-17-2005, 07:18 PM
Evil_Trunks Evil_Trunks is offline
Evil
Evil_Trunks's Avatar
Join Date: Dec 2004
Posts: 391
Evil_Trunks is on a distinguished road
This is probably a "problem" with the way the NPC server handles showimgs on the GMAP.

Once the information about the actual NPC which is drawing the showimg is no longer being sent to the client, the client stops displaying that NPC's showimgs as well.

This is my guess.
__________________

Reply With Quote
  #13  
Old 01-17-2005, 07:52 PM
Aethorpe Aethorpe is offline
Their black hands protect
Aethorpe's Avatar
Join Date: Dec 2004
Location: Beyond infinite.
Posts: 265
Aethorpe is on a distinguished road
Send a message via AIM to Aethorpe Send a message via MSN to Aethorpe
Quote:
Originally Posted by Evil_Trunks
This is probably a "problem" with the way the NPC server handles showimgs on the GMAP.

Once the information about the actual NPC which is drawing the showimg is no longer being sent to the client, the client stops displaying that NPC's showimgs as well.

This is my guess.
It's all offline though, there is no NPC server to do that, although the client itself could be doing that, but is there a way around it?
__________________
Reply With Quote
  #14  
Old 01-17-2005, 10:15 PM
xManiamaNx xManiamaNx is offline
Supreme Dictator
xManiamaNx's Avatar
Join Date: Nov 2002
Location: 127.0.0.1
Posts: 385
xManiamaNx is on a distinguished road
Send a message via MSN to xManiamaNx Send a message via Yahoo to xManiamaNx
I've seen this happen before. Have something showimg something, and walk where the actual npc would be off the screen, the showimg will hide if it isn't on layer 4.
__________________
Maniaman

Play Maloria Now: [2.3] [3]
Maloria Website

Reply With Quote
  #15  
Old 01-18-2005, 04:59 AM
Shaun Shaun is offline
Registered User
Shaun's Avatar
Join Date: Jul 2003
Location: Canada
Posts: 1,070
Shaun is a jewel in the roughShaun is a jewel in the rough
Not sure if this is related, but online, in a GMapped level, NPC scripts are "hidden" for me. I know they are there, because if they were imagged before, they will still block (creating invisible force fields!). If the levels are not GMapped, the NPC scripts are there and normal and good, but once the levels are GMapped, the images "hide". Nobody seems to understand GMaps. I don't seem to understand anything beyond the third grade level.

Help
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


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