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
enemy path nodes
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#10
RE: enemy path nodes

They can't be assigned a patrol path, but they still need patrol nodes to navigate. If you're feeling creative, try creating a silent sound file in Audacity or a similar program. Export into ogg vorbis format, and set up a .snt file for it. Modify the properties so it has a large range and has a decent volume. Since it is silent the player won't hear anything, but you can trigger this sound where you want the lurker to go. Lurkers respond exclusively to sounds and the player coming within a certain height distance.

If triggering the sound via doesn't work, then the only other option is a full conversion to create a custom material, or somehow convincing players to overwrite their default materials.cfg with an additional custom material with silent physics sounds -- this way you can spawn a small custom box and give it a powerful body impulse to have it collide with a wall, thus alerting and luring the lurker away.



Now if that is not unconventional enough for you, you can also lure the lurker into a certain path with food. Create a body part entity in your map. Name it "bait_1". Make it small and static, so the player won't notice it or move it. Create a script area around it called "bait_area_1". Do this multiple times, making sure to keep the index at the end the same. Then copy this script into your map while you have it open in Amnesia -- I did not bugtest this.

Also, I'm not entirely this will work! But it's fun to experiment right??

PHP Code: (Select All)
//////////////////////////////////////
//    QUOTENTOTE LURKER BAIT

//change this to however many bait points you have
const int NUM_BAIT=2;
void OnStart()
{
    for(
int i=1;i<=NUM_BAIT;i++) AddEntityCollideCallback("LURKERNAMEHERE""bait_area_"+i"LurkerBaitCollide"1false);
}

void LurkerBaitCollide(string &in pstring &in cint s)
{
    
int temp=parseStringINT(c);
    
SetEntityActive("bait_"+tempfalse);
    if(
temp==NUM_BAITtemp=1;
    else 
temp++;
    
SetEntityActive("bait_"+temptrue);
}


//////////////////////////////////////
//    PARSING FXNs

int parseStringINT(string str) {
    
int output 0;
    for(
int i=0i<str.length(); i++)
     {
      
int digit getDigit(str[i]);
      if(
digit > -1output 10*output+digit
     }
    return 
output;
}

int getDigit(uint8 digit) {
    
int d digit-48//48 is ASCII code for 0
    
return ((>= 0)&&(d<=9)) ? : -1;


If that works out, the lurker should follow the paths sequentially (goes to 1, goes to 2, etc). Also -- change "LURKERNAMEHERE" to whatever your water lurker's internal name is and make sure you make the bait script areas decently large so the lurker doesn't manage to eat the food Smile



I created large cylindrical collision indicators which you can use in place of a script area -- since the areas are square they won't be as consistent in terms of timing. If you want to use these collision indicators instead let me know and I'll upload the entity file here and modify the script.

(This post was last modified: 02-02-2012, 06:02 PM by palistov.)
02-02-2012, 05:41 PM
Find


Messages In This Thread
enemy path nodes - by Quotentote - 02-02-2012, 04:10 PM
RE: enemy path nodes - by Your Computer - 02-02-2012, 04:14 PM
RE: enemy path nodes - by Quotentote - 02-02-2012, 04:14 PM
RE: enemy path nodes - by Your Computer - 02-02-2012, 04:17 PM
RE: enemy path nodes - by Quotentote - 02-02-2012, 04:18 PM
RE: enemy path nodes - by Your Computer - 02-02-2012, 04:22 PM
RE: enemy path nodes - by Quotentote - 02-02-2012, 04:25 PM
RE: enemy path nodes - by Your Computer - 02-02-2012, 04:42 PM
RE: enemy path nodes - by Quotentote - 02-02-2012, 04:43 PM
RE: enemy path nodes - by palistov - 02-02-2012, 05:41 PM



Users browsing this thread: 1 Guest(s)