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
Are grunts programmed to disappear once they finish a path?
Cyfiawn Offline
Junior Member

Posts: 27
Threads: 8
Joined: Jun 2012
Reputation: 0
#1
Are grunts programmed to disappear once they finish a path?

Hello,

I thought I read somewhere that once a Grunt finished it's Path (Path Nodes), if the player isn't looking at it, it should disappear? Or do I have to program it disappearing myself? I currently have this, which triggers from a player walking into an area:

PHP Code: (Select All)
void ZombieTrigger(string &in asParentstring &in asChildint alState){
AddEnemyPatrolNode("Zombie_Spawn_1""PathNodeArea_4"0"");    

AddEnemyPatrolNode("Zombie_Spawn_1""PathNodeArea_7"0"");    

AddEnemyPatrolNode("Zombie_Spawn_1""PathNodeArea_9"0"");    

AddEnemyPatrolNode("Zombie_Spawn_1""PathNodeArea_10"0"");    

AddEnemyPatrolNode("Zombie_Spawn_1""PathNodeArea_11"0"");    

AddEnemyPatrolNode("Zombie_Spawn_1""PathNodeArea_13"0"");    

AddEnemyPatrolNode("Zombie_Spawn_1""PathNodeArea_15"0"");    

AddEnemyPatrolNode("Zombie_Spawn_1""PathNodeArea_16"0"");    

SetEntityActive("Zombie_Spawn_1"true); 




Once it reaches node 16, it just starts walking aimlessly into a wall, and sometimes bugging out and spinning around in circles. I have double and triple checked the path nodes, and they are all correct, I'm just confused as to why he doesn't disappear after touching node 16?

Thanks,
Cyfiawn

EDIT 2.1: Edit 1+2 didn't work...gunna remake the nodes and script from scratch. >_>
(This post was last modified: 06-28-2012, 03:37 PM by Cyfiawn.)
06-28-2012, 01:16 PM
Find
MaZiCUT Offline
Senior Member

Posts: 536
Threads: 31
Joined: Jun 2012
Reputation: 17
#2
RE: Are grunts programmed to disappear once they finish a path?

I think so, but remember to keep your scripts clean too, it will be much easier to work that way.

Keep them in lines like this:

void blabla()
{
script

script

script

event
}

Hi.
06-28-2012, 01:18 PM
Website Find
Cyfiawn Offline
Junior Member

Posts: 27
Threads: 8
Joined: Jun 2012
Reputation: 0
#3
RE: Are grunts programmed to disappear once they finish a path?

The script was clean, it was just copy+paste that didn't work to well. Sad I've formatted it now on the post.

Still getting the issue of him not disappearing though. :/
(This post was last modified: 06-28-2012, 02:03 PM by Cyfiawn.)
06-28-2012, 01:28 PM
Find
ApeCake Offline
Member

Posts: 116
Threads: 20
Joined: Jun 2012
Reputation: 4
#4
RE: Are grunts programmed to disappear once they finish a path?

I remember in my first test map my grunt was bugging like a mad man. Anyways, the monster should disappear if it has finished walking all the path nodes, the player isn't looking at it and is a specific distance away from it. This video is really informative about how the monsters work; it's worth your time.
06-28-2012, 02:37 PM
Find
Cyfiawn Offline
Junior Member

Posts: 27
Threads: 8
Joined: Jun 2012
Reputation: 0
#5
RE: Are grunts programmed to disappear once they finish a path?

(06-28-2012, 02:37 PM)ApeCake Wrote: I remember in my first test map my grunt was bugging like a mad man. Anyways, the monster should disappear if it has finished walking all the path nodes, the player isn't looking at it and is a specific distance away from it. This video is really informative about how the monsters work; it's worth your time.
Thanks for the reply. I turned on Dev mode, and found out I was within the range (a blue circle). All is fixed and (hopefully) working. Done several tests, seems fine. Smile
06-28-2012, 03:36 PM
Find




Users browsing this thread: 2 Guest(s)