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
Scripting issues
Nomad923 Offline
Junior Member

Posts: 46
Threads: 15
Joined: Dec 2011
Reputation: 2
#1
Scripting issues

Ok so i got this script for this scene in a room, whats its supposed to do is when you walk to a script area the screen goes black and sound plays but while its doing that it teleports you to another room and then the screen goes to normal. But here is the problem the only thing that works atm is teleporting the player, the sound wont play and the fadein and fadeout is not working. Below is what i have right now, ive been working with it for a bit and i tried putting them all together instead of in different sections like it is now but that causes a error with the fades. Not to sure what to do.



void OnStart()
{
}

void OnEnter()
{
AddEntityCollideCallback("Player", "Teleport", "Nightmare", true, 1);
AddEntityCollideCallback("Player", "Grr", "Rawr", true, 1);
}

void OnLeave()
{
}

void Nightmare(string &inasParent, string &in asChild, int alState)
{
AddTimer("", 0, "Rawr");
AddTimer("", 0, "Fadeout");
TeleportPlayer("PlayerStartArea_2");
AddTimer("", 4.0, "Fadein");
}

void Fadein(float afTime)
{
Fadein(2);
}

void Fadeout(float afTime)
{
Fadeout(0);
}

void Rawr(string& asSoundName, string& asSoundFile, string& asEntity, float afFadeTime, bool abSaveSound)
{
PlaySoundAtEntity("insanity_monster_roar01", "insanity_monster_roar01.ogg", "player", 0, false);
}

[Image: qg_logo.png]
(This post was last modified: 12-23-2011, 03:33 AM by Nomad923.)
12-22-2011, 10:10 AM
Find


Messages In This Thread
Scripting issues - by Nomad923 - 12-22-2011, 10:10 AM
RE: Scripting issues - by ferryadams10 - 12-22-2011, 10:39 AM
RE: Scripting issues - by Nomad923 - 12-22-2011, 10:45 AM
RE: Scripting issues - by Linus Ågren - 12-22-2011, 01:57 PM
RE: Scripting issues - by DRedshot - 12-22-2011, 06:18 PM
RE: Scripting issues - by Nomad923 - 12-23-2011, 12:47 AM
RE: Scripting issues - by Nomad923 - 12-23-2011, 03:33 AM



Users browsing this thread: 1 Guest(s)