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
Failing on the phonograph
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#1
Failing on the phonograph

Hi! I'm failing to get a phonograph to play a sound.


This is a part of the original code:
Spoiler below!

// The phonograph by the entrance
void StateChangePhono01(string &in asEntity, int alState)
{
PlayPhono(2, 1, 2, asEntity);
}

// Play the phonograph messages on interact with phonograph
void PlayPhono(int iLevel, int iSet, int iPart, string &in sEntity)
{
SetEntityInteractionDisabled(sEntity, true); //No more interact with phono as it does not do anything.

SetLocalVarInt("PlayPhono", 1);

PlaySoundAtEntity("phono_scrape", "ptest_phono_loop", sEntity, 1.0f, false);

for(int i = 1;i<=iPart;i++)
AddEffectVoice("justine_rec_lvl"+iLevel+"_0"+iSet+"_0"+i+".ogg",
"",
"Recording", "justine_rec_lvl"+iLevel+"_0"+iSet+"_0"+i,
true, sEntity, 4, 16
);

SetEffectVoiceOverCallback("VoiceOverPhono");
}



This is my code:
Spoiler below!

void PlaySong(string &in asEntity, int alState)
{
SetEntityInteractionDisabled("asEntity", true);
SetEntityActive("wood_box02_13", true);
PlaySoundAtEntity("", "Alexandria_Song.snt", "phonograph_1", 0.5f, false);
}


I have put the function in the connectionstatecallback on the entity. I'd appreciate some help Smile

[Image: mZiYnxe.png]


08-23-2011, 01:22 AM
Find


Messages In This Thread
Failing on the phonograph - by Acies - 08-23-2011, 01:22 AM
RE: Failing on the phonograph - by palistov - 08-23-2011, 07:25 AM
RE: Failing on the phonograph - by Acies - 08-23-2011, 09:33 AM
RE: Failing on the phonograph - by Acies - 08-23-2011, 09:14 PM
RE: Failing on the phonograph - by Tanshaydar - 08-24-2011, 08:10 AM
RE: Failing on the phonograph - by Acies - 08-24-2011, 10:52 AM
RE: Failing on the phonograph - by Tanshaydar - 08-24-2011, 10:57 AM
RE: Failing on the phonograph - by Acies - 08-24-2011, 12:01 PM
RE: Failing on the phonograph - by Tanshaydar - 08-24-2011, 12:30 PM
RE: Failing on the phonograph - by Elven - 08-24-2011, 02:59 PM



Users browsing this thread: 1 Guest(s)