it sounds like you may be handling the display of the enemy characteristics (e.g. in Page_Load) before the button event is raised. Try putting break points on each method and watch what happens.
On 3 Dec, 18:13, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Like I've said in other messages, I'm currently attempting to write a > web-based game (RPG). For my combat system, I'm attempting to create > a turn-based system where the player and computer-controlled character > swap turns. Every attack a combatant can execute is, itself, an > object. The actual attack is a method of that object. > > Right now, in my test page, I have a simple attack scenario. I have > one button tied to the player character's base attack. When clicked, > the attack executes, and the enemy is hit. My problem is that the > output which displays the hit is delayed by a turn. In other words, I > click the attack button, and the page reloads, but the enemy shows no > damage, even though the debugger shows that 1. the attack was > successful, and 2. damage was recorded. In each new battle, no damage > is ever displayed after the first turn, even if it was a success. > > I'm saving the two combatants in a session in order to save their > state for the post back. That way, I can see the damage accrue as I > click the attack button. Could the session be causing the delay? > > Let me know if I need to post my code. I didn't post it initially > because I didn't want to write a huge message and annoy everyone.
