SeeingBlue Posted September 2, 2011 Author Share Posted September 2, 2011 I added **Shop As Long** to **NpcRec** on both the client & server. Modified the frmEditor_NPC with a combo box to populate with the currently available shops. Modified the modGameEditors. Then on the server under **CanPlayerAttackNPC** I had it check to see if the NPC is a shopkeeper & if so then **SendOpenShop**. ~~My problem lies somewhere in storing & moving the data for NPC. Everything is off, Name isn't showing up, sprite isn't showing up. The Npc has no health. I got the data offset when storing somehow & I can't figure out what I missed. Any ideas?~~After doing further investigation, I discovered that my code works fine, but something is wrong with the first NPC slot in the NPC Editor. I created the same NPC in the second slot & everything works as intended. I tried to created a new NPC in the first slot again & it doesn't show up in the map editor under the NPC Spawn, only shows the second NPC as the first. Link to comment Share on other sites More sharing options...
erkro1 Posted September 2, 2011 Share Posted September 2, 2011 @SeeingBlue:> I added **Shop As Long** to **NpcRec** on both the client & server. Modified the frmEditor_NPC with a combo box to populate with the currently available shops.Add a thing like this:```Call OpenShop(index, Npc(npcnum).shop)```to PlayerAttackNpc Link to comment Share on other sites More sharing options...
SeeingBlue Posted September 2, 2011 Author Share Posted September 2, 2011 Sorry, Erwin. I didn't mean to post when I did. I edited my original post now. Link to comment Share on other sites More sharing options...
SeeingBlue Posted September 2, 2011 Author Share Posted September 2, 2011 After doing further investigation, I discovered that my code works fine, but something is wrong with the first NPC slot in the NPC Editor. I created the same NPC in the second slot & everything works as intended. I tried to created a new NPC in the first slot again & it doesn't show up in the map editor under the NPC Spawn, only shows the second NPC as the first. Link to comment Share on other sites More sharing options...
SeeingBlue Posted September 2, 2011 Author Share Posted September 2, 2011 If I had 1 NPC & NpcSpawn on the map & I deleted the NPC folder from the server, would that have created a ghost NPC? I think this may be what I am experiencing. Link to comment Share on other sites More sharing options...
Geek Posted September 2, 2011 Share Posted September 2, 2011 That would delete the NPC's information, and the Map information still retains the fact that there is indeed an NPC there. I've had this happen before, from my own goofs when changing around my NPCs in the editor and not knowing I still had one out there. But in my experience when this happens you can't see the NPC at all. Its just there. In which case you go into your map options and find where you set NPCs, and it should be blank instead of having the NPC's name. Just remove that NPC and you're good to go.Edit- I believe NPC Spawn goes by the NPC number, not the actual NPC saved in that NPC slot, so if you change or delete the NPC, the spawn will spawn the new NPC or spawn my aforementioned blank NPCs. Link to comment Share on other sites More sharing options...
SeeingBlue Posted September 2, 2011 Author Share Posted September 2, 2011 I found the ghost, I was able to delete all the NPCs and on 2 of my maps I still had a blank space in map editors NPC spawn combo box. So I recreated the first NPC and he's spawning on my first map without a spawn point. He won't go away even when I delete…. Link to comment Share on other sites More sharing options...
Geek Posted September 2, 2011 Share Posted September 2, 2011 Have you hard-coded him?I mean, at this point I'm kind of lost as to what would cause the problem. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now