Axe Software Forums
  Quest Developer Forum
  attacking other players


Author Topic:   attacking other players
0 Ste 0 posted 24-02-2003 23:22 GMT     
is it possible that if a player attacks another player, he can randomly take (say 30-50) HP off the other player. If its not random, then at least take 40 off each hit depending on the weapon.

P.S. sorry for asking so many questions.

MaDbRiT posted 25-02-2003 07:52 GMT          
Hi again

As you are saying 'a player attacks another player' - I assume you are referring to QuestNet, the multi player version of Quest. (It makes quite a difference to the coding requirements)

Anyway, yes it is perfectly possible to have an attack on another player coded so as to reduce the attacked player's "health" or whatever by either a fixed or a random amount. I don't personally get involved in this style of game, but I would assume the correct approach would be to vary the 'damage' over a range of randomly generated points according to the weapon used in the attack.

e.g. Hitting the other player with a stick might cause 3 to 15 (randomly chosen) points of damage, while using a sword might cause 30 to 100 points worth of damage.

Actually coding this piecemeal for just a couple of weapons isn't particularly tricky, but I would think a much better approach would be to code a set of general purpose 'fighting' routines and maybe even implement them as a library.

Al