Frictional Games Forum (read-only)

Full Version: Help with using ACID on a DOOR
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So i'm trying to make a script where some acid from the inventory should break a door. The script so far looks like this:


PHP Code:
void OnStart(){ AddUseItemCallback("""acid""acid_door"aciddoortrue);}
void aciddoor(string &in asItemstring &in asEntity){SetPropHealth("acid_door"0.0f);} 


But it wont let me do that, it says that its some wrong signature or something. I have checked everything, but i don't understand.
Can't tell straight away... It might depend on what door entity you are using.
(06-20-2012, 05:25 PM)JMFStorm Wrote: [ -> ]Can't tell straight away... It might depend on what door entity you are using.
It is just the normal "Castle Door"
(06-20-2012, 07:35 PM)Cetex1337 Wrote: [ -> ]
(06-20-2012, 05:25 PM)JMFStorm Wrote: [ -> ]Can't tell straight away... It might depend on what door entity you are using.
It is just the normal "Castle Door"
Then use this!


http://wiki.frictionalgames.com/hpl2/tut...cks_a_door
The callback function needs to have it's name passed by string. Use:
Code:
void OnStart()
{
  AddUseItemCallback("", "acid", "acid_door", "aciddoor", true);
}

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