Game Development Community

Weapon questions

by mel tonkin · in Technical Issues · 08/25/2003 (9:38 pm) · 12 replies

I've just embarked on a weapon-making adventure - so far I've got a simple weapon in torque fine..
heres what i need to achieve:
a] attach looping sound to the weapon
b] be able to drop the weapon whenever with a keyboard bind - is 'throwing' a weapon is the same as just dropping it? i dont need to be able to switch between weapons, i've read sam guffeys post on how to do that..

any direction with either of these issues would be greatly appreciated, before i blow my poor little uneducated artist mind wading through every script in the world...
thanks!

#1
08/26/2003 (8:04 am)
If you know code you should look within Realm Wars CVS if you are a TGE liscensee, all of the data which you seek can be found there.

Logan
#2
08/26/2003 (2:34 pm)
Well i dont know code but am a TGE liscensee so I'll give it a shot - thanks!
mel
#3
08/26/2003 (2:38 pm)
According to this your are NOT a TGE licensee . . .
#4
08/26/2003 (5:11 pm)
The organisation i work for is..
#5
09/07/2003 (9:01 pm)
Sorry for being a below-amateur programming pleb, but can anyone tell me what i'm missing here to get a sound playing with my weapon...??

[start of .cs file]

datablock AudioProfile(BoxAmbientSound)
{
filename = "~/data/sound/freak.wav";
description = AudioDefaultLooping3d;
preload = true;
};

[Image datablock]

// Initial start up state
stateName[0] = "Preactivate";
stateTransitionOnLoaded[0] = "Activate";
stateTransitionOnNoAmmo[0] = "NoAmmo";
stateSound[0] = BoxAmbientSound;







and the wav file in the right place..

help much appreciated!
mel
#6
09/08/2003 (5:22 am)
Quote:The organisation i work for is..

won't allow YOU to access the code though.
#7
09/08/2003 (10:44 am)
You must have your own SDK license to access C++ source code. You can work with script without having an SDK license.

Do you get any error messages from this code?
#8
09/08/2003 (2:39 pm)
Quote:Do you get any error messages from this code?

what code?!

The cs file is a script, right?
I dont need to change the source code to make weapons that have sound do I?
#9
09/08/2003 (3:17 pm)
No you don't.... and for the errors you need to check the console.

But really, you are confusing people with your statements. First you claim to be a Torque licensee, that's simply not true. Then you claim the organization you work for is licensed. Again, not true (licenses are personal, an organazation can't license Torque)


Now... about your problem... sounds can be a real bitch ;) I had problems with it before. Moving the sound datablock to a different place in the scripts sometimes did the job, altough that doesn't make any sense. Usually there's an error in the console tough. You might want to check that first.
#10
09/08/2003 (6:49 pm)
Sorry, apologies for the confusion.
i'll check the for errors as soon as i can, thanks for the suggestion.
#11
09/09/2003 (8:39 pm)
More than likely its just the sound files format.

PCM 22.050 kHz, 16 Bit, Mono should be used I think for looping sounds, however I do have a 44 kHz, 16 Bit, Stereo sound running on my main menu so Im not sure.
#12
09/16/2003 (9:55 pm)
Turns out i was using a different sound driver to OpenAL. everything works vaguely as expected with OpenAL hooray and thanks for your help!