Frictional Games Forum (read-only)
Anyone need help? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Anyone need help? (/thread-7825.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22


RE: Anyone need help? - cook - 05-10-2011

I already checked how frictional handled stairs, and they did it one per step - hence why I have 346 nodes, still not working correctly though, monster will try to chase me into the rail of the stair when im on the other side rather than using nodes.


RE: Anyone need help? - Dominic0904 - 05-10-2011

Aha, thanks again dude...one minor other thing...Testing the map, I hid in a cabinet after the monster saw me. He started to hit the doors, but the doors don't seem to be breaking. He's hit them a good ten times roughly now. I haven't got "DisableBreakable" box checked, maybe he's just a weakling...Tongue

While the door he breaks down seems rather weak. He takes two hits and it's down. While I remember it usually took at least 3-4 hits beforehand...is it something do to with the pathnodes he is assigned too? Makes him stronger? Tongue


RE: Anyone need help? - Anxt - 05-10-2011

Thank you for the reply, Kyle.

However, that isn't exactly what I want to happen.

Here's a better description of the problem:

A grunt walks into an area (or a grunt walks into a bar, whichever you prefer Tongue)
This area causes it to fade to smoke, thereby setting it inactive, but only if the grunt is present at 1.5 second intervals. If the grunt leaves the area before that 1.5 seconds has ended, nothing happens (which is what I want).
However, since I have to have a collide function that does not remove itself on one use, if the grunt IS in the area, and fades to smoke, it will continue to play the smoke animation every 1.5 seconds, even though the grunt is technically inactive. I have tried setting the integer which tells the script if the grunt is in the area to 0 immediately after fading the grunt to smoke, but it doesn't work.

So, the reason I want the grunt to move is because even though it is not active, the other scripts still act as though it is. I want to add a timer which calls a push function for the grunt, so that if he is in the area at a 1.5 second interval, he will be knocked out of the area and THEN faded to smoke.

I am not sure if this is possible, however, as I have used all of the impulse and force functions with values of 9 million, and no luck.


RE: Anyone need help? - Khyrpa - 05-10-2011

just wondering... Does it even have physics on?
SetPropPhysics(string& asName, bool abX);


RE: Anyone need help? - Anxt - 05-10-2011

Enemy entities do not have the option of disabling or enabling physics. Or, at least not in the level editor. I will try it when I get the chance, but I don't think it will work.


RE: Anyone need help? - Kyle - 05-10-2011

Interesting. Anxt, I believe you need to add a local variable integer to be able to recognize that the monster doesn't exist.

Is it possible for you to show me your code? If not, please say that and I will jump onto making an example. Smile


RE: Anyone need help? - Anxt - 05-10-2011

Well, as much as I'd like to, I think it would give away a lot, plus the HPS file in question has over 1400 lines so far, and the parts are somewhat separated.

An example would be much appreciated, though.


RE: Anyone need help? - Kyle - 05-10-2011

Ugh... This is giving me a headache.

I'm going to have to describe this in words. I don't feel like putting it into script form. So first off, you should have a "SetLocalVarInt("MonsterGone", 0);" in your "void OnStart()". In your function when the monster is set , use "SetLocalVarInt("MonsterGone", 1);". Now when you...

Wait, so you want the monster to fly back when the monster is faded to smoke? You need to describe it better, or even better, post the pieces of the script that are connected to what you want.


RE: Anyone need help? - Anxt - 05-10-2011

I apologize for the vagueness. What I meant is, even though the monster is fading to smoke as intended, the game still recognizes it as being inside the area. I need it to not be in the area anymore. That's the only reason I wanted it to fly back, because it would get it out of the problem area.

Here's exactly what is happening:

Script area checks for Grunt's presence every 1.5 seconds.
Monster enters area. Effect is triggered. Monster fades to smoke. In 1.5 seconds, monster fades to smoke again even though it is not active, and continues to do this every 1.5 seconds.

To determine if the monster is in the area, I use a simple area and integer. Upon entry, integer is set to 1. Upon leaving, integer is set to 0. After fading the monster to smoke, I have tried setting the integer to 0, but it doesn't seem to work. I will PM you my code if you need me to, but I am trying to make an amazing finale to Abduction and I would like as few people as possible to know what I am up to.


RE: Anyone need help? - Kyle - 05-10-2011

Perhaps you could cause the monster to ignore the player and then to be assigned to new path nodes leading out the way it came, looking like the monster was scared and ran away.

Or you could just add an entity collide callback ("AddEntityCollideCallback("Monster", "ScriptArea_1", "Function", true, 1);") to just set the monster to smoke, causing there to be no repeatablitity to setting the monster to smoke. Or you could set true, to false so it can be called multiple times just in case. I don't know...