AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Destorying an ent? (https://forums.alliedmods.net/showthread.php?t=12996)

DiscoBBQ 04-30-2005 22:08

Destorying an ent?
 
How would i destory an ent. I've tried making it take damage, then settings its hp to -100.

I dont want you to tell me remove_entity because perminatly destorys it

XxAvalanchexX 05-01-2005 12:10

How can you destroy an entity without destroying it? WHAT?

DiscoBBQ 05-01-2005 12:34

Hint the world perminatly. I want it to be destoryed, but when you remove_entity its gone perminatly and dosn't respawn

Ced 05-01-2005 13:08

why don't u just remove and put back on next round?

DiscoBBQ 05-01-2005 16:53

Becuase it's for TS and there are no 'rounds'

LynX 05-01-2005 18:43

Then when you remove it, just make it like this:

Code:
#define RESPAWN_TIME how_much_time_in_float_here public destroy_entity(id) { // do the remove_entity stuff here by yourself set_task( RESPAWN_TIME, "respawn", id) return WHATEVER } public respawn(id) { //do the entity creation here by yourself return WHATEVER }

If your thing is non-id, just use read_data thingy to acquire stuff...

DiscoBBQ 05-01-2005 18:48

Quote:

//do the entity creation here by yourself
i'm guessing theres a command for that?

LynX 05-01-2005 18:49

erm...

Code:
new entity = create_entity("info_target")

DiscoBBQ 05-01-2005 18:49

Damn your fast, It's not a specific ent. It's a c4 that blows up windows and doors, so i want it to respawn after being removed. I'm pretty sure there's a command to set the classname to something, then i can respawn it.

LynX 05-01-2005 18:50

Yep ^^


All times are GMT -4. The time now is 16:35.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.