Hypercube
Member
Posts: 124
Threads: 20
Joined: Sep 2015
Reputation:
1
|
Monsters Will Not Follow Path Nodes
If you check my other thread "Intro to mod", I covered a particular bug that still is not fixed where the command Player_SetActive(false); only worked in debug mode and not in ModLoader because I could move in Modloader and look around but in debug it would work and I couldn't, but even then you could still press shift to run and standup because you start out crouching. If anyone could answer that it'd be great. But another problem is bugging me a lot, after I added the Message Module Abion47 created. The monsters I placed into the level and gave them pathnodes to follow, won't follow the pathnodes for some reason now. I did everything correctly in the script file for it, at least I am pretty sure of it, but they still don't do it like they're supposed to. Can anyone help me with this? Here is the code I have for the both of them:
Entity_SetActive("monster_glimpse_1",true); Pathfinder_Track_Start("monster_glimpse_1",false,1.0f,"GlimpseEnd"); Pathfinder_Track_Add("monster_glimpse_1", "glimpsenode_1"); Pathfinder_Track_Add("monster_glimpse_1", "glimpsenode_2"); Pathfinder_Track_Add("monster_glimpse_1", "glimpsenode_3");
Entity_SetActive("monster_fixpanel",true); Pathfinder_Track_Start("monster_fixpanel",false,1.0f,"FixPanelChase"); Pathfinder_Track_Add("monster_fixpanel","fixpanel_pathnode"); Pathfinder_Track_Add("monster_fixpanel","glimpsenode_1");
|
|
06-13-2016, 11:22 PM |
|
Abion47
Senior Member
Posts: 369
Threads: 22
Joined: Oct 2015
Reputation:
46
|
RE: Monsters Will Not Follow Path Nodes
You need to call Pathfinder_Track_Start calls after all your calls to Pathfinder_Track_Add. It would also be a good idea to make a call to Pathfinder_Track_Clear at the beginning of it all.
|
|
06-14-2016, 12:26 AM |
|
Hypercube
Member
Posts: 124
Threads: 20
Joined: Sep 2015
Reputation:
1
|
RE: Monsters Will Not Follow Path Nodes
(06-14-2016, 12:26 AM)Abion47 Wrote: You need to call Pathfinder_Track_Start calls after all your calls to Pathfinder_Track_Add. It would also be a good idea to make a call to Pathfinder_Track_Clear at the beginning of it all.
Thanks, I didn't realize that was a problem, because I kept it that way before and it still worked, but then suddenly didn't work now, or maybe I just have bad memory. Oh, and for the FixPanel monster I made, I wanted to change its state to hunt. And that works, but it just stays still though. The monster just stays still I'm assuming because the chase starts right on that pathnode, but it just reached it so it would not leave it? Well, it does start walking around afterward because it has spotted me, but that's about it though. Is there a way I can get it to actually run though?
(This post was last modified: 06-14-2016, 06:01 PM by Hypercube.)
|
|
06-14-2016, 01:23 AM |
|
Hypercube
Member
Posts: 124
Threads: 20
Joined: Sep 2015
Reputation:
1
|
RE: Monsters Will Not Follow Path Nodes
(06-14-2016, 01:23 AM)Hypercube Wrote: (06-14-2016, 12:26 AM)Abion47 Wrote: You need to call Pathfinder_Track_Start calls after all your calls to Pathfinder_Track_Add. It would also be a good idea to make a call to Pathfinder_Track_Clear at the beginning of it all.
Thanks, I didn't realize that was a problem, because I kept it that way before and it still worked, but then suddenly didn't work now, or maybe I just have bad memory. Oh, and for the FixPanel monster I made, I wanted to change its state to hunt. And that works, but it just stays still though. The monster just stays still I'm assuming because the chase starts right on that pathnode, but it just reached it so it would not leave it? Well, it does start walking around afterward because it has spotted me, but that's about it though. Is there a way I can get it to actually run though?
Does no one read this thread anymore or is it just taking a long time? I feel like people stop reading a thread only because the last message on it began with the word thanks... Maybe this is a really dumb question to ask and I'm impatient or something but whatever.
|
|
06-17-2016, 02:07 AM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Monsters Will Not Follow Path Nodes
(06-17-2016, 02:07 AM)Hypercube Wrote: Does no one read this thread anymore or is it just taking a long time? I feel like people stop reading a thread only because the last message on it began with the word thanks... Maybe this is a really dumb question to ask and I'm impatient or something but whatever.
Nah, it's also the fact that a lot of people still aren't particularly in the SOMA scene yet. A lot of us are still experimenting and finding the little things.
You could try:
void Agent_RevealPlayerPosition("monster_fixpanel");
when you set the Monster to hunt mode. It shouldn't necessarily chase the player unless they see you, but it should walk over towards the player and remain in either hunt or search mode while looking for you. Furthermore, if you layout some pathnodes, it should walk towards the player following the most efficient route at the moment RevealPlayerPosition is called. Perhaps when it gets nearby where you want it to remain, have it collide with a ScriptArea which assigns it new pathnodes to "search" for you, which will loop.
Discord: Romulator#0001
(This post was last modified: 06-17-2016, 02:50 AM by Romulator.)
|
|
06-17-2016, 02:45 AM |
|
Hypercube
Member
Posts: 124
Threads: 20
Joined: Sep 2015
Reputation:
1
|
RE: Monsters Will Not Follow Path Nodes
(06-17-2016, 02:45 AM)Romulator Wrote: You could try:
void Agent_RevealPlayerPosition("monster_fixpanel");
when you set the Monster to hunt mode. It shouldn't necessarily chase the player unless they see you, but it should walk over towards the player and remain in either hunt or search mode while looking for you. Furthermore, if you layout some pathnodes, it should walk towards the player following the most efficient route at the moment RevealPlayerPosition is called. Perhaps when it gets nearby where you want it to remain, have it collide with a ScriptArea which assigns it new pathnodes to "search" for you, which will loop.
Well, the idea is that you're supposed to fix a broken door panel, and when you place the panel on with it being fully repaired, a monster walks around a corner in the distance so you see it and gives chase. But revealing the player position doesn't really help either, it keeps on staying still, and then searches for me afterwards.
|
|
06-18-2016, 02:05 AM |
|
Abion47
Senior Member
Posts: 369
Threads: 22
Joined: Oct 2015
Reputation:
46
|
RE: Monsters Will Not Follow Path Nodes
It sounds like what you want to do is to look at the scene in Theta and see how they have the sequence where Akers runs down the stairs and immediately starts chasing the player.
|
|
06-18-2016, 08:29 PM |
|
Hypercube
Member
Posts: 124
Threads: 20
Joined: Sep 2015
Reputation:
1
|
RE: Monsters Will Not Follow Path Nodes
(06-18-2016, 08:29 PM)Abion47 Wrote: It sounds like what you want to do is to look at the scene in Theta and see how they have the sequence where Akers runs down the stairs and immediately starts chasing the player.
Well, when they frictional games did it then, it wasn't triggered from Akers stepping on a pathnode, but mine is. I mean for me, Akers does go into hunt mode, but all he does it turn towards me, then goes right back to being idle. So I don't think there might even be a solution to this, it's just built in that way with the game. So, I can probably just put a trigger area in between the pathnodes so he will actually chase me, but I wanted to try the other way to save more time anyway.
So I guess I have things figured out here, not entirely sure how I'm going to make the entire map design, but other than that the only issue that needs fixing is the one where in modloader in the intro the Player_SetActive(false); command never seems to work, whereas in debug it does. I already tried putting the entire thing in the void OnEnter section of the script file but it still won't work.
(This post was last modified: 06-25-2016, 11:51 PM by Hypercube.)
|
|
06-19-2016, 12:07 AM |
|
|