Forum posts

Posted 8 years ago2016-01-11 17:37:53 UTC
in hpw to make enemy npc friendly and able Post #328191
i remember i saw another TLK_CFRIENDS with number when i searched this more to understand and figure the code i did tought some number need to be changed to allow more, i from the beginning was assume a number need to be changed to allow more using github just for looking and searching without from the compile program saw found in second this in talkmonster.h just at the beginning line 40 : #define TLK_CFRIENDS 3
so i just need to change this 3 to 4 to give space for 1 more guy so thanks for the fix for this but still there are problems of ambiguous cases and yes i trying this first with the human grunt and not the hassassin so i have to know what is the function (header) for each of the ambiguous cases and for each of the cases use the calling to so it won't mess up , the errors can be seen here: http://www.moddb.com/forum/thread/how-to-make-hgrunt-to-follow-you , in the post before the last, and thanks for the help again
Posted 8 years ago2016-01-11 11:13:40 UTC
in hpw to make enemy npc friendly and able Post #328186
first thanks for the replay, i pretty much know i sure all what need to be added, adding to include the ctalkmonster in the includes since its the header that have the code needed it will change to : class CHAssassin : public CSquadMonster , public CTalkMonster and also i knew i need add to add that tasks and schedules by looking at barney and the scientist code i figured that out alone , i found one who asked how to make the human grunt to follow you here: http://www.moddb.com/forum/thread/how-to-make-hgrunt-to-follow-you from there i knew about the public , public thing and i have a problem that is remain to do this i attempd to try this guys code first to have the human grunt followable he posted the code here http://pastebin.com/Jq0EwWqL but the ambiguous case is the problem since the compiler can't know without indicate the function that is used from the CSquadMonster or the CTalkMonster so in the page bottom the anwser for this was the example:
* Starting Line 251 *
void CHGrunt::DeclineFollowing( void )
{
PlaySentence( "HG_POK", 2, VOL_NORM, ATTN_NORM );
}

*Starting Line 251*
void CHGrunt::DeclineFollowing( void )
{
CSquadMonster::PlaySentence( "HG_POK", 2, VOL_NORM, ATTN_NORM );
}

//Or

*Starting Line 251*

void CHGrunt::DeclineFollowing( void )
{
CTalkMonster::PlaySentence( "HG_POK", 2, VOL_NORM, ATTN_NORM );
}

depends on which function is needed, in this case sure the ctalkmonster i copyed all the code change he did posted on pastbin and after this function separate fix to ge trid of the ambiguous case error there is still other ambiguous cases errors that i dont know and sure how to fix them i can show the errors here im sure this very likely to happen on the hassassin too, also last thing in ctalkmonster cpp any new friend that is follow able must to be add here right? // array of friend names
char *CTalkMonster::m_szFriends[TLK_CFRIENDS] =
{
"monster_barney",
"monster_scientist",
"monster_sitting_scientist",
};
i did add the grunt but there was a error when i did that i will edit this post soon to write it here
Posted 8 years ago2015-12-25 21:06:35 UTC
in hpw to make enemy npc friendly and able Post #327917
no any help? cant find any way to do this..
Posted 8 years ago2015-12-03 01:04:20 UTC
in hpw to make enemy npc friendly and able Post #327635
thanks to all the replays but what i want is just edited female assassin code so it follow able like barney when you use the use key and then i can learn by looking at it how it was done what was add and edited from the original unedited as i said i already changed it to play_ally and i know it will be friendly but just this classfiy code is not what will make it follow able using the use key i did some attempts: adding the shedules and Taskes the set use and that thing of return for shedules that make name you give to use the code and ingame the use key didn't do anything something needed was probably missing , so i want to not mess and to keep trying without success and get someone to give edited code so i can see what was changed and add and from that i can learn how it was done, and there is no need for speak talking lines to be said about follow and stop follow becuase she dont have, i want to know how to make any npc you want to be able to follow you with the use key what need to be add edited and where also beside the npc cpp file if needed.
Posted 8 years ago2015-11-30 15:09:04 UTC
in hpw to make enemy npc friendly and able Post #327602
hello.
i have what is need for the latest sdk visul studio 2010
dont have any knowledge in c++
i looked at many of the game code and i know changeing the classify to return CLASS_PLAYER_ALLY; will make npc friendly
what i want to do is to make a orignaly enemy the female assassin npc
friendly but also be able to follow you i attempted to do this 2 times without success then looked agian in the sdk through github and figured out at least some of the things that need to be added
SetUse( &CBarney::FollowerUse );
and Schedules and Taskes need to be add still not sure how really to do this so if some one get just give edited hassassin.cpp file and explain the changes what was changed added and whetever it will be best way to learn this.
Thanks