I am using dbp
here's another question, though it does not deal directly with my current project.
how do I load a map from warcraftIII xp map editor into dbp,
If you've ever used or or have even heard of it.
load bsp "warcraft III.wts", "fpstry.wts"
make object cube 1,.3
do
yrotate object 1,object angle y(1)+5
loop
what am I doing wrong, I use it, but the screen is just black.
using your advice:
money#=0
level#=10
strength#=.5*level#
health#=maxhealth#
magic#=1
dam#=strength#
Thaco#=level#*2
magdam#=rnd(magic#+3)
maxhealth#=cont#+level#
cont#=level#-2
xp#=0
magxp#=0
mana#=magic#*50
timer1#=0
dim enem1dam(7) as integer
enem1dam(1)=1
enem1dam(2)=2
enem1dam(3)=2
enem1dam(4)=1
enem1dam(5)=1
enem1dam(6)=1
enem1dam(7)=3
Dim WolfHPs(3) as Integer `Here's an array for storing the wolves' hitpoints
Dim WolfNames(3) as String `Here's an array for storing the wolves' names
Global WolfTracker as Integer `WolfTracker keeps track of which wolf we are looking at.
dim wolf1dam(12) as integer
dim wolf2dam(16) as integer
dim wolf3dam(22) as integer
rem start
do
set text size 20
print "choose your own adventure"
input "type in youre name ", name$
cls
print " welcome ", name$
print
print "up=attack"
print
print "down=magic"
print
print " you are an adventurer lost in a forest"
print
print "'where am I?'"
print
print " you hear rustling leaves"
print
print "'what was that?'"
print
print " you get a bit nervous"
print
print " it stops"
wait key
cls
print "money=",money#
print "hp=",health#
print "magic=",magic#
print "level=",level#
print "mana=",mana#
print "xp=",xp#
print "magic xp=",magxp#
print "a giant green spider jumps at you and you fall to the ground"
print "you have in your hand, a dagger"
print "what do you do?"
enem1hp#=7
print "enemy hp=",enem1hp#
` check for level increase
Restore Level
For i = 1 to 23
Read v
If xp#>v
level#=level#+1
maxhealth#=maxhealth#+2
health#=maxhealth#
Exit
Endif
Next i
`check stats for magic level
restore magic
for i=1 to 23
read v
if magxp#>v
magic#=magic#+1
exit
endif
next i
`adjust stats for level
strength#=.5*level#
dam#=rnd(strength#)
Thaco#=level#*2
maxhealth#=cont#+level#
cont#=level#-2
mana#=magic#*50
do
`check for upkey
if upkey()=1 AND enem1hp#>0 AND timer1#=0
enem1hp#=enem1hp#-dam#
print
print "you hit him with attack"
print
print "hp=",health#
print
print "enemy hp=",enem1hp#
Clear Entry Buffer
timer1#=timer1#+1
wait 200
endif
`check for downkey
if downkey()=1 AND enem1hp#>0 AND mana#>9 AND timer1#=<1
enem1hp#=enem1hp#-magdam#
mana#=mana#-10
print
print " you hit him with magic"
print " Enemy hp=",enem1hp#
print "mana=",mana#
timer1#=timer1#+1
magxp#=magxp#+magdam#
wait 200
Clear Entry Buffer
endif
restore enem1dam
for i=1 to 7
if timer1#>0 then read enem1dam(i)
next i
if i>7 then i=1
if enem1hp#<1 then exit
loop
if enem1hp#<1
xp#=xp#+25
money#=money#+50
timer2#=3
print " continuing through the forest, you are jumped by three wolves!"
print " You are the luckiest adventurer in the world."
print "to switch from one enemy to another, press the leftkey"
print "you are currently targeted at 'weakwolf'"
`Restore tells the computer to start reading from the next Data statement after the label
Restore WolfHps
`Here we read in the hitpoints
For i = 1 to 3
Read WolfHps(i)
Next i
`Here we Restore and read in the names.
Restore WolfNames
For i = 1 to 3
Read WolfNames(i)
Next i
`here we restore the wolf1dam
restore wolf1dam
for i= 1 to 12
if timer2#=1
read wolf1dam(i)
health#=health#-wolf1dam
print "right wolf hit you for ",wolf1dam
timer2#=timer2#+1
print "hp=",health#
endif
next i
if i>12 then i=1
`here we restore wolf2dam
restore wolf2dam
for i= 1 to 16
if timer2#=2
read wolf2dam(i)
health#=health#-wolf2dam
print " mid wolf hit you for ",wolf2dam
timer2#=timer2#+1
print "hp=",health#
endif
next i
if i>16 then i=1
`here we restore damage for wolf 3
restore wolf3dam
for i= 1 to 22
if timer2#=3
read wolf3dam(i)
health#=health#-wolf1dam
print " left wolf hit you for ",wolf2dam
timer2#=0
print "hp=",health#
endif
next i
if i>22 then i=1
`Set our WolfTracker to wolf #1 (Right Wolf)
WolfTracker =1
Do
Print "You are looking at ";WolfNames(WolfTracker);" (";WolfHPs(WolfTracker);" Hit Points)."
Print
Print "Press the left arrow key to change targets."
Do
If LeftKey()
Switch_Wolf() ` Switch_Wolf() is a User-Defined Function: See the line Function Switch_Wolf()
Wait 200
Print
Clear Entry Buffer
Exit
Endif
Loop
Loop
`Switch_Wolf() is a User Defined Function. When ever you use "Switch_Wolf()" in your code, it will run the code below, as if you created a new command for DB.
Function Switch_Wolf()
WolfTracker=WolfTracker+1 `Move to the next wolf
If WolfTracker>3 Then WolfTracker=1 `If we've run out of wolves, go back to the first wolf.
EndFunction
`Here's the data statements.
WolfHPs:
Data 25,20,18
WolfNames:
Data "Right Wolf","Mid Wolf","Left Wolf"
wolf1dam:
data 1,2,1,3,2,4,1,1,1,2,3,1
wolf2dam:
data 1,2,3,4,3,2,1,3,4,2,3,1,4,3,1,4
wolf3dam:
data 2,4,1,3,1,1,2,4,5,1,3,2,5,4,2,1,1,1,1,2,5,4
endif
Level:
Data 100, 200, 400, 700, 1000, 1500, 2250, 4000, 7000, 10000, 17500, 32000, 50000, 90000
Data 150000, 230000, 290000, 400000, 690000, 1000000, 50000000, 1000000000, 10000000000000000000000
magic:
Data 100, 200, 400, 700, 1000, 1500, 2250, 4000, 7000, 10000, 17500, 32000, 50000, 90000
Data 150000, 230000, 290000, 400000, 690000, 1000000, 50000000, 1000000000, 10000000000000000000000
loop
basically, I moved the dim's, and a few other stuff.
oh, and it said "failed to create 'ASMfooter::findlabel'", I stated that wrong above. I case this makes it a completely different problem?