09-17-2011, 12:59 PM
Hi, i wanted something cool with prophealth so i did this:
void OnStart()
{
GiveItemFromFile("lantern", "lantern.ent");
AddEntityCollideCallback("door1", "chair1", "break1", true, 0);
}
void break1()
{
AddPropHealth("door1", -100);
}
That is my scripting so far, and in this case i wanted a chair (chair1) to break a door (door1) when it collided (i.e. throwing the chair at the door)
It doesn't seem to work...
what am i doing wrong? Thanks!
void OnStart()
{
GiveItemFromFile("lantern", "lantern.ent");
AddEntityCollideCallback("door1", "chair1", "break1", true, 0);
}
void break1()
{
AddPropHealth("door1", -100);
}
That is my scripting so far, and in this case i wanted a chair (chair1) to break a door (door1) when it collided (i.e. throwing the chair at the door)
It doesn't seem to work...
what am i doing wrong? Thanks!