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
Question for the pros.
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#2
RE: Question for the pros.

It's not so pro, Tiero Smile

So, in your .hps:

CODE 1 (option 1)
void OnStart()
{
AddUseItemCallback("", "key", "door", "use_key", true);
AddUseItemCallback("", "hammer", "door", "use_hammer", true);
}

void use_key (string &in asItem, string &in asEntity)
{
AddLocalVarInt("Key_variable", 1);
check();
}


void use_hammer (string &in asItem, string &in asEntity)
{
AddLocalVarInt("Key_variable", 1);
check();
}

void check()
{
if (GetLocalVarInt("Key_variable") == 2)
{
AddUseItemCallback("", "crowbar", "door", "crow", true);
}
}


void crow (string &in asItem, string &in asEntity)
{
///Crowbar thing here
}

OPTION 2

void OnStart()
{
AddUseItemCallback("", "key", "door", "use_key", true);
AddUseItemCallback("", "hammer", "door", "use_hammer", true);
}

void use_key (string &in asItem, string &in asEntity)
{
AddLocalVarInt("Key_variable", 1);
check();
}


void use_hammer (string &in asItem, string &in asEntity)
{
AddLocalVarInt("Key_hammer", 1);
check();
}

void check()
{
if (GetLocalVarInt("Key_variable") == 1)
{
AddUseItemCallback("", "crowbar", "door", "crow", true);
}
if (GetLocalVarInt("Key_hammer") == 1)
{
AddUseItemCallback("", "crowbar", "door", "crow", true);
}
}


void crow (string &in asItem, string &in asEntity)
{
///Crowbar thing here
}

Anyway, could you please specify more?

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
(This post was last modified: 11-29-2012, 04:05 PM by The chaser.)
11-29-2012, 04:05 PM
Find


Messages In This Thread
Question for the pros. - by Tiero - 11-29-2012, 03:27 PM
RE: Question for the pros. - by The chaser - 11-29-2012, 04:05 PM
RE: Question for the pros. - by Tiero - 11-29-2012, 05:23 PM
RE: Question for the pros. - by Your Computer - 11-29-2012, 07:50 PM
RE: Question for the pros. - by Tiero - 12-01-2012, 09:44 AM



Users browsing this thread: 1 Guest(s)