OnSpawningEntity
#4
I tried with this:
Code:
function OnSpawningEntity(World, Entity) print(Entity:GetClass()) if (Entity:GetClass() == "cWolf" and World:GetBiomeAt(Entity:GetPosX(),Entity:GetPosZ()) ~= 4)then print(Entity:GetClass().." spawning on "..World:GetBiomeAt(Entity:GetPosX(),Entity:GetPosZ())) Entity:Destroy() end end
All works except destroy the entity. I'll try with OnSpawnedEntity, because if entity is not spawned, you can't destroy it

Now it work, but when entity is destroyed, you see it, and can't interact with it. It seems entity is removed from server but not from client.
Code:
Code:
function OnSpawnedEntity(World, Entity) print(Entity:GetClass()) if (Entity:GetClass() == "cWolf" and World:GetBiomeAt(Entity:GetPosX(),Entity:GetPosZ()) ~= 4)then print(Entity:GetClass().." spawning on "..World:GetBiomeAt(Entity:GetPosX(),Entity:GetPosZ())) Entity:Destroy() end end
Reply
Thanks given by:


Messages In This Thread
OnSpawningEntity - by tonibm19 - 08-09-2013, 04:27 AM
RE: OnSpawningEntity - by NiLSPACE - 08-09-2013, 04:31 AM
RE: OnSpawningEntity - by bearbin - 08-09-2013, 04:31 AM
RE: OnSpawningEntity - by tonibm19 - 08-09-2013, 05:05 AM
RE: OnSpawningEntity - by xoft - 08-09-2013, 04:41 PM
RE: OnSpawningEntity - by NiLSPACE - 08-09-2013, 07:32 PM
RE: OnSpawningEntity - by bearbin - 08-09-2013, 08:00 PM
RE: OnSpawningEntity - by xoft - 08-10-2013, 04:19 AM



Users browsing this thread: 1 Guest(s)