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
Deactivating/activating billboards
Pandemoneus Offline
Senior Member

Posts: 328
Threads: 2
Joined: Sep 2010
Reputation: 0
#7
RE: Deactivating/activating billboards

Well, first of all, you made an integer and a string using the same name ("sequence"), that won't work.
Second thing: What is that "t" in your for-loop? The string? It doesn't work like that in Amnesia. First of all, you try to subtract a string from an integer, which would already throw an error. Second thing, "t" must be an integer instead of a string. Third thing is, you will need to use GetLocalVarInt to access it.

And a summarized function instead of all your 14 would probably look like this:
void deactivate(string &in asTimer)
{
SetLightVisible(asTimer, false);
}

and you call that function like that:

for (int i = 1; i <= 14; i++)
{
AddTimer("PointLight_"+i, i, "deactivate"); //this would disable one light each second
}

(This post was last modified: 03-24-2011, 06:11 PM by Pandemoneus.)
03-24-2011, 11:30 AM
Find


Messages In This Thread
Deactivating/activating billboards - by palistov - 03-23-2011, 08:35 AM
RE: Deactivating/activating billboards - by Pandemoneus - 03-24-2011, 11:30 AM



Users browsing this thread: 1 Guest(s)