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
Functional Turntable on Amnesia
André Campana Offline
Junior Member

Posts: 36
Threads: 10
Joined: Jan 2015
Reputation: 2
#1
Functional Turntable on Amnesia

I Love records, but i also love Amnesia, what about putting them together? Models made by me on Blender 2.72, music by Seeburg Basic Library.

[video=youtube]http://youtu.be/K9NbzUTSUVY[/video]

void OnStart()
{
    AddEntityCollideCallback("tonearm_1", "ScriptArea_3", "slowdown", true, 1);
}

void slowdown(string &in asParent, string &in asChild, int alStates)
{
    PlaySoundAtEntity("true_grit", "true_grit.snt", "Music", 0, false);
    RotatePropToSpeed("tonearm_1", -0.0027, -0.0027, 0, 1, 0, false, "ScriptArea_1");
}

void play(string &in asEntity)
{
    SetEntityInteractionDisabled("button_simple_1", true);
    RotatePropToSpeed("vinyl_1", -0.2, -7.8, 0, 1, 0, false, "");
    RotatePropToSpeed("tonearm_1", -1, -1, 0, 1, 0, false, "ScriptArea_1");
    RotatePropToSpeed("turntable_1", -0.2, -7.8, 0, 1, 0, false, "");
    AddEntityCollideCallback("tonearm_1", "ScriptArea_2", "return_tone", true, 1);
}

void return_tone(string &in asParent, string &in asChild, int alStates)
{
    StopSound("true_grit", 0.01);
    RotatePropToSpeed("tonearm_1", 1, 1, 0, 1, 0, false, "ScriptArea_1");
    AddEntityCollideCallback("tonearm_1", "ScriptArea_4", "stop_return", true, 1);
}

void return_tone_button(string &in asEntity)
{
    StopSound("true_grit", 0.01);
    RotatePropToSpeed("tonearm_1", 1, 1, 0, 1, 0, false, "ScriptArea_1");
    AddEntityCollideCallback("tonearm_1", "ScriptArea_4", "stop_return", true, 1);
}

void stop_return(string &in asParent, string &in asChild, int alStates)
{
    SetEntityInteractionDisabled("button_simple_1", false);
    RotatePropToSpeed("tonearm_1", -1, 0, 0, 1, 0, false, "ScriptArea_1");
    RotatePropToSpeed("vinyl_1", -1, 0, 0, 1, 0, false, "");
    RotatePropToSpeed("turntable_1", -1, 0, 0, 1, 0, false, "");
    AddEntityCollideCallback("tonearm_1", "ScriptArea_3", "slowdown", true, 1);
}

Download of the entities used: Give me the credits!
http://www.mediafire.com/download/6mbrjx...ntable.zip

[Image: WLYgWF]
05-03-2015, 07:13 AM
Find


Messages In This Thread
Functional Turntable on Amnesia - by André Campana - 05-03-2015, 07:13 AM
RE: Functional Turntable on Amnesia - by Statyk - 05-03-2015, 02:44 PM



Users browsing this thread: 1 Guest(s)