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
[SOLVED] If 'something' collides with area function
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#3
RE: If 'something' collides with area function

Thank you! Still haven't explored all the possibilities of HPL Wink I will check it out!

I placed "Add_variable_1" and 2 and 3, under AttachFunction.

Here is my script so far

Spoiler below!


void Add_variable_1(string &in asStickyArea, string &in asBodyName)
{
SetLocalVarInt("book_placement_1", 1);

if(GetLocalVarInt("book_placement_1") == 1)
{
if(GetLocalVarInt("book_placement_2") == 1)
{
if(GetLocalVarInt("book_placement_3") == 1)
{
StartEffectFlash(1, 1.0, 1);
AddTimer("", 1, "RealLife_timer");
}
}
}
}

void Add_variable_2(string &in asStickyArea, string &in asBodyName)
{
SetLocalVarInt("book_placement_2", 1);

if(GetLocalVarInt("book_placement_1") == 1)
{
if(GetLocalVarInt("book_placement_2") == 1)
{
if(GetLocalVarInt("book_placement_3") == 1)
{
StartEffectFlash(1, 1.0, 1);
AddTimer("", 1, "RealLife_timer");
}
}
}
}

void Add_variable_3(string &in asStickyArea, string &in asBodyName)
{
SetLocalVarInt("book_placement_3", 1);

if(GetLocalVarInt("book_placement_1") == 1)
{
if(GetLocalVarInt("book_placement_2") == 1)
{
if(GetLocalVarInt("book_placement_3") == 1)
{
StartEffectFlash(1, 1.0, 1);
AddTimer("", 1, "RealLife_timer");
}
}
}
}

///TIMERS

void RealLife_timer(string &in asTimer)
{
TeleportPlayer("PlayerStartArea_3");
}


I had some problems with it, but now it works.

Remember to place something in the AttachAbleBodyName Smile

Trying is the first step to success.
(This post was last modified: 05-27-2012, 08:45 PM by FlawlessHappiness.)
05-27-2012, 07:14 PM
Find


Messages In This Thread
RE: If 'something' collides with area function - by FlawlessHappiness - 05-27-2012, 07:14 PM



Users browsing this thread: 1 Guest(s)