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
One sound file needed twice at the same time.
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#5
RE: One sound file needed twice at the same time.

(10-12-2015, 09:06 PM)Kanthos Wrote: The animation needs 3 sounds for the opening sequence and 3 for the closing one. That´s a lot of work and so i thought you guys could help me out with a quicker solution.

My code:

_________________________________________________________________________________________

void AirlockButton(const tString &in asEntity)
{
Sound_CreateAtEntity("ButtonPress", "Entities_Station/object/sat_shell/button", asEntity);
MovingButton_SetDisabled("deepsea_large_1",true);
MovingButton_SetDisabled("deepsea_large_2",true);

Map_AddTimer("AirlockDoorButtonTimer",12,"TimerEnableButton");


if (AirlockEnergy==true && InnerAirlockDoorsClosed==true)
{
SlideDoor_SetClosed("cool1", false);
Map_AddTimer("AirlockCool2Open",0.5,"TimerCool2Open");
InnerAirlockDoorsClosed=false;

}

if (AirlockEnergy==true && InnerAirlockDoorsClosed==false)
{
SlideDoor_SetClosed("cool1", true);
Map_AddTimer("AirlockCool2Closed",0.5,"TimerCool2Close");
InnerAirlockDoorsClosed=true;

}

}

void TimerCool2Close(const tString&in asEntity)
{
SlideDoor_SetClosed("cool2", true);
}

void TimerCool2Open(const tString&in asEntity)
{
SlideDoor_SetClosed("cool2", false);
}


void TimerEnableButton(const tString&in asEntity)
{
MovingButton_SetDisabled("deepsea_large_1",false);
MovingButton_SetDisabled("deepsea_large_2",false);

}

__________________________________________________________________________

How i said, the only thing that happens with the doors is that they get closed and opened.

Greets!

Without looking too much at your script, I can see that there is only one line that plays a sound, and not much indication of that line being called more than once. only 1 sound should play only once. if you want more you add more sounds or call the same sound again.
(This post was last modified: 10-12-2015, 09:15 PM by WALP.)
10-12-2015, 09:15 PM
Find


Messages In This Thread
RE: One sound file needed twice at the same time. - by WALP - 10-12-2015, 09:15 PM



Users browsing this thread: 1 Guest(s)