Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lever's Support
Author Message
christoff Offline
Junior Member

Posts: 1
Joined: Jan 2011
Reputation: 0
Post: #1
Lever's Support
Ok im new to HPL2 as a games engine and im finding it confusing to add a lever into the game and to get the scripts to work.

I have a lever on the map named "lever00"
and the locked door is "celldoor02"

the current script i have is

void StateChangeLever(string &in asEntity, int alState)
{
if(alState == 1){
SetLeverStuckState("lever00", 1, true);
SetSwingDoorLocked("celldoor02", false, true);
PlaySoundAtEntity("", "Unlock_Door", "celldoor02", 1, false);
}

But when i play the map when i move the lever down the locked door wont open.

Thanks, also anyone got a tutorial on how to make interactions between other items such as wheels and pulley systems? these would be helpful and much appreciated thanks.
(This post was last modified: 01-27-2011 05:10 PM by christoff.)
01-27-2011 05:10 PM
Find all posts by this user Quote this message in a reply
Frontcannon Offline
Senior Member

Posts: 538
Joined: Jul 2010
Reputation: 0
Post: #2
RE: Lever's Support
AFAIK 1 is up, 0 neutral and -1 down Big Grin


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
01-27-2011 10:15 PM
Find all posts by this user Quote this message in a reply
Pandemoneus Offline
Senior Member

Posts: 328
Joined: Sep 2010
Reputation: 0
Post: #3
RE: Lever's Support
And you are missing a closing }. Wink

[edit]
Check the second link in my sig, it contains a working lever.
I've never done a pulley though, you might want to copy that from the original map (refinery).

(This post was last modified: 01-27-2011 10:38 PM by Pandemoneus.)
01-27-2011 10:33 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)