Our Scripts Vault contains many game scripts that you can use to create your own game!
Solution #1 is probably better. Also, why disallow other players from attacking the monster? Perhaps do something like World of Warcraft does. The first person to damage a monster 'flags' it as 'their' kill. Only them (or members of their party) will receive experience and loot from the kill.
Quote from: Makari on December 17, 2008, 02:12:06 PMSolution #1 is probably better. Also, why disallow other players from attacking the monster? Perhaps do something like World of Warcraft does. The first person to damage a monster 'flags' it as 'their' kill. Only them (or members of their party) will receive experience and loot from the kill.Yes, I too prefer the 1st solution.Flagging the monster is nice, thanks... but i would like to try to make a turn based combat system (every turn the player can choose to attack, flee, heal, change equipment... so i don't know how to handle two interactive fight at one time (well maybe i can do it provided that i use transactions to keep the npc HP values consistent)
I am very interested in this... TongueHow do you use transactions in your script to handle this situation?
What's your database structure like, if you don't mind sharing? Smiley
What happens if two players click the 'attack' button at the same time when the npc has 1 life left (if it's possible)? Does one player get a 'you killed it' message while the other gets a 'it is already dead!' message? Or is there an error?