Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with using ACID on a DOOR
Cetex1337 Offline
Junior Member

Posts: 21
Threads: 7
Joined: Jun 2012
Reputation: 0
#1
Help with using ACID on a DOOR

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: (Select All)
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.
(This post was last modified: 06-20-2012, 04:28 PM by Cetex1337.)
06-20-2012, 04:27 PM
Find
JMFStorm Offline
Member

Posts: 205
Threads: 8
Joined: Aug 2011
Reputation: 28
#2
RE: Help with using ACID on a DOOR

Can't tell straight away... It might depend on what door entity you are using.

06-20-2012, 05:25 PM
Find
Cetex1337 Offline
Junior Member

Posts: 21
Threads: 7
Joined: Jun 2012
Reputation: 0
#3
RE: Help with using ACID on a DOOR

(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
Find
MaZiCUT Offline
Senior Member

Posts: 536
Threads: 31
Joined: Jun 2012
Reputation: 17
#4
RE: Help with using ACID on a 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

Hi.
06-20-2012, 08:55 PM
Website Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#5
RE: Help with using ACID on a DOOR

The callback function needs to have it's name passed by string. Use:
void OnStart()
{
  AddUseItemCallback("", "acid", "acid_door", "aciddoor", true);
}

void aciddoor(string &in asItem, string &in asEntity)
{
  SetPropHealth("acid_door", 0.0f);
}
06-20-2012, 09:39 PM
Find




Users browsing this thread: 1 Guest(s)