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.

DarkBASIC Professional Discussion / bow and arrow....

Author
Message
mihaid
14
Years of Service
User Offline
Joined: 24th Feb 2012
Location:
Posted: 31st Aug 2012 20:54
Hello,

I need a little help:

I created a bow and an arrow, offcorse I want to shoot with that. All it's ok, but every time when shoot arrow, it's rotating 90, and dont know how to stop. Here are the codes:

rem active bowar
if Mouseclick()=1 and activebow=1
if object exist(3200)= 0 then load object "bowtens/bowarrow.dbo",3200
position object 3200,-12,2,5
rotate object 3200, 0, 0, 80
bowarlife =25
endif

If bowarlife > 0
Dec bowarlife
move object 3300, 150
If bowarlife = 22 then gosub backbow
if bowarlife = 10 then gosub handbow
Endif

backbow:

position object 3200,5,-5,25
rotate object 3200, -35, 8, 80
play sound 9754
return


handbow:

if bow>0 then activebow=1
if bow=0 then return

activeaxe=0
activehammer=0
activesickle=0
activepickaxe=0
activesaw=0
rotxarrow=90
gosub handsclear

Load object "bowtens/bowarrow.dbo", 3200
set object collision off 3200
XRotate Object 3200,0
Fix object pivot 3200
Scale object 3200,5,5,5
position object 3200,5,-5,25
rotate object 3200, -35, 8, 80
Lock object on 3200

position object 3300, 0,-20, 140
rotate object 3300, rotxarrow, 0, 0
fix object pivot 3300
lock object on 3300
rem Set object to camera orientation 3300

return


pls help...

Mihai
mihaid
14
Years of Service
User Offline
Joined: 24th Feb 2012
Location:
Posted: 31st Aug 2012 23:07
I just found the sollution............it's great !!!

Mihai
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 2nd Sep 2012 09:16 Edited at: 2nd Sep 2012 09:26
Do share the solution and also please use the [ code ] button...

mihaid
14
Years of Service
User Offline
Joined: 24th Feb 2012
Location:
Posted: 2nd Sep 2012 12:11
I made here a small mistake....sollution was for terrain collision, with sparks dll...exactly like the suggestion

Mihai

Login to post a reply

Server time is: 2026-07-08 14:12:05
Your offset time is: 2026-07-08 14:12:05