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.

Code Snippets / FPS Bone Example

Author
Message
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 7th Feb 2005 00:12
Well, this is my first post to code snippets,

Please Comment whether you like it or not and why.
Regards,

Note: there are many others code snippets combined here, so some credits go to their respective owners.
Note2: you need walabers newton wrapper 1.30 and upper installed to compile
Note3: you need a text to speech plugin (i dont remember where to get it but its on the forums) to compile the speech part but its remed out already if you dont need speech.

use keyboard "3" to pull out gun,
use keyboard "1" to holster gun,
use keyboard "r" to reload gun,
use "w,a,s,d" to move,
use "space" to jump,
use "CTRL" to duck,

use "F12" to Debug newton,
use "F10" for glow effect,

Attachments

Login to view attachments
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 7th Feb 2005 00:18
Removed Textures due to big file,
By the way Gun model and sounds are from the game Counter-Strike
so probably you wouldnt have permission to use in commercial stuff.
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 7th Feb 2005 02:57
I couldn't run it for whatever reason.

CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 7th Feb 2005 04:16
probably you dont have, walaber's Newton wrapper 1.30 installed,
go here to pick it
http://walaber.com/ndb.htm
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 7th Feb 2005 04:37 Edited at: 7th Feb 2005 04:39
Yeah I do.
Well I think it was 1.3...
I'll try it now.
[Edit]Argh! Modem:1.1Mbps Download Speed:10.5kbps[/Edit]

CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 7th Feb 2005 18:46 Edited at: 7th Feb 2005 18:47
So, anybody worked it out and have any comments?

In Addition, here is a Sniper Snippet
Change the "Game_Player_Motion:"label with the following;
Use Shiftkey for sniper mode

DesertEagle
19
Years of Service
User Offline
Joined: 7th Feb 2005
Location:
Posted: 8th Feb 2005 01:10
I could'nt seem 2 b able 2 run it.....I get this error:

Quote: "#100025: Declaration name '' is not valid at line 1321."


I've also tried downloading the Newton Wrapper, but I still get the error.
Maybe it's because i'm using DB v1.0.... I didn't got a chance to update it yet to 5.4.
If it's not the reason, then please help me....cuz it seems 2 b a very nice program...nice coding!
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 9th Feb 2005 00:46
it works perfectly fine and it was awesome.

this will come in handy since i have not learned anything about ragdolls yet

CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 9th Feb 2005 03:36
DesertEagle, this is for DBPro 5.7, im not sure about earlier versions.

Lukas W, i just used Walabers ready made ragdoll to keep the file size small.

i have an improved (couple guns, picking ammo from ground, different sniper modes for each gun..etc.) version if you want.
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 9th Feb 2005 04:47
yeah, i thought so.. but now i know a bit more, since i couldnt figure how to load them (my source wouldnt compile, but now it did)

TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 9th Feb 2005 05:19
Cool!
Reminds me of Hitman!

[url]andrewneale2004@yahoo.com[/url]
http://www.freewebs.com/elbsoftware/index.htm
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 9th Feb 2005 06:13
Tomorrow ill upload the version i mentioned above,

in addition you will have all newton specifications with one function call for each which will make your life easy, just add the enemies and nice levels, and you will make a FPS in no time:p
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 10th Feb 2005 04:51
Here is a pistol model, put the model and texture into Media\Models\Guns\ folder
and following is my way to change guns and holster them as well keeping bullet counts for every gun the player has.

Change the Type Entities in the main source file as following:

use key "1" for gun
use key "3" for ak47
use key "q" for holster
use key "r" for reload
use key "e" for sniper modes for each gun
use keys "wasd" for movement
use space key to jump
use ctrl key to crouch
mouse fires
use key "F12" for newton debug
if you have the speech dll, then use "F11" to talk (works on xp and speech installed others)
use key "F10" for glow effect




Change the Game_Player: in the Game_subs.dba as follows:



Change the other Game_Player Motions with the following in the appropriate subs:



Finally change the Game_Info sub as follows to see some info offcourse:

Attachments

Login to view attachments
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 10th Feb 2005 04:58
This is just my way, surely there are other shorter or longer ways to improve these however it needs more attention.
in some days i will include one full intelligent enemy for you to fight with if you people want..
dj blackdragon3710
20
Years of Service
User Offline
Joined: 5th Nov 2004
Location: In LaLa land
Posted: 12th Feb 2005 07:49
Yes. this will come in handy. So would some AI.

It has been said that the body is a slave to the mind. Only the mind knows no freedom.
Nicko
20
Years of Service
User Offline
Joined: 8th Oct 2004
Location:
Posted: 23rd Feb 2005 09:40
yeah that would be cool!
enemy enemy enemy!
Nicko
20
Years of Service
User Offline
Joined: 8th Oct 2004
Location:
Posted: 23rd Feb 2005 09:48
I was just wondering would the code need to be changed much at all if you included your own level.
I'm just messing about with other people's code at the minute see picking up bits here and there.
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 24th Feb 2005 06:15
its easy nicko, however its been long time ive lost interest on DBPro,(learning c# is easier:p) and accidentally saw your post, sorry i wont be in much help but yes its very easy just load your level object somewhere suitable and do somethin like this:



hope it helps.

Login to post a reply

Server time is: 2024-11-23 14:02:52
Your offset time is: 2024-11-23 14:02:52