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.

Dark GDK / TPS Shooting Game

Author
Message
AriEf
14
Years of Service
User Offline
Joined: 30th Nov 2009
Location: Indonesia
Posted: 24th Dec 2010 11:21
Hi.
I am Working on a tps game and i was stuck on shooting. can you give me a tutorial like a project only for a shooting? i really want to study it.

Rank : Beginner Coder
Im Indonesian, and I cant speak english, i hope you understand
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 24th Dec 2010 22:52
The easiest place to start is the current camera position and orientation. Copy these to your new object created for the bullet and just simply move the object forward from that copied position and orientation. For multiple bullets just run the bullet code through a loop or list handler (a bit more advanced). Try testing this by copying the position and orientation to an object.

Warning! May contain Nuts!
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 25th Dec 2010 00:24
You could also look into dbPickObject()
You would need to provide some more info if you need more specific help.

AriEf
14
Years of Service
User Offline
Joined: 30th Nov 2009
Location: Indonesia
Posted: 27th Dec 2010 02:42
hi.
im sorry for late reply.

anyway, im using dbPickObject().
here's my code


i dont know why enemyhp1 and enemyhp2 only decrease when close range.

Rank : Beginner Coder
Im Indonesian, and I cant speak english, i hope you understand
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 29th Dec 2010 00:57
Raycasting is the best way to find out if an enemy is in the gun's sights and range. You can do this using sparky's collision, and using the SC_IntersectObject() function.

"everyone forgets a semi-colon sometimes." - Phaelax

Login to post a reply

Server time is: 2024-11-19 14:46:21
Your offset time is: 2024-11-19 14:46:21