Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NEED HELP

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
PRINT "you have encountered omega"
INPUT "Would you like to fight this monster"; c3$
IF c3$ = "y" THEN
PRINT "Omega has"; hp; "HP"; de; "defence"
PRINT "Omega is level"; lv
ELSE
END IF
damage:
dam: RANDOMIZE TIMER / 3
FOR count = 1 TO 1
LET d = RND
LET d = INT(tdamage * d) + 1

NEXT count
damage2 = hp - d

hit:
INPUT "would you like to attack or run"; c4$
IF c4$ = "attack" THEN
GOTO attack
ELSE
END IF
IF c4$ = "run" THEN
GOTO move
ELSE
END IF

attack: IF damage2 < 0 THEN
PRINT &quot;you hit him at &quot;; d
PRINT &quot;you've gained&quot;; xp; &quot;exprience points&quot;
PRINT &quot;you have earned&quot;; gld; &quot;gold&quot;
ELSE
END IF

IF damage2 > 0 THEN
PRINT &quot;you hit him at &quot;; d
PRINT ; damage2; &quot;hitpoints left&quot;
GOTO dam
ELSE
END IF
End


OK that is my code now in the randomize timer statement it randomizes omegas HP and now i want the user to attack him i want to be able to stop the randomizing for just this fight is it possible
thx in advance



 
I am not sure if this is possible or not(I don't think it is), but it sounds like you are trying to make an action game, for this I would suggest learning Dark Basic, there is a forum here for it, and it is much better suited for making games.
 
try this
YOURS: (as far as I can tell 'cuz I'm tired)
RANDOMIZE TIMER / 3 = Omegas HP
And you want to not randomize (erratically) the damage.
MINE 1:
RANDOMIZE 50
50 can be any number up to that 32000 thing and that then
sets the seed for randomization. random numbers are generated, but upon re-running of the program, the numbers are repeated.
MINE 2:
Damage% = INT(RND * WeaponPower%) + WeaponBonus%
Damage% = Damage% - OmegaDefense%
IF Damage% < 0 then Damage% = 0
'just change the variables
PS: Don't use LET, just upgrade QB (is that why people use LET anyway?)
 
I dont know... I've seen some pretty kik-a games written in QBasic... and writing it in QB is far more rewarding.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top