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
(Script)Lever Opens a Door
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#11
RE: (Script)Lever Opens a Door

It doesn't work. I don't get it. Why wouldn't it work ?

[Image: the-cabin-in-the-woods-masked-people.jpg]
06-14-2012, 08:31 AM
Find
Dutton Offline
Member

Posts: 121
Threads: 3
Joined: Apr 2012
Reputation: 2
#12
RE: (Script)Lever Opens a Door

(06-14-2012, 08:31 AM)TheNoAuthor12 Wrote: It doesn't work. I don't get it. Why wouldn't it work ?
Post your script, so we might be able to look at what "doesn't work"

[Image: 15isy6C]
06-14-2012, 09:30 AM
Find
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#13
RE: (Script)Lever Opens a Door

Here's the script :
void OnStart()







{







SetEntityConnectionStateChangeCallback("lever", "leverfunc");



SetEntityConnectionStateChangeCallback("lever", "leverfunc2");



}







void leverfunc(string &in asEntity, int alState)



{



if (alState == 1)

SetMoveObjectStateExt("wooden_slide_door_1", 1.0f, 1.0f, 5.0f, 5.0f, true);

//All the numbers on the script above depends on what speed you want it
to open. Check out "Engine Scripts" //in the wiki for more information.



}







void leverfunc2(string &in asEntity, int alState)



{



if (alState == -1)



SetMoveObjectStateExt("wooden_slide_door_1", 0.0f, 1.0f, 5.0f, 5.0f, true);



}

What did I do wrong ?

[Image: the-cabin-in-the-woods-masked-people.jpg]
06-14-2012, 10:02 AM
Find
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#14
RE: (Script)Lever Opens a Door

Anyone ?

[Image: the-cabin-in-the-woods-masked-people.jpg]
06-15-2012, 07:21 AM
Find




Users browsing this thread: 1 Guest(s)