Hey LE,
I am using SpawnMob() to spawn a groundspawn but once it gets spawned in the world, it's not treated as a groundspawn in the game. If the groundspawn is spawned by world (it has a zonespawnentry), then it can be harvested fine. I took a look at what SpawnMob() does exactly, and it just calls AddSpawn to the zone, so I'm assuming somehow we need to do what AddGroundSpawn() does too? I'm not too familiar with exactly how spawns work yet, so I wanted to see if you had an easy or good way of letting the LUA function SpawnMob() spawn groundspawns.
Thanks!
SpawnMob()
Moderator: Team Members
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Re: SpawnMob()
I'm surprised it even added the groundspawn to the zone. I can't see a reason why it would. EQ2Emu_lua_Spawn calls World::GetSpawn and there isn't an entry type for ground spawns. Are you sure the ID is a ground spawn? I just added an entry in that function for ground spawns, so it should fix the issue.
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: SpawnMob()
Yep. I just double checked. The spawn is actually an object which has a groundspawn_id. If the groundspawn is spawned by world, I can harvest it. If spawned by LuaFunctions::SpawnMob, I can't.
Sweet, I'll test it out once it's on the SVN, thanks.
Sweet, I'll test it out once it's on the SVN, thanks.
- John Adams
- Retired
- Posts: 9684
- Joined: Thu Jul 26, 2007 6:27 am
- EQ2Emu Server: EQ2Emulator Test Center
- Characters: John
- Location: Arizona
- Contact:
Re: SpawnMob()
Not sure if this pertains to your situation, Scat... but as I am converting some "npc" or "object" spawns to spawn_ground, I may forget to remove the old record in spawn_objects. When curious, check spawn, spawn_npcs, spawn_objects, and spawn_grounds to make sure only spawn + 1 type has the spawn record.
I honestly do not know how world would handle a spawn with an object -and- a ground record.
I honestly do not know how world would handle a spawn with an object -and- a ground record.
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: SpawnMob()
Okay cool, I'll check that out too.
Who is online
Users browsing this forum: No registered users and 0 guests