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


Thread Rating:
  • 4 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Anyone need help?
cook Offline
Member

Posts: 103
Threads: 6
Joined: Apr 2011
Reputation: 0
#71
RE: Anyone need help?

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.
05-10-2011, 12:16 PM
Find
Dominic0904 Offline
Member

Posts: 63
Threads: 14
Joined: Apr 2011
Reputation: 0
#72
RE: Anyone need help?

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
(This post was last modified: 05-10-2011, 01:08 PM by Dominic0904.)
05-10-2011, 12:25 PM
Find
Anxt Offline
Senior Member

Posts: 588
Threads: 12
Joined: Mar 2011
Reputation: 10
#73
RE: Anyone need help?

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.

05-10-2011, 03:36 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#74
RE: Anyone need help?

just wondering... Does it even have physics on?
SetPropPhysics(string& asName, bool abX);
05-10-2011, 03:42 PM
Find
Anxt Offline
Senior Member

Posts: 588
Threads: 12
Joined: Mar 2011
Reputation: 10
#75
RE: Anyone need help?

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.

05-10-2011, 03:44 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#76
RE: Anyone need help?

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

(This post was last modified: 05-10-2011, 05:50 PM by Kyle.)
05-10-2011, 05:23 PM
Find
Anxt Offline
Senior Member

Posts: 588
Threads: 12
Joined: Mar 2011
Reputation: 10
#77
RE: Anyone need help?

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.

05-10-2011, 06:18 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#78
RE: Anyone need help?

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.

(This post was last modified: 05-10-2011, 06:51 PM by Kyle.)
05-10-2011, 06:51 PM
Find
Anxt Offline
Senior Member

Posts: 588
Threads: 12
Joined: Mar 2011
Reputation: 10
#79
RE: Anyone need help?

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.

05-10-2011, 07:02 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#80
RE: Anyone need help?

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...

05-10-2011, 07:12 PM
Find




Users browsing this thread: 12 Guest(s)