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
Why the hell wont this work?!
Brute Offline
Member

Posts: 197
Threads: 10
Joined: Aug 2011
Reputation: 3
#1
Sad  Why the hell wont this work?!

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("LeverExit" , "ShelfDestroyer" , "OpentheExit" , true , 1);
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
////////////////////////////
// Actual functions

void OpentheExit(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("SHELF", false);
PlaySoundAtEntity("", "levelexitopen.snt", "LeverExit", 0.5f, false);
}

====================================================
Help, I am freaking out! Angry
The Shelf didn't dissapear!





(This post was last modified: 12-09-2011, 03:52 PM by Brute.)
12-09-2011, 03:30 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Why the hell wont this work?!

(12-09-2011, 03:30 PM)Brute Wrote: ////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("LeverExit" , "ShelfDestroyer" , "OpentheExit" , true , 1);
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
////////////////////////////
// Actual functions

void OpentheExit(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("SHELF", false);
PlaySoundAtEntity("", "levelexitopen.snt", "LeverExit", 0.5f, false);
}

====================================================
Help, I am freaking out! Angry
The Shelf didn't dissapear!
Some entities don't deactivate in amnesia. Such as the desk and tables.

12-09-2011, 03:43 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#3
RE: Why the hell wont this work?!

Some entities cannot be set to SetEntityActive = false. You can circumvent this by opening the shelf in ModelEditor and set the "static" to "Object + static". Then save it as a new .ent file. Place that new entity instead of the shelf and you should be set to go.

[Image: mZiYnxe.png]


12-09-2011, 03:45 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: Why the hell wont this work?!

(12-09-2011, 03:45 PM)Acies Wrote: Some entities cannot be set to SetEntityActive = false. You can circumvent this by opening the shelf in ModelEditor and set the "static" to "Object + static". Then save it as a new .ent file. Place that new entity instead of the shelf and you should be set to go.
Thanks, handy to know if I need something like that done. ^^

12-09-2011, 03:49 PM
Find
Brute Offline
Member

Posts: 197
Threads: 10
Joined: Aug 2011
Reputation: 3
#5
RE: Why the hell wont this work?!

Oh my goodness! Are you guys kidding me??? XD
So many hours, just to knowing THIS?!

Thanks guys, it work now! Smile





12-09-2011, 03:51 PM
Find




Users browsing this thread: 2 Guest(s)