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 Help Make an item appear after smashing plates?
Dominic0904 Offline
Member

Posts: 63
Threads: 14
Joined: Apr 2011
Reputation: 0
#3
RE: Make an item appear after smashing plates?

Ok, this is what I got:

Quote:void OnStart()
{
SetEntityCallbackFunc("BrokenPlates", "Break");
}



void BrokenPlates(string &in asEntity, string &in type)
{
if(type == "Break")
{
AddLocalVarInt("non_broken_*", 1);
if (GetLocalVarInt("non_broken_*") == 5) SetEntityActive("CellarKey_01", true);
}
}


I guess the variable was the name of the plates that needed to be broken? Sorry I'm not that experienced with the more advanced stuff. The map loads fine, but after breaking all the plates with the name non_broken_* (the * is so that it includes all the plates with the same name and the number at the end as well.)
(This post was last modified: 04-18-2013, 05:37 PM by Dominic0904.)
04-18-2013, 05:34 PM
Find


Messages In This Thread
RE: Make an item appear after smashing plates? - by Dominic0904 - 04-18-2013, 05:34 PM



Users browsing this thread: 1 Guest(s)