Frictional Games Forum (read-only)
[SCRIPT] destorying an entity - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] destorying an entity (/thread-14400.html)



destorying an entity - zombiehacker595 - 04-01-2012

how would i say destory a padlock by using acid on it or using the hammer and chipper?


RE: destorying an entity - flamez3 - 04-01-2012

void OnStart()
{
AddUseItemCallback("", "acid", "padlock_01", BreakPadlock, true);
}


void BreakPadlock(string &in asItem, string &in asEntity)
{
SetPropHealth("padlock_01", 0.0f);
}




Change names accordingly


RE: destorying an entity - zombiehacker595 - 04-01-2012

(04-01-2012, 04:58 AM)flamez3 Wrote: void OnStart()
{
AddUseItemCallback("", "acid", "padlock_01", BreakPadlock, true);
}


void BreakPadlock(string &in asItem, string &in asEntity)
{
SetPropHealth("padlock_01", 0.0f);
}




Change names accordingly
AddUseItemCallback("", "glass_container_mix_done_1", "padlock_1", "BreakPadlock", true);
}
void BreakPadlock(string &in asItem, string &in asEntity)
{
SetPropHealth("padlock_1", 0.0f);
}
cant use item this way? names in level editor are def the same






RE: destorying an entity - flamez3 - 04-01-2012

Do you have .map_cache?


RE: destorying an entity - zombiehacker595 - 04-01-2012

(04-01-2012, 06:12 AM)flamez3 Wrote: Do you have .map_cache?

yea dont worry i figured out how to do it