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
Only some of my scripts are working
Spazatron Offline
Junior Member

Posts: 33
Threads: 17
Joined: Oct 2012
Reputation: 2
#1
Only some of my scripts are working

I have these scripts:

void OnStart()
{
    SetEntityActive("fall_box", false);
    SetEntityActive("fall_dust", false);
    PlaySoundAtEntity("clock_loop.ogg", "clock_loop.snt", "clock", 0, true); //play clock sound
    SetEntityInteractionDisabled("tar1", true); //disable tar pickups
    SetEntityInteractionDisabled("tar2", true); //
}

But only the
    SetEntityInteractionDisabled("tar1", true); //disable tar pickups
    SetEntityInteractionDisabled("tar2", true); //
works.

The fall_box and fall_dust are still active when the game starts and the sound doesn't play. Everything is written perfectly... :S
09-29-2014, 02:03 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Only some of my scripts are working

If the entities you are trying to interact with are set to the StaticProp type, it won't work. Those can't be disabled or interacted with. To avoid this, you can open those entities with the model editor and go to Edit > User Defined Variables and set the type to Object > Static instead. Resave as a custom entity and use that instead.

09-29-2014, 03:55 PM
Find




Users browsing this thread: 1 Guest(s)