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 No sound playing in script area
LDOriginal Offline
Junior Member

Posts: 35
Threads: 7
Joined: Oct 2014
Reputation: 0
#22
RE: No sound playing in script area

(10-08-2014, 05:25 PM)FlawlessHappiness Wrote: You make me want to create a video for you... I might do ^_^

We'll see.

Haha, but would you be so kind and show me just one more example on how you would script this. I want to add another script area with another sound. Maybe it would make some sense getting it infront of me so i can see the code myself. I try to rationalize but...yeah....lol

void OnStart()
{

AddEntityCollideCallback("Player", "Ljud", "start", true, 1);
AddUseItemCallback("", "Key", "Door", "UseKeyOnDoor", true);
AddUseItemCallback("", "Nyckel", "Rumpa", "UseKeyOnDoor", true);
AddUseItemCallback("", "Tillskåp", "Skåp", "UseKeyOnDoor", true);
}

void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "Unlock_door.snt", asEntity, 10, false);
RemoveItem(asItem);
}

void start(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "25_strain_wood.snt", "Player", 0.0f, false);
}
10-08-2014, 05:34 PM
Find


Messages In This Thread
No sound playing in script area - by LDOriginal - 10-07-2014, 07:03 PM
RE: No sound playing in script area - by Neelke - 10-07-2014, 07:43 PM
RE: No sound playing in script area - by Neelke - 10-07-2014, 07:59 PM
RE: No sound playing in script area - by Neelke - 10-07-2014, 08:10 PM
RE: No sound playing in script area - by LDOriginal - 10-08-2014, 05:34 PM



Users browsing this thread: 1 Guest(s)