|
-
May 18th, 2000, 04:46 AM
#1
Thread Starter
New Member
Is there a way to pause execution of a procedure to wait for user input? I'm using VB5 to write a basic rpg with 2 human players and 2 computer players. When combat is initiated, I want to LOOP until both humans or both computers are dead. However, my LOOP continues to LOOP giving the computer players endless turns to attack without pausing for player input. Can anyone help me with a command or source code example? I realize this is probably a pretty basic question but I've never used VB for games before.
-
May 18th, 2000, 09:10 AM
#2
Thread Starter
New Member
I think I've found a way to do it with timers but if anyone has a better method, I'd still love to hear it.
-
Jun 18th, 2000, 12:55 AM
#3
Good Ol' Platypus
Use this:
Option Explicit
Dim Computer1Turn as boolean
dim computer2turn as boolean
dim player1turn as boolean
dim player2turn as boolean
sub timer1_timer()
if computer1turn then
...'code here
end if
end sub
just do it for comp2turn, player1turn and player2turn.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|