2019-02-24 19:54:14

hello
how I can   create a weapon  using BGT. for example a sword
thanks

2019-02-24 20:17:40

hi
eg like this
int weapon0damage=10;
int weapon0range=4;
int weapon0time=120;
int weapon0speed=30;
bool weapon0scatter=false;
timer weapontimer;
if (key_pressed(KEY_GRAVE))
{
speak("sword");
weapon=0;
p.play_stationary("sworddraw.ogg",false);
weapondamage=weapon0damage;
weaponrange=weapon0range;
weapontime=weapon0time;
weaponspeed=weapon0speed;
weaponscatter=weapon0scatter;
});

Thumbs up

2019-02-24 20:23:26

That question is way to broad. There are any number of ways to code in a weapon and a lot of it depends on how you plan to use it in any given game.

Some people might choose to create an entire weapon object. Some programs may not need that approach.

Are there other types of weapons? Do your weapons change during the course of the game? How do they change: upgrade, leveling, spontaneous transmutation?

You need to be much more specific in your question and how your program will work. And remember not many people here are willing to write your code for you. If you have a question about particular syntax, we would be happy to point you in the right direction--maybe even outline some pseudo code for you. But I, for one, would like you to narrow your question quite a bit before I could truly help you.

If you're wrong, you're wrong.
You can follow me on twitter @s_luttrell and an almost never used Facebook account at skluttrell.

Thumbs up

2019-02-24 23:19:05

@2, this is pretty much a terrible way to make weapons. With those kinds of variables, you might as well put them in a class for more flexability, cleaner code, and more maintainable systems.

Sincerely,
Lucas.

Thumbs up

2019-02-24 23:51:17

Plus, i'm 99.9 per cent sure that code is from dizafio mortle or ultrapower. I know i've seen that somewhere before.

2019-02-25 02:15:18

its from zombie arena

If you would like to talk to me, you can add me on skype @ live:adelspence2004.
and if you wanna folow me on twitter, you can ad [email protected] Spence

Thumbs up

2019-02-25 04:25:06

@3  I want to create a weapon without any special conditions

2019-03-05 02:53:52 (edited by adel.spence 2019-03-05 02:55:30)

sorry to be the reaper here, but I hav some questions to ask.
<ul>
<li>1 can someone give me a item class and a invantorry class?</li>
<li>2can someone tell me how to make long wange weapons?</li>
<li>3how do you implement 3d sound with bgt?</li>
<li>4can someone help with makeing a steircace class?</li>
</ul>

If you would like to talk to me, you can add me on skype @ live:adelspence2004.
and if you wanna folow me on twitter, you can ad [email protected] Spence

Thumbs up

2019-03-05 02:56:34

woops, cant post html in the forom.

If you would like to talk to me, you can add me on skype @ live:adelspence2004.
and if you wanna folow me on twitter, you can ad [email protected] Spence

Thumbs up