Frictional Games Forum (read-only)

Full Version: Help with scripting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I am working on mods for Amnesia. I am wondering is possible to make a script for enemies. Namely, I need script which force Grunt or Brute to follow player. Simple 'never-ending' following in close distance with disable triggers (not combat chasing). I know they follow path nodes, but I am not sure they can follow also moving target freely. Anyone can help?
How about making a script area in all the rooms, and then whenever the player enters the room, the it will set the monster to go to a specific pathnode inside that room
This function lets the monster follow you, no matter where you are.
You should place pathnodes so the monster doesn't get stuck. You don't have to connect the pathnodes to the monster.
Code:
ShowEnemyPlayerPosition("MonsterName");
There's no basic (non-combat) follow function for the enemies; you could use beecake's idea, but it would require a lot of scripting and a lot of time spent placing nodes in the editor. Even then, it could still get stuck behind walls and what-not.
and showenemyplayerposition would just make the terror sound play all the time, and make the monster begin attacking. If that is what's intended, then that script would be fine
So, I created script:

Code:
void OnStart()

{
              ShowEnemyPlayerPosition("grunt_x1");

}

I changed enemy name to grunt_x1 in level editor. It appeared at player start position, but won't go anyway, not follow me. I put some pathnodes (not connected to monster), but it didn't help.
Did you check Disable Triggers? Try unchecking that to see if it does anything.
I think that disabling triggers and putting path nodes are the best ideas. That will make the player follow path nodes, but nothing is able to attract his attention. In fact, the player can stand in front of the monster, that it won't attack.
Disable Triggers was checked (according with my intentions). But even when I unchecked it, grunt wasn't chasing me when I was out of its sight.
I mean disable triggers and path nodes at the same time. Try if works.
Pages: 1 2