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
Weird problem with a lever
Mooserider Offline
Member

Posts: 64
Threads: 11
Joined: Jan 2011
Reputation: 2
#1
Weird problem with a lever

Hello there!
I'm working on my first custom story at the moment. I'm very new to scripting, but I think I'm going pretty well.
Any way, I have a lever in my map, and when I pull it down I'm trying to get this carpet to disappear and a sound to play(The carpet is concealing a secret trapdoor). However, it's not working. The debug message that I set to show works, but the rest doesn't. Here's my script:

void Leverpulled(string &in asEntity, int alState)//"Leverpulled" is the ConnectionStateChangeCallback that I set in the map editor.
{
if(alState == -1){
SetEntityActive("Hiddencarpet", false);
PlaySoundAtEntity("Carpetnoise", "break_wood_metal.snt", "Hiddencarpet", 1.0f, false);
AddDebugMessage("Lever Pulled", true);
}
}
Can anyone see what the problem would be? There are no errors in the script, apparently.

Working on a FC: "Don't Let Go "
(This post was last modified: 04-13-2011, 10:15 AM by Mooserider.)
04-12-2011, 11:00 AM
Find


Messages In This Thread
Weird problem with a lever - by Mooserider - 04-12-2011, 11:00 AM



Users browsing this thread: 1 Guest(s)