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




Users browsing this thread: 1 Guest(s)