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
Whats wrong with my script?
Sennep Offline
Junior Member

Posts: 47
Threads: 6
Joined: Apr 2011
Reputation: 0
#1
Whats wrong with my script?

Hi!

This is a part of my script:

void OnStart()
{
AddUseItemCallback("", "bedroomkey", "mansion_1", "UsedKeyOnDoor", true);
AddEntityCollideCallback("player", "area_darkmusic", "PlayDarkMusic", true, 1);
}

void PlayDarkMusic(string &in asParent, string &in asChild, int alState)
{
PlayMusic("04_amb.ogg", true, 1.0f, 0, 0, true);
SetEntityActive("servant_grunt_1", true);
}

But there's something wrong with it. What happens is, the Grunt stays inactive and the music doesn't play.

Can you spot the bug?

Oh, and ignore the AddUseItemCallback.
05-16-2011, 02:24 PM
Find


Messages In This Thread
Whats wrong with my script? - by Sennep - 05-16-2011, 02:24 PM
RE: Whats wrong with my script? - by Roenlond - 05-16-2011, 02:31 PM
RE: Whats wrong with my script? - by Sennep - 05-16-2011, 02:33 PM
RE: Whats wrong with my script? - by Roenlond - 05-16-2011, 02:34 PM
RE: Whats wrong with my script? - by Sennep - 05-16-2011, 02:43 PM
RE: Whats wrong with my script? - by Sennep - 05-16-2011, 04:28 PM
RE: Whats wrong with my script? - by MrBigzy - 05-16-2011, 08:02 PM
RE: Whats wrong with my script? - by Kyle - 05-16-2011, 11:03 PM
RE: Whats wrong with my script? - by Sennep - 05-17-2011, 12:44 PM
RE: Whats wrong with my script? - by Tanshaydar - 05-17-2011, 12:50 PM



Users browsing this thread: 1 Guest(s)