Spawned Mob Visual Issues
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Spawned Mob Visual Issues
Using the SpawnMob() LUA function, occasionally the mob spawned will become "un-seeable" from certain camera angles. If you use Tess's data, zone to OutpostOverlord and smack a beehive, you'll notice the spawned bee is only visible from certain angles of camera view.
This is also happening in the quest, preventative_maintenance, in the main quest line from Tayil N'Velex in OutpostOverlord. I spawn three hawks as a current fix for our item scripts that are coming, but the hawks are not visible unless your camera is pointed from certain angles (from behind the tents and up a little). Originally, I had thought this was a problem because the hawks' actual spawns are out of the world boundaries so I thought it was something with their location id? But now that the bees are doing it as well, I guess I'm wrong!
This is also happening in the quest, preventative_maintenance, in the main quest line from Tayil N'Velex in OutpostOverlord. I spawn three hawks as a current fix for our item scripts that are coming, but the hawks are not visible unless your camera is pointed from certain angles (from behind the tents and up a little). Originally, I had thought this was a problem because the hawks' actual spawns are out of the world boundaries so I thought it was something with their location id? But now that the bees are doing it as well, I guess I'm wrong!
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Re: Spawned Mob Visual Issues
Whenever you use the SpawnMob function it doesnt know the location_id, which it needs to properly display the spawn and fix the display issues you mentioned. The function tries to set the location_id by looking for the closest spawn and setting the location_id to that spawn's location_id. It might be that the location for these issues is on the border of two different location_ids and it is grabbing the wrong one. Try spawning a spawn directly next to the place you want the bee to spawn and see if that fixes it.
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: Spawned Mob Visual Issues
I'm not sure how the location id thing works internally, but I'm spawning the bee's at the exact coordinates of the hive that was smacked. This is a spawn (object) so since they are on top of each other, shouldn't the bee be grabbing the location id of the hive since technically, it's the closest spawn? This happens on all the bee hives as well, not just one.
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Re: Spawned Mob Visual Issues
Just target the spawn and check it's /spawn details and verify that the location id (or grid id) is correct.
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: Spawned Mob Visual Issues
Ya I tried that already but I did not see any location ID or grid ID listed from /spawn details. I can get the location ID of the bee hive just fine from the db, but since the bee's zonespawn that I'm spawning isn't in the database (because it is spawned via spell), I can't get it that way.
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Re: Spawned Mob Visual Issues
Ahh yah OK, I'll add it to /spawn details. I must have left it out :/
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: Spawned Mob Visual Issues
Ok, so the bee that gets spawned when you smack the hive has a location ID of 819993724, while the bee hive and everything else in the area for as far as I can click has a location ID of 771354606. I ran around the whole island trying to figure out where the bee was getting the 819993724 location ID from and that location ID is on the beach where the turtles and skeletons are, so I have no idea how the bee is getting that location ID from all the way over there.
-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Re: Spawned Mob Visual Issues
Can you paste the line from your script that spawns it? I'm assuming you are using the database project DB?
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: Spawned Mob Visual Issues
Here is the whole cast function within the spell:
And yes, I'm using the database project db.
Code: Select all
function cast(Caster, Target)
SpawnSet(Target, "show_command_icon", 0)
-- 20% chance to spawn a Queen bee
-- 80% chance to spawn a soldier bee
choice = math.random(1, 100)
if choice <= 20 then
-- spawn a Queen bee
SpawnMob(GetZone(Target), 2780092, false, GetX(Target), GetY(Target), GetZ(Target))
else
-- spawn a soldier bee (spawning a worker bee temporarily since we have no collect of a soldier bee)
SpawnMob(GetZone(Target), 2780059, false, GetX(Target), GetY(Target), GetZ(Target))
end
AddTimer(Target, 60000, "enable_command_icon_beeHive")
end-
LethalEncounter
- Team: Zombie
- Posts: 2717
- Joined: Wed Jul 25, 2007 10:10 pm
Re: Spawned Mob Visual Issues
Ahh I see the problem. I'll upload the fix shortly.
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Re: Spawned Mob Visual Issues
Cool, thanks LE!
- Scatman
- Retired
- Posts: 1688
- Joined: Wed Apr 16, 2008 5:44 am
- EQ2Emu Server: Scatman's Word
- Characters: Scatman
- Location: New Jersey
Who is online
Users browsing this forum: No registered users and 0 guests