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 Automatic open door script
MaksoPL Offline
Member

Posts: 51
Threads: 26
Joined: Mar 2014
Reputation: 0
#1
Automatic open door script

I make a script, when door must open automaticly. It din't work. Working only sound.
.hps file:
void OnStart()
{
AddEntityCollideCallback("Player", "quest1", "Memento1", true, 1);
AddEntityCollideCallback("Player", "DoorScriptArea1", "EventDoor", true, 1);
}

void Memento1(string &in asParent, string &in asChild, int alState)
{
AddQuest("area", "quest1");
}

void EventDoor(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("DoorScripted1", false, false);
SetSwingDoorDisableAutoClose("DoorScripted1", true);

PlaySoundAtEntity("creak", "joint_door_move_special.snt", "DoorScripted1", 1, false);

AddTimer("", 2, "TimerStopSound");
AddTimer("DoorScripted1", 0, "TimerMoveDoor");
}

void TimerMoveDoor(string &in asTimer)
{
if(GetLocalVarInt("VarDoor") == 10) return;
AddLocalVarInt("VarDoor", 1);

AddTimer(asTimer, 0.03, "TimerMoveDoor");

AddPropForce(asTimer, -70, 0, 0, "world");
}

void TimerStopSound(string &in asTimer)
{
StopSound("creak", 0.4);
}
01-03-2015, 12:55 PM
Find


Messages In This Thread
Automatic open door script - by MaksoPL - 01-03-2015, 12:55 PM
RE: Automatic open door script - by G510s - 01-03-2015, 01:37 PM
RE: Automatic open door script - by Romulator - 01-03-2015, 01:54 PM
RE: Automatic open door script - by MaksoPL - 01-03-2015, 02:30 PM
RE: Automatic open door script - by DnALANGE - 01-03-2015, 04:58 PM
RE: Automatic open door script - by Daemian - 01-03-2015, 08:18 PM



Users browsing this thread: 1 Guest(s)