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
Multiple Issues Help Script
Icaab2607 Offline
Junior Member

Posts: 34
Threads: 13
Joined: Mar 2013
Reputation: 0
#1
Question  Script

Tell me,whereins fault of this script,on idea, should a player become active, and monster no active.
But of this, nothing happens:
void OnStart()
{
AddEntityCollideCallback("Player", "Grunt", "Grunt", true, 1);
}
void Grunt(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
PlaySoundAtEntity("", "rnd2.snt", "Player", 0, false);  
SetEntityActive("servant_grunt_ragdoll_1", true);
StartPlayerLookAt("LOOKGRUNT", 1, 1, "");
AddTimer("", 4.0f, "stoplooking2");
}
void stoplooking2(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(5.0f, true);
AddPropForce("servant_grunt_ragdoll_1", 5000.0f, 0.0f, 0.0f, "world");
StopPlayerLookAt();
SetPlayerActive(true);
SetEntityActive("servant_grunt_ragdoll_1", false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
}
07-05-2013, 08:06 PM
Find
Kullin Offline
Member

Posts: 218
Threads: 23
Joined: May 2013
Reputation: 3
#2
RE: Script

(07-05-2013, 08:06 PM)Icaab2607 Wrote: Tell me,whereins fault of this script,on idea, should a player become active, and monster no active.
But of this, nothing happens:
void OnStart()
{
AddEntityCollideCallback("Player", "Grunt", "Grunt", true, 1);
}
void Grunt(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
PlaySoundAtEntity("", "rnd2.snt", "Player", 0, false);  
SetEntityActive("servant_grunt_ragdoll_1", true);
StartPlayerLookAt("LOOKGRUNT", 1, 1, "");
AddTimer("", 4.0f, "stoplooking2");
}
void stoplooking2(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(5.0f, true);
AddPropForce("servant_grunt_ragdoll_1", 5000.0f, 0.0f, 0.0f, "world");
StopPlayerLookAt();
SetPlayerActive(true);
SetEntityActive("servant_grunt_ragdoll_1", false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
}

Whats the "Grunt"? A script area?

Edit: try this
void OnStart()
{
AddEntityCollideCallback("Player", "Grunt", "Grunt", true, 1);
}
void Grunt(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
PlaySoundAtEntity("", "rnd2.snt", "Player", 0, false);  
SetEntityActive("servant_grunt_ragdoll_1", true);
StartPlayerLookAt("LOOKGRUNT", 1, 1, "");
AddTimer("", 4.0f, "stoplooking2");
}
void stoplooking2(string &in asTimer)
{
GiveSanityDamage(5.0f, true);
AddPropForce("servant_grunt_ragdoll_1", 5000.0f, 0.0f, 0.0f, "world");
StopPlayerLookAt();
SetPlayerActive(true);
SetEntityActive("servant_grunt_ragdoll_1", false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
}
(This post was last modified: 07-05-2013, 08:10 PM by Kullin.)
07-05-2013, 08:08 PM
Find




Users browsing this thread: 2 Guest(s)