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
Multiple use of a void OnStart, need help D:
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#14
RE: Multiple use of a void OnStart, need help D:

PHP Code: (Select All)
void OnStart()

{
AddUseItemCallback("""crowbar_1""mansiondoor1""UsedCrowbarOnDoor"true);
AddEntityCollideCallback("crowbar_joint_1""ScriptArea_Joint""CollideAreaBreakDoor"true1);
AddEntityCollideCallback("Player""push""Push"true1);
AddEntityCollideCallback("Player""door_slam""Slam"true1);
}

void UsedCrowbarOnDoor(string &in asItemstring &in asEntity)
{
AddTimer(""0.2"TimerSwitchShovel");
RemoveItem("crowbar_1");
}

void TimerSwitchShovel(string &in asTimer)
{
PlaySoundAtEntity("","puzzle_place_jar.snt"""0false);
SetEntityActive("crowbar_joint_1"true);
}

void CollideAreaBreakDoor(string &in asParentstring &in asChildint alState)

{
AddPlayerSanity(25);
PlayMusic("10_puzzle01.ogg"false0.70.110false);
SetSwingDoorLocked("mansiondoor1"falsetrue); AddPropImpulse("mansiondoor1"00, -50"World");
SetSwingDoorDisableAutoClose("mansiondoor1"true);
SetSwingDoorClosed("mansiondoor1"falsefalse);
SetMoveObjectState("mansiondoor1"1);
PlaySoundAtEntity("","break_wood_metal""ScriptArea_Dust"0false);
CreateParticleSystemAtEntity("""ps_hit_wood""ScriptArea_Dust"false);
SetEntityActive("crowbar_joint_1"false);
SetLocalVarInt("Door"1);


void Push(string &in asParentstring &in asChildint alState)
{
PlaySoundAtEntity("""react_pant.snt""push"0false);
AddPlayerBodyForce(-30000000false);
}

void Slam(string &in asParentstring &in asChildint alState)
{
SetSwingDoorClosed("mansiondoor1"truetrue);
SetSwingDoorLocked("mansiondoor1"truetrue);
PlaySoundAtEntity("""00_laugh.snt""door_slam"0false);

There, i fixed it. You obviously need to understand how a simple script works BEFORE posting a problem on the forums.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 03-17-2013, 02:12 AM by PutraenusAlivius.)
03-17-2013, 02:10 AM
Find


Messages In This Thread
RE: Multiple use of a void OnStart, need help D: - by PutraenusAlivius - 03-17-2013, 02:10 AM



Users browsing this thread: 1 Guest(s)