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
Lever problems.
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#1
Lever problems.

Hey guys, so I've been making a script that player must pull down a lever in order to move the door (safety_large_vert.ent)

I did it, but for unknown reason for me it doesn't work.

Here is the script:

Spoiler below!
PHP Code: (Select All)
void OnStart()
{
SetEntityConnectionStateChangeCallback("lever_1""move1");
}

void move1(string &in entityint alState)
{
     if(
alState == 1)
     {
    
SetMoveObjectState("wejscie_1",1.0f);
    
SetPropStaticPhysics("lever_1"true);
     }



Is it caused because of the entity? As I wrote above it's safety_large_vert.ent
03-17-2014, 11:05 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Lever problems.

Does nothing happen? Does it crash? Is this all the script?
It does looks pretty alright to me. Any typos in names?

03-17-2014, 11:08 PM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#3
RE: Lever problems.

(03-17-2014, 11:08 PM)Mudbill Wrote: Does nothing happen? Does it crash? Is this all the script?
It does looks pretty alright to me. Any typos in names?

Nothing happens. Just loads up map normally, and it doesn't work.
There is no typos for sure. Perhaps it's caused by a map cache file, I deleted that son of a bitch, but then I returned to Level Editor and it created again... I'm gonna delete it again and post if that helped.

EDIT: Nope, nothing happens. Perhaps it's caused by the entity itself?
(This post was last modified: 03-17-2014, 11:14 PM by Slanderous.)
03-17-2014, 11:12 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Lever problems.

Do you have dev environment? If so, add a debug message to check if this happens like it should. If not, just add something noticeable in there and check it if executes. Something like SetMessage perhaps.

03-17-2014, 11:18 PM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#5
RE: Lever problems.

Hmm, this seems to be very weird. I added a debug message, and now it's working fine. Some paranormal stuff goin' up with my notepad++ I see o.O
03-18-2014, 04:51 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#6
RE: Lever problems.

It's the Script Poltergeists! :O

03-18-2014, 09:14 PM
Find




Users browsing this thread: 1 Guest(s)