I have a queation regarding coding. It's about the Quake-C Scripting language.
I just started coding in Quake-C 3 days ago and I created a ball as an .obj file in Anim8or, that gets created, when you shoot the starter Gun. It flies and bounces a few times. Pretty simple, but for me, as a beginner, a Milestone
My Question is: How do I apply a texture to the ball?
Does it matter if it is a .obj or .mdl file?
Here's the Code, so you have some context to it:
__________________________________________________ _______________
void() Bullet_Touch =
{
sound (self ,CHAN_WEAPON, "weapons/tink1.wav", 1, ATTN_NORM);
};
/*
================
W_FireShotgun
================
*/
void() W_FireShotgun =
{
local entity bullet;
bullet = spawn();
bullet.movetype = MOVETYPE_BOUNCE;
bullet.solid = SOLID_BBOX;
bullet.owner = self;
bullet.classname = "bullet";
bullet.velocity = v_forward * 900;
bullet.touch = Bullet_Touch;
setmodel(bullet, "progs/Whateverthatthingis.obj");
setsize(bullet, '0 0 0', '16 16 16');
setorigin(bullet, self.origin + '0 0 16');
};__________________________________________________ _______________
I just started coding in Quake-C 3 days ago and I created a ball as an .obj file in Anim8or, that gets created, when you shoot the starter Gun. It flies and bounces a few times. Pretty simple, but for me, as a beginner, a Milestone
My Question is: How do I apply a texture to the ball?
Does it matter if it is a .obj or .mdl file?
Here's the Code, so you have some context to it:
__________________________________________________ _______________
void() Bullet_Touch =
{
sound (self ,CHAN_WEAPON, "weapons/tink1.wav", 1, ATTN_NORM);
};
/*
================
W_FireShotgun
================
*/
void() W_FireShotgun =
{
local entity bullet;
bullet = spawn();
bullet.movetype = MOVETYPE_BOUNCE;
bullet.solid = SOLID_BBOX;
bullet.owner = self;
bullet.classname = "bullet";
bullet.velocity = v_forward * 900;
bullet.touch = Bullet_Touch;
setmodel(bullet, "progs/Whateverthatthingis.obj");
setsize(bullet, '0 0 0', '16 16 16');
setorigin(bullet, self.origin + '0 0 16');
};__________________________________________________ _______________
Comment