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
Script Help Trying to break a breakable box with a crowbar
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: Trying to break a breakable box with a crowbar

Howdy, I'm pretty late to this but

PHP Code: (Select All)
void OnStart()
 
  {
void AddUseItemCallback("""crowbar""healbox_1""BreakBox"true);



Drop the "void" in your "AddUseItemCallback". You don't need that there. Big Grin

Everything else looks correct, but it may be better to just make your code a bit more readable. Group things together consistently~


void OnStart()
{
    AddUseItemCallback("", "crowbar", "healbox_1", "BreakBox", true);
}

void BreakBox(string& asName, string& asEntity);
{
    SetPropHealth("healbox_1", "0");
}

Discord: Romulator#0001
[Image: 3f6f01a904.png]
09-28-2020, 10:46 AM
Find


Messages In This Thread
RE: Trying to break a breakable box with a crowbar - by Romulator - 09-28-2020, 10:46 AM



Users browsing this thread: 1 Guest(s)