Cleansuit scientist won't move Created 5 years ago2019-03-13 22:49:24 UTC by Cabo Fiambre Cabo Fiambre

Created 5 years ago2019-03-13 22:49:24 UTC by Cabo Fiambre Cabo Fiambre

Posted 5 years ago2019-03-13 22:49:24 UTC Post #342254
I'm adding the cleansuit scientist from opposing force to a mod (i'm giving a hand to someone) but he won't follow when i tell him to do so, however, he acts like a normal scientist if i don't do that.

Here's the code:
https://github.com/CaboFiambre73/Code-fixes-and-help/blob/master/cleansuit_scientist.cpp
Posted 5 years ago2019-03-15 14:13:31 UTC Post #342255
Put breakpoints in the CTalkMonster::FollowerUse method and see what it's doing, if anything.
Posted 5 years ago2019-03-15 23:48:32 UTC Post #342260
Put breakpoints in the CTalkMonster::FollowerUse method and see what it's doing, if anything.
I looked everywhere but i don't find that specific part.

I noted that he doesn't react to enemies, i put some soldiers in the map and he doesn't seem to be afraid of them.
Posted 5 years ago2019-03-15 23:53:27 UTC Post #342261
The method is in talkmonster.cpp.
Posted 5 years ago2019-03-16 21:49:53 UTC Post #342267
Ok, i don't want to mess the original code because i'm pretty new at modifying half life's source code but just to make sure, does it need go at the end of the function?
Posted 5 years ago2019-03-16 21:57:56 UTC Post #342268
Breakpoints are not something you add to a function. Read this: https://docs.microsoft.com/en-us/visualstudio/debugger/using-breakpoints?view=vs-2017
Posted 5 years ago2019-03-17 01:51:40 UTC Post #342274
I think there are some hard-coded instances of monster_scientist in the code - maybe you need to add monster_cleansuit_scientist to those places too?
Posted 5 years ago2019-03-17 13:16:51 UTC Post #342281
Oh, i thought that scientists used talkmonster as a base for all their actions.
Posted 5 years ago2019-03-17 14:35:54 UTC Post #342282
They do, they use the follower behavior from that class. That's why i said to use breakpoints in the FollowerUse method, to see what it does.
You must be logged in to post a response.