The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
TheCyberToad Offline
Junior Member

Posts: 2
Threads: 1
Joined: Sep 2020
Reputation: 0
#1
Trying to break a breakable box with a crowbar

Was trying to make a breaking script
void OnStart()
    {
void AddUseItemCallback("", "crowbar", "healbox_1", "BreakBox", true);

}

void BreakBox(string& asName, string& asEntity);

{
SetPropHealth("healbox_1", "0");
}

 but it says the open token is unexpected.

FATAL ERROR: Could not load script file
'custom_stories/labstory/maps/00_scripttest.hps'!
main (12,1): ERR : Unexpected token ‘{'

The healbox_1 is a common wood_box02_breakable.ent.

Are there any more proper ways of doing this if it's too wrong?
(This post was last modified: 09-26-2020, 11:20 AM by TheCyberToad.)
09-26-2020, 11:19 AM
Find


Messages In This Thread
Trying to break a breakable box with a crowbar - by TheCyberToad - 09-26-2020, 11:19 AM



Users browsing this thread: 1 Guest(s)