Page 1 of 2

Coding weapons

Posted: November 13th, 2010, 6:15 pm
by Bigboss
How would you code say,
a gun or a knife and have a Heads up display on the screen and shoot and everything???

Re: Coding weapons

Posted: November 13th, 2010, 6:27 pm
by owenisred
waow good luck with that :)

seroiusly tho, would it not be easier copying bits from saurbraten, and changing the 3d model?

Re: Coding weapons

Posted: November 13th, 2010, 6:33 pm
by Bigboss
welll lets see
im gunna have about 20 different weapons in this game
all I would really need is how to code it and all to like 1 gun then do the rest and yes
I kno it takes 1 hr for 1 gun

Re: Coding weapons

Posted: November 13th, 2010, 7:03 pm
by PizzaLover101
IDK how to do it, but this is what you need to do for 1 gun + enemies

get a player model, + the PM with all the weapons on it

Script the following actions: Pulling it out, putting it away, reloading, shooting, damage it does, health (you + enemies),enemies, places the enemies can go so they can chase you/shoot at you

Things for hud:
a .png pic file with bullet count and reloading
Health (optional)


Other things you might want to include:
How many weapons can you have at once?


Did i miss anything?

Re: Coding weapons

Posted: November 14th, 2010, 11:57 am
by Bigboss
ok lets see if Magic is real...
LEO!!! (Hey it worked in Charmed:D)

Re: Coding weapons

Posted: November 14th, 2010, 12:32 pm
by Leo_V117
Well... For starters you need a lot of knowledge with C++, You also need to know how to make 3D Placeholders (for weapons and whatnot), You then need to re-activate the weapons in Sandbox, You also need to compile it after you add the weapons. Then you need 2 Display units and the Icons can be whatever you want. I think you should leave it to those who know some C++ Like Hirato... Or myself, after I learn it.

Re: Coding weapons

Posted: November 14th, 2010, 12:34 pm
by Bigboss
oh...
cool
wanna help :D?

Re: Coding weapons

Posted: November 14th, 2010, 7:41 pm
by PizzaLover101
I don't think he shouldn't

viewtopic.php?f=10&t=797&p=21312#p21304

Re: Coding weapons

Posted: November 15th, 2010, 8:37 am
by Leo_V117
PizzaLover101 wrote:I don't think he shouldn't

viewtopic.php?f=10&t=797&p=21312#p21304
What?

Re: Coding weapons

Posted: November 15th, 2010, 5:33 pm
by chocolatepie33
WTF, Pizza? You just said you think he should (double negative)...