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
Grunt not behaving properly.
evertuy Offline
Junior Member

Posts: 46
Threads: 9
Joined: Mar 2011
Reputation: 0
#1
Grunt not behaving properly.

So I have this set up, when you enter a room it has a script area where it triggers a grunt. But the catch is that there is no hiding place so your screwed right? Not really, I WANTED him to be a Hallucination (I have the box checked in his entity tab) so that when he comes close he disappears.
But I'm a bit ticked because when I run the script, he acts like a normal grunt and kills me, can someone clarify?

Quote:void OnStart()
{
AddEntityCollideCallback("Player" , "GruntArea" , "FakeGrunt" , true , 1);
}

void FakeGrunt(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("FakeGrunt", true);
}

This is not the full script, but what I'm focusing on. I saw some functions but when I put them in the required their own syntax. So, I need help.


(Sorry for the constant threads, wish I could delete my others).
03-28-2011, 06:28 PM
Find
Danny Boy Offline
Posting Freak

Posts: 2,718
Threads: 85
Joined: Mar 2011
Reputation: 81
#2
RE: Grunt not behaving properly.

this is only the code to make him spawn...
03-28-2011, 06:48 PM
Website Find
evertuy Offline
Junior Member

Posts: 46
Threads: 9
Joined: Mar 2011
Reputation: 0
#3
RE: Grunt not behaving properly.

Well do I need these,

FadeEnemyToSmoke(string&asName,bool abPlaySound);

voidSetEnemyIsHallucination(string&asName,bool abX);

with

MyFunc(string &in asEntity, int alState)

to make him do what I want?

Sucky sucky 5 grand?
03-28-2011, 07:02 PM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#4
RE: Grunt not behaving properly.

Yes you can either set him as a hallucination, but I don't know what the default distance is; the distance the grunt will fade to smoke.

Your two choices are to either A) make him a hallucination through script or in the level editor itself, or B) to add an entity collide callback, so that when the grunt enters a certain area, it turns calls the FadeEnemyToSmoke() function
03-28-2011, 07:43 PM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#5
RE: Grunt not behaving properly.

He probably is a hallucination since you checked that box, but you need to make the distance at least 2 meters or more. He can attack at around 1.8 meters and can hit you if you don't rush up into him.
03-28-2011, 08:00 PM
Find
evertuy Offline
Junior Member

Posts: 46
Threads: 9
Joined: Mar 2011
Reputation: 0
#6
RE: Grunt not behaving properly.

(03-28-2011, 07:43 PM)palistov Wrote: Yes you can either set him as a hallucination, but I don't know what the default distance is; the distance the grunt will fade to smoke.

Your two choices are to either A) make him a hallucination through script or in the level editor itself, or B) to add an entity collide callback, so that when the grunt enters a certain area, it turns calls the FadeEnemyToSmoke() function

I'm intrigued, how would you use a 'FadeEnemyToSmoke' function with a 'EntityCollideCallback' function if both require a syntax?

Sucky sucky 5 grand?
03-28-2011, 08:05 PM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#7
RE: Grunt not behaving properly.

That info is useful MrBigzy hehe. The attack range. I was planning a scare event with a close encounter with a grunt/brute. Like, very close. heheheeee
03-28-2011, 08:05 PM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#8
RE: Grunt not behaving properly.

Tongue

I did the same thing with my map. Big Grin
03-28-2011, 09:01 PM
Find




Users browsing this thread: 3 Guest(s)