Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Need Help!!

Author
Message
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 11th Nov 2005 11:30
hmm..Yeah i need to get battle when object a touch object b i used this command if object collision(301,1)=1 then gosub battle
i using include file battle.dba but when i try executable my game crash.. So experts help me... I only need know how to start battle when object a touch object b!!

...
truth is somewhere out there
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 11th Nov 2005 14:23
don`t use the file battle.dba yust write under do
if object collision(1,2)=1 then goto battle:
thats how i would make it
truth is somewhere out there
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 11th Nov 2005 14:24
and i`t will be easier to help if you could post
source code , so someone could fix it.
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 11th Nov 2005 15:27
OK! I solve this proplem myself! This strange thing dosent work in blueide so i juse #include thing... When my battle engine is ready i put code in codebase with media ooh.. and Final Fantasy fans this battle engine gonna be like Final Fantasy VII

...
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 11th Nov 2005 20:21
Ok now i have bigger proplem when i am on battle player and enemy dosent go back their position when they hitted...
here is my source code

battle:
#include "***.dba"
delete object 1
delete object 301

load object "models/*******.x",302
position object 302,50,10,220
rotate object 302,0,180,0
objground#=get ground height(1000,300,200)

load object "models/*******.x",303
scale object 303,40,40,40
position object 303,50,objground#+5,260
`rotate object 303,0,90,0
play object 303,0,4



playerlife#=100

enemylife#=100


position camera 10,33,239
yrotate camera 90

load music "**********.***",1
play music 1


` ink colors
white=RGB(255,255,255)
blue=RGB(0,128,255)

`EXP and levels
Restore Level
For i = 1 to 23
Read v
If xp#>v
level=level+1
maxhealth=maxhealth+2
health=maxhealth
Endif
Next i
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

l#=50
fl#=50
e#=80
a#=10
spell1=-60

`your attack
repeat


` timer
tim#=tim#+1
sync
position object 303,50,objground#+5,260
if tim#=100 then gosub mothattack
if tim#<100 then gosub box
position object 303,50,objground#+5,270
until playerlife#=0 OR enemylife#=0

` if you win or die
gosub game


`moth
mothattack:
sync
` makemoth appear to fly - moth attack pattern


position object 303,50,objground#+5,270
wait 200
position object 303,50,objground#+5,270
wait 500
playerlife#=playerlife#-5
position object 303,50,objground#+5,230
play object 303,5,6
tim#=tim#-tim#
move#=Move#-1
return



`player attack
playerattack:
sync
sync rate 0

position object 302,50,10,220
wait 0
position object 302,50,10,220
wait 100
enemylife#=enemylife#-5
position object 302,50,10,257
tim#=tim#-tim#
move#=Move#-1
return




` creating the attack box structure

box:


selectedItem=1

do
if move#=1 then gosub mothattack
if move#=2 then gosub playerattack


if e#=0 then end
`print menu items
if selectedItem=1 then ink blue,0 else ink white,0
text 410,400,"Attack"

if selectedItem=2 then ink blue,0 else ink white,0
text 410,450,"Spells"

if selectedItem=3 then ink blue,0 else ink white,0
text 410,500,"Potions"

if selectedItem=4 then ink blue,0 else ink white,0
text 410,550,"Escape"

text 250,550,"HP"+STR$(playerlife#)
`select menu items
if upkey()=1 and hold=0 then dec selectedItem : hold=1
if downkey()=1 and hold=0 then inc selectedItem : hold=1

if upkey()=0 and downkey()=0 then hold=0

if selectedItem>4 then selectedItem=1
if selectedItem<1 then selectedITem=4

` to select items


if returnkey()=1
`attack opponent
if selectedItem=1 then enemylife#=enemylife#-a# : sync : move#=1
if selectedItem=1 then enemylife#=enemylife#-a# : sync : move#=2


`spells
if selectedItem=2
text 200,10,"Firey Grave Spell!"
e#=e#-spell1


sync : sync


`clear up after myself


endif

`display information about the game
if selectedItem=3
l#=l#+50

sync : sync



`clear up after myself

endif

`quit the game
if selectedItem=4
gosub game
endif
endif

sync
loop
return
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 11th Nov 2005 20:22
Ok now i have bigger proplem when i am on battle player and enemy dosent go back their position when they hitted...
here is my source code

Login to post a reply

Server time is: 2024-11-27 14:21:28
Your offset time is: 2024-11-27 14:21:28