Little help with the fight system

Posted by Rob Harper on Wed 15 Oct 2003 04:59 PM — 3 posts, 13,805 views.

#0
This was somthing I thought I could do originaly quite easy, but I cant seem to get a start, my plan was to in swr, is to have each attack, last 1 round and 1 round only, so you would type either kill or murder <name> and it would initiate one round of combat then stop, and you'd have to attack again to start, can anyone give me a hand with this one?
Canada #1
Well, the function to call to stop a fight is " void stop_fighting( CHAR_DATA *ch, bool fBoth )". This will remove the character from the fight, and if you put the bool to true, it will stop all the people currently in that fight. Now, as to where to put this... You might consider the fight update, or possibly at the end of the kill command, as well as a few other places. Hope that helps some.
#2
Ahh, thanks I'll try that I thought there would be a if check somewhere, that if -insert unknown variable here- then return; and it would return to the begining till it didnt meet that -variable- wich is what I was looking for..if it's not there that would explaine why I couldnt find it, but thanks again man, I'll try this out.