Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Several advanced(probably) questions
MistaEinstein Offline
Junior Member

Posts: 5
Threads: 1
Joined: Jun 2019
Reputation: 0
#5
RE: Several advanced(probably) questions

(06-20-2019, 06:08 PM)Mudbill Wrote: I want to add for #3 that it might help to make a custom entity and use the ManPig enemy type (if you have version 1.3 of Amnesia). I've heard this AI seems to be more "intelligent". What exactly this means I haven't tested, but might be worth a try.

As for #5, I think the phonograph automatically becomes stuck by default when you turn it. Maybe try ResetProp("Phonograph");

Lastly, for #6, I have tested moving LiquidAreas before, and if I remember correctly, if you move a LiquidArea away from the player after entering it, the game won't detect the player leaving it, so they'll be splashing around until you re-enter the area and then leave manually. Maybe this is the case with other entities. I can expect moving LiquidAreas with script to be buggy, so worth testing.
If you need the actual water primitive to move, perhaps make an entity out of a basic plane model using the water texture, then set the entity type to MoveObject and have it move along the Y axis.
It is also possible (although difficult) to simulate some swimming mechanics using script. I know there are a few examples here and there on the forums or elsewhere.


About #3: I also didnt test ManPig enemy type but i placed them several times just for fun. It seems they require harder scripting because they didnt move an inch by themselves.

About #5: Oh, well, it is actually much more easy than i thought. I didn't even need to add any variables - all i did was changing some phonograph's preferences like direction of spinning wheel, e.t.c. I don't quite understand "OverrideDefaults" function though, but it somehow helped me.



Here's the code:
void Phonograph(string &in asEntityName, int alState)
{
   if(alState == 1)
   {
     
          PlaySoundAtEntity("Phono", "Mus1.snt", "phonograph", 1, false);
   
   }
  if(alState == -1)
   {
    StopSound("Phono", 0);
    
       
   }

And, also, about #6: Yeah, it is such a pain in the back. I was thinking about making a block-box that moves along with liquid area in case of liquid area bugging, but then player will also start behave strangely.

Also i somehow need to block the path to the water when it is too high, and kill player in case of him being in the area at this exact moment, but it doesn't seem to be a big problem. The thing i am worried about is critter entities and enemies. And if i can relatively control movements of enemy, spider or cockroach is not something i can control, though it'd be amazing to see a spider on the celling in the room filled with water.



P.S: Oh, also, its a nice opportunity to ask a question. Have you ever had bugs with attached lights and billboards to entities? Recently i faced one problem: i added the effect of red eyes to the monster, but when he fades to smoke or is not active, lights and billboards remain on the place.
06-21-2019, 12:10 AM
Find


Messages In This Thread
RE: Several advanced(probably) questions - by MistaEinstein - 06-21-2019, 12:10 AM



Users browsing this thread: 1 Guest(s)