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
Wheel open door.
ShyGuySays Offline
Junior Member

Posts: 13
Threads: 3
Joined: Jul 2012
Reputation: 0
#1
Wheel open door.

Sorry for all the questions recently, but I was wondering how to trigger an event when a wheel (in this case a torture wheel) is completely turned (hits the stopping point). I was looking through the engine scripts and I am unsure of which one would suit my needs.
(This post was last modified: 07-21-2012, 01:35 AM by ShyGuySays.)
07-20-2012, 09:38 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Wheel open door.

SetEntityConnectionStateChangeCallback

Tutorials: From Noob to Pro
07-20-2012, 09:40 PM
Website Find
ShyGuySays Offline
Junior Member

Posts: 13
Threads: 3
Joined: Jul 2012
Reputation: 0
#3
RE: Wheel open door.

Would this make it so it triggers at the end, or just when you start turning it?
07-20-2012, 09:48 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Wheel open door.

(07-20-2012, 09:48 PM)ShyGuySays Wrote: Would this make it so it triggers at the end, or just when you start turning it?

Some things can be answered on their own.

It would trigger at the end.

Tutorials: From Noob to Pro
07-21-2012, 12:15 AM
Website Find
ShyGuySays Offline
Junior Member

Posts: 13
Threads: 3
Joined: Jul 2012
Reputation: 0
#5
RE: Wheel open door.

Thank you, sir. You are a gentleman and a scholar.
07-21-2012, 01:35 AM
Find
BonesTheRabbit Offline
Member

Posts: 68
Threads: 20
Joined: Feb 2012
Reputation: 2
#6
RE: Wheel open door.

Sorry to necro this thread, but it's the only one I could find on this particular subject. I've been trying to get this working, and I'm guessing I'm doing something silly, because it just doesn't want to work with me.

void OnEnter()
{    
    SetEntityConnectionStateChangeCallback("EntityName", "FunctionName");
}

void FunctionName(string &in asEntity, int ValveState)
{    
    if (ValveState == 1)
    {
        SetPropObjectStuckState("EntityName", 1);
        PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0.0f, false);
    }
}

I've triple checked the entity name, but the valve isn't locking, and the sound isn't playing. I've been looking through various tutorials, though most deal with levers, and I guess something is different between them? I have a valve which opens a sliding door elsewhere on my map, and that works fine, but this one is proving problematic.

Any help would be greatly appreciated.
(This post was last modified: 10-07-2013, 07:30 PM by BonesTheRabbit.)
10-07-2013, 07:25 PM
Find




Users browsing this thread: 1 Guest(s)