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
My grunt hallucination is turned completely around and isn't running towards me
ironman0001 Offline
Member

Posts: 53
Threads: 8
Joined: Sep 2012
Reputation: 0
#11
RE: My grunt hallucination is turned completely around and isn't running towards me

(10-01-2012, 07:53 PM)ironman0001 Wrote:
(10-01-2012, 07:43 PM)Nemet Robert Wrote: With a script?

Use this function:

void StartPlayerLookAt(string& asEntityName, float afSpeedMul, float afMaxSpeed, string& asAtTargetCallback);
void StopPlayerLookAt();
Forces the player to look at a certain entity until StopPlayerLookAt is used.
asEntityName - the entity to look at
afSpeedMul - how fast should the player look at the entity
afMaxSpeed - maximum speed allowed
asAtTargetCallback - function to call when player looks at target
And is there a way to make an enemy just stand without attacking?
And one more thing! How do i make a player crouch as soon as the game starts?
10-01-2012, 07:59 PM
Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#12
RE: My grunt hallucination is turned completely around and isn't running towards me

void SetPlayerCrouching(bool abCrouch);
Forces the player to crouch.

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
10-01-2012, 08:00 PM
Website Find
KingWolf Offline
Member

Posts: 135
Threads: 2
Joined: Sep 2012
Reputation: 7
#13
RE: My grunt hallucination is turned completely around and isn't running towards me

You sure know how to help peeps, Robby.

Helping "Nemet Robert " with his unofficial map.
10-01-2012, 08:02 PM
Find
ironman0001 Offline
Member

Posts: 53
Threads: 8
Joined: Sep 2012
Reputation: 0
#14
RE: My grunt hallucination is turned completely around and isn't running towards me

errr 2 more questions xD How do i make it where the monster doesn't make any noise and how do i make it where the screen goes black and the person teleports somewhere?
10-01-2012, 08:20 PM
Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#15
RE: My grunt hallucination is turned completely around and isn't running towards me

For the 1st one, you'll have to edit the entity. Easier alternative is:
Use FadeGlobalSoundVolume(0, 0); Then reset it back to 1 after the monster spawned. Use a timer for that.


2nd one:
Use the "FadeOut(1);" function, then use a timer that triggers at least 1 second later, which will use the "Teleport("StartPosName");" function, and also use the "FadeIn(1);" function too.
Don't include the quotes.

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
(This post was last modified: 10-01-2012, 08:24 PM by Robby.)
10-01-2012, 08:22 PM
Website Find
ironman0001 Offline
Member

Posts: 53
Threads: 8
Joined: Sep 2012
Reputation: 0
#16
RE: My grunt hallucination is turned completely around and isn't running towards me

(10-01-2012, 08:22 PM)Nemet Robert Wrote: For the 1st one, you'll have to edit the entity. Easier alternative is:
Use FadeGlobalSoundVolume(0, 0); Then reset it back to 1 after the monster spawned. Use a timer for that.


2nd one:
Use the "FadeOut(1);" function, then use a timer that triggers at least 1 second later, which will use the "Teleport("StartPosName");" function, and also use the "FadeIn(1);" function too.
Don't include the quotes.
How do i use timers?
10-01-2012, 08:27 PM
Find
Robby Offline
Posting Freak

Posts: 2,549
Threads: 38
Joined: Jun 2009
Reputation: 47
#17
RE: My grunt hallucination is turned completely around and isn't running towards me

AddTimer("", 1.0f, "CallbackName");

Syntax:

void CallbackName(string &in asTimer)
{
//Script functions here
}

Replace CallbackName with whatever you want, but make sure both names match.

You can also replace 1 with the amount of second you want.

And in //Script functions here. Well you can guess that.

Infrequently active. Don't expect an immediate response. Best to contact me at a different locale. If I create a thread, expect me to be quite active.
10-01-2012, 08:29 PM
Website Find
ironman0001 Offline
Member

Posts: 53
Threads: 8
Joined: Sep 2012
Reputation: 0
#18
RE: My grunt hallucination is turned completely around and isn't running towards me

I'm trying to test out the script by having the guy look at one bottle and then another bottle! But he only looks at the first bottle! But he doesn't look at the second one! Here is the script



void OnStart()
{
AddEntityCollideCallback("Player", "Area_8", "start", true, 1);
AddEntityCollideCallback("Player", "Area_8", "start1", true, 1);
AddEntityCollideCallback("Player", "Area_8", "start2", true, 1);
}

void start(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("wine01_2", 30, 50, "");
AddTimer("fadein1", 1, "intro");
}

void intro(string &in asTimer)
{
StopPlayerLookAt();
RemoveTimer("fadein1");
}

void start1(string &in asTimer)
{
AddTimer("start_t2", 1, "start2");
}

void start2(string &in asTimer)
{
RemoveTimer("start_t2");
StartPlayerLookAt("wine01_23", 30, 50, "");
}
10-01-2012, 09:44 PM
Find
ironman0001 Offline
Member

Posts: 53
Threads: 8
Joined: Sep 2012
Reputation: 0
#19
RE: My grunt hallucination is turned completely around and isn't running towards me

(10-01-2012, 09:44 PM)ironman0001 Wrote: I'm trying to test out the script by having the guy look at one bottle and then another bottle! But he only looks at the first bottle! But he doesn't look at the second one! Here is the script



void OnStart()
{
AddEntityCollideCallback("Player", "Area_8", "start", true, 1);
AddEntityCollideCallback("Player", "Area_8", "start1", true, 1);
AddEntityCollideCallback("Player", "Area_8", "start2", true, 1);
}

void start(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("wine01_2", 30, 50, "");
AddTimer("fadein1", 1, "intro");
}

void intro(string &in asTimer)
{
StopPlayerLookAt();
RemoveTimer("fadein1");
}

void start1(string &in asTimer)
{
AddTimer("start_t2", 1, "start2");
}

void start2(string &in asTimer)
{
RemoveTimer("start_t2");
StartPlayerLookAt("wine01_23", 30, 50, "");
}
Hello???
10-01-2012, 11:18 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#20
RE: My grunt hallucination is turned completely around and isn't running towards me

void OnStart()
{
AddEntityCollideCallback("Player", "Area_8", "start", true, 1);
}

void start(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("wine01_2", 30, 50, "");
AddTimer("fadein1", 2, "intro");
}

void intro(string &in asTimer)
{
StartPlayerLookAt("wine01_23", 30, 50, "");
AddTimer("", 2, "stoplook");
}

void stoplook(string &in asTimer)
{
StopPlayerLookAt();
}
(This post was last modified: 10-01-2012, 11:30 PM by Statyk.)
10-01-2012, 11:30 PM
Find




Users browsing this thread: 2 Guest(s)