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:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
attach script to another
Ravenskull Offline
Junior Member

Posts: 18
Threads: 5
Joined: Nov 2011
Reputation: 0
#1
attach script to another

Hey,

i have a problem and i hope you can help me. I want to attach one script in an hps to another but it doesn´t work. Do you may know the solution for my problem?
__________________________________________________________________________________________

void OnStart()

{
AddEntityCollideCallback("Player", "script_slam", "func_slam", true, 1);
}

void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("door_slam", true, true);


PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);

PlaySoundAtEntity("", "react_scare", "Player", 0, false);

PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);

GiveSanityDamage(15.0f, true);
}



{
AddUseItemCallback("", "key_1", "door_1", "open", true);
}

void open(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "unlock_door", "door_1", 0, false);
RemoveItem("key_1");
}

12-01-2011, 07:37 PM
Find


Messages In This Thread
attach script to another - by Ravenskull - 12-01-2011, 07:37 PM
RE: attach script to another - by JMFStorm - 12-01-2011, 07:45 PM
RE: attach script to another - by Ravenskull - 12-02-2011, 03:45 PM
RE: attach script to another - by flamez3 - 12-02-2011, 03:48 PM
RE: attach script to another - by Ravenskull - 12-03-2011, 03:24 PM
RE: attach script to another - by Khyrpa - 12-03-2011, 03:45 PM
RE: attach script to another - by Ravenskull - 12-03-2011, 04:24 PM
RE: attach script to another - by Statyk - 12-03-2011, 04:52 PM
RE: attach script to another - by Ravenskull - 12-03-2011, 06:59 PM
RE: attach script to another - by Statyk - 12-03-2011, 07:14 PM
RE: attach script to another - by Your Computer - 12-03-2011, 10:18 PM
RE: attach script to another - by Ravenskull - 12-04-2011, 04:28 PM
RE: attach script to another - by Ravenskull - 12-04-2011, 07:03 PM
RE: attach script to another - by flamez3 - 12-04-2011, 07:16 PM
RE: attach script to another - by Ravenskull - 12-05-2011, 07:33 PM



Users browsing this thread: 1 Guest(s)