Forum

Railgun

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Railgun

Postby Madfox » Sun Sep 06, 2009 10:13 pm

Dr.Shadowborgh...

many thanks for your tutorial on QuakeSpleen2008!!!
I made a new Railgun and started the tutorial as you posted.
http://qexpo.tastyspleen.net/booth.php?id=131&page=323

To my surprise I received a Quake map with all I expected, except the Railgun changes into a Grenade Launcher.
The sprite comes through, I added my g-rail.mdl but for some reason it changes into a grenadelauncher every time I press 8?

Do you have an idea what could have gone wrong?
User avatar
Madfox
 
Posts: 106
Joined: Sat Jan 15, 2005 3:13 pm
Location: Holland

Re: Railgun

Postby Dr. Shadowborg » Mon Sep 07, 2009 1:10 am

Madfox wrote:Dr.Shadowborgh...

many thanks for your tutorial on QuakeSpleen2008!!!
I made a new Railgun and started the tutorial as you posted.
http://qexpo.tastyspleen.net/booth.php?id=131&page=323

To my surprise I received a Quake map with all I expected, except the Railgun changes into a Grenade Launcher.
The sprite comes through, I added my g-rail.mdl but for some reason it changes into a grenadelauncher every time I press 8?

Do you have an idea what could have gone wrong?


That's because you need a v_rail.mdl too. (for the view model)

Code: Select all
else if (self.weapon == IT_EXTRA_WEAPON)
{
self.currentammo = floor(self.ammo_cells / 5);
self.weaponmodel = "progs/v_rock.mdl";
self.weaponframe = 0;
self.items = self.items | IT_CELLS;
}


Just change the self.weaponmodel = "progs/v_rock.mdl"; to self.weaponmodel = "progs/whatever_your_new_view_model_is_named.mdl"; and you should be good to go. :wink:
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1110
Joined: Sat Oct 16, 2004 3:34 pm

Re: Railgun

Postby Madfox » Mon Sep 07, 2009 2:48 am

That is fantastic!
Only queer point I'm ending now is when I make a map with the railgun it doesn't appear.
It is there, because I can grab it, but it doesn't seem to spawn.

http://members.home.nl/gimli/railgun.jpg
User avatar
Madfox
 
Posts: 106
Joined: Sat Jan 15, 2005 3:13 pm
Location: Holland

Re: Railgun

Postby Dr. Shadowborg » Mon Sep 07, 2009 6:04 pm

Madfox wrote:Only queer point I'm ending now is when I make a map with the railgun it doesn't appear.
It is there, because I can grab it, but it doesn't seem to spawn.


That's because it needs to be positioned in the model file. Right now you can't see it because it's probably inside the brush.

Here's a repackage of what you PMed me earlier.
http://tlb.quakedev.com/files/unsupported/madfox-railgun.zip

Just use the g_rail05.mdl for your weapon pickup model, and the v_rail05.mdl for your view model when using the weapon. :wink: (g_rail05.mdl as been adjusted so that it works properly, I also flipped the base and rail framegroups on the v_rail05.mdl so that it will look right in vanilla quake.)
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1110
Joined: Sat Oct 16, 2004 3:34 pm

Re: Railgun

Postby Madfox » Mon Sep 07, 2009 10:46 pm

Perfekt! I hope you like the model.
I only received a "SV_Modelindex: model progs/ v_rail.mdl was not precached.", but that was only a add at world.qc
Looks fine now, somewhat low without hub but clearly going.

Many Thanks!!!

:D
User avatar
Madfox
 
Posts: 106
Joined: Sat Jan 15, 2005 3:13 pm
Location: Holland


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest