timonenluca
Junior Member
Posts: 18
Threads: 7
Joined: Oct 2011
Reputation:
0
|
dont nowhow to fix it :( Script help!!
i dont now what i did wrongwhen i start the map it looks at the hollow (hollow_1) like i wantet but if i pick it up it normally needs to start looking at the chains (use_1) wich doesnt do after i picked it up also i forgot to insert a timer but if someone can help me fix this first please il apreciate it thanks for reading
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("player", "hollow_1", "use_1", "free", true);
SetPlayerActive(true);
SetPlayerCrouching(true);
StartPlayerLookAt("hollow_1", 2, 3, "use");
}
void free(string &in asItem, string &in asEntity)
{
SetPlayerActive(true);
SetPlayerCrouching(false);
StopPlayerLookAt();
}
void use(string &in asEntity, int alState)
{
StartPlayerLookAt("use_1", 2, 3, "");
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
(This post was last modified: 08-11-2012, 03:04 PM by timonenluca.)
|
|
08-11-2012, 02:57 PM |
|
Lizard
Member
Posts: 174
Threads: 23
Joined: Jul 2012
Reputation:
5
|
RE: dont nowhow to fix it :( Script help!!
StartPlayerLookAt in your use function, dosent have the right syntax
This is what i would do:
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("player", "hollow_1", "use_1", "free", true);
SetPlayerActive(true);
SetPlayerCrouching(true);
StartPlayerLookAt("hollow_1", 2, 3, "");
if (HasItem("hollow_1"))
{
AddTimer("", 0.2f, "use");
}
}
void free(string &in asItem, string &in asEntity)
{
SetPlayerActive(true);
SetPlayerCrouching(false);
StopPlayerLookAt();
}
void use(string &in asTimer)
{
StartPlayerLookAt("use_1", 2, 3, "");
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
CURRENT PROJECT:
A Fathers Secret == Just started
(This post was last modified: 08-11-2012, 03:21 PM by Lizard.)
|
|
08-11-2012, 03:18 PM |
|
timonenluca
Junior Member
Posts: 18
Threads: 7
Joined: Oct 2011
Reputation:
0
|
RE: dont nowhow to fix it :( Script help!!
(08-11-2012, 03:18 PM)ZereboO Wrote: StartPlayerLookAt in your use function, dosent have the right syntax
This is what i would do:
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("player", "hollow_1", "use_1", "free", true);
SetPlayerActive(true);
SetPlayerCrouching(true);
StartPlayerLookAt("hollow_1", 2, 3, "");
if (HasItem("hollow_1"))
{
AddTimer("", 0.2f, "use");
}
}
void free(string &in asItem, string &in asEntity)
{
SetPlayerActive(true);
SetPlayerCrouching(false);
StopPlayerLookAt();
}
void use(string &in asTimer)
{
StartPlayerLookAt("use_1", 2, 3, "");
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
} thanks it worked im currently not making any kind of story im learning anyways thanks for help now i now what i did wrong
|
|
08-11-2012, 03:57 PM |
|
|