Respawn some NPC after X seconds.
I tried http://forums.alliedmods.net/showthread.php?t=21819 but doesn't work very well. Error is: [FAKEMETA] Invalid entity
Origins is Ok, but the entity id is wrong. |
Re: Respawn some NPC after X seconds.
Tried what exactly. Show the code here.
|
Re: Respawn some NPC after X seconds.
Here is the partial code I used:
PHP Code:
Code:
Entity ID | Entity Origin |
Re: Respawn some NPC after X seconds.
Code:
Code:
|
Re: Respawn some NPC after X seconds.
Yep, working if change this
PHP Code:
to set_task(5.0, "RecreateEnt", 0, data, 3) But have another problem, game freeze during the re-create ent / or players is blocked. |
Re: Respawn some NPC after X seconds.
It seems that you're setting origin to an entity which doesn't exist (as you remove it). If you provide 0 as entity, it will set origin to the 0th entity, which is not the entity you want to set origin to.
|
Re: Respawn some NPC after X seconds.
Yes, You're right. But I don't have a idea how to restore my entity (NPC).
For example I spawn some NPCs, and when player touch any NPC, the NPC is removed and after 5 seconds she restored in the same origin after spawn first time. How to make this ? Edit. |
Re: Respawn some NPC after X seconds.
Any ideas ? Or How to check if an entity is already spawned in some origin ?
|
Re: Respawn some NPC after X seconds.
PointContents(vOrigin)
// engfunc(EngFunc_PointContents, Float:origin) return values #define CONTENTS_EMPTY -1 #define CONTENTS_SOLID -2 #define CONTENTS_WATER -3 #define CONTENTS_SLIME -4 #define CONTENTS_LAVA -5 #define CONTENTS_SKY -6 #define CONTENTS_ORIGIN -7 // Removed at csg time #define CONTENTS_CLIP -8 // Changed to contents_solid #define CONTENTS_CURRENT_0 -9 #define CONTENTS_CURRENT_90 -10 #define CONTENTS_CURRENT_180 -11 #define CONTENTS_CURRENT_270 -12 #define CONTENTS_CURRENT_UP -13 #define CONTENTS_CURRENT_DOWN -14 #define CONTENTS_TRANSLUCENT -15 #define CONTENTS_LADDER -16 #define CONTENT_FLYFIELD -17 #define CONTENT_GRAVITY_FLYFIELD -18 #define CONTENT_FOG -19 |
Re: Respawn some NPC after X seconds.
Tried and doesn't work.
|
| All times are GMT -4. The time now is 01:59. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.