View previous topic :: View next topic |
Author |
Message |
KOLIAN_bel
Joined: 24 Mar 2007 Posts: 12 Location: BELARUS
|
Posted: Mon Mar 26, 2007 12:44 pm Post subject: Code tutorial -> Shotgun shot- shell drop |
|
|
I think about this and wrote my code...
STEP 1
Open weapons.qc and wrote after this :
void() SuperDamageSound;
this:
void() DropShell;
STEP 2
go to bottom and past this :
===================
DropShell
===================
*/
void() DropShell =
{
local entity item;
self.punchangle_x = -2;
item = spawn();
item.owner = self;
item.solid = SOLID_BBOX;
item.origin = self.origin - '0 0 24';
item.movetype = MOVETYPE_TOSS;
makevectors (self.v_angle);
if (self.v_angle_x)
item.velocity = v_forward*600 + v_up * 200 + crandom()*v_right*10 + crandom()*v_up*10;
else
{
item.velocity = aim(self, 1000);
item.velocity = item.velocity * 30;
item.velocity_z = 300;
item.velocity_x = -100 + (random() * 200);
item.velocity_y = -100 + (random() * 200);
}
item.avelocity = '300 300 300';
item.angles = vectoangles(item.velocity);
setmodel (item, "progs/shell.mdl");
setsize (item, '-4 -2 0', '4 2 3');
item.nextthink = time + 10; // remove after 10 seconds
item.think = SUB_Remove;
};
Then find function W_fireShotgun
and after
self.currentammo = self.ammo_shells = self.ammo_shells - 1;
past this:
DropShell ();
GOOD! YOU ARE READY!
(Don't forget to prepare model shell.mdl) |
|
Back to top |
|
 |
scar3crow Inside3D Staff

Joined: 18 Jan 2005 Posts: 837 Location: Las Vegas, NV
|
Posted: Wed Mar 28, 2007 11:53 pm Post subject: |
|
|
I thank you for the submission and the work, however Ive looked it over in the submitted tutorial section and have decided to not publish it, as it functions poorly as an educational tutorial.
No offense is meant by this, a lot of tutorials get the axe because of this very reason, and simply what I mean is, it is redundant to post a tutorial where it simply provides the code to compile and tells you where to place it - at that point it is simply the mod, only the user has a few more steps before they can play it.
Examples of good tutorials can be found at http://www.inside3d.com/showtutorial.php?id=192 which is the squishing tutorial by Orion and http://www.inside3d.com/showtutorial.php?id=191 the fiend jump tutorial by Plumb. These were posted because of their explanations for whats happening in the code itself and why it is being put in. Also they teach us distinct things (vectors, touch routines, things like that) and clearly state it.
A lot of existing tutorials dont quite follow this guideline- most of those were posted before the site reopening in 2006 and were simply ported over.
Dont feel this is an offense to you, merely its something that needs to be said, and just putting it on the frontpage as news is a bit tacky to me. Perhaps a disclaimer on the tutorial submission section would be good... Anyways, I want this site to be a place that helps new coders get into QuakeC, and thorough tutorials is the best way to achieve this.
But seriously, thank you for writing it up and submitting it - I am very glad you have such interest in doing so, I just want to keep the tutorials section as informative as it can be =)
Orion - Im sorry about my delay in publishing Sucker Orb, for some reason it got overlooked by me on submission, but I just now published it (with a minor edit of the language) having read it over and seeing the attention you gave to comments. Your Laser Cannon sounds very cool and would be fun to code, however it is practically devoid of comments aside from where to paste the code, this is exactly what Im trying to avoid - if youre willing to resubmit it with explanations of whats going on like you did with the Sucker Orb and Squish tutorials, I will happily publish it and make a news post about it and the Sucker Orb.
Basic guideline - If the tutorial only tells you where to paste code and then compile, it wont get published. Its not a disapproval of your code, or the subject of the tutorial, just that the subject needs to be explained in order to be a tutorial. |
|
Back to top |
|
 |
KOLIAN_bel
Joined: 24 Mar 2007 Posts: 12 Location: BELARUS
|
Posted: Thu Mar 29, 2007 2:51 pm Post subject: |
|
|
Thank's that you write this, i try to write another one code better,
that you place this to tutorials page.
Thank's! |
|
Back to top |
|
 |
Rodinius
Joined: 27 Apr 2007 Posts: 30
|
Posted: Sat May 05, 2007 11:40 pm Post subject: |
|
|
Yeah, thats the only problem though, because i myself am new to coding but im reading up on Quake C and trying to digest it slowly, but when you see code being churned out, I find it hard at times to grasp where people get what parts to put where to make certain things happen. Also if possible, could somebody set up a glossary for Quake C and a beginners turtorial with full explaining of what each part of code has an effect on what area and the concept of creating a model then making it come to life with code from our animations, but im guessing what i said is probably easier said than done so im gonna button it.
(Just a suggestion thats all) |
|
Back to top |
|
 |
scar3crow Inside3D Staff

Joined: 18 Jan 2005 Posts: 837 Location: Las Vegas, NV
|
Posted: Sun May 06, 2007 12:26 am Post subject: |
|
|
Rodinius - I would love it if someone did that honestly. For some information you could check out the Quake Wiki ( http://wiki.quakesrc.org/ )
Until someone creates an actually truly good introduction tutorial, I would recommend you check out tutorials by the likes of LordHavoc, Plumb, Orion and Preach, amongst others. Look on the front page and scroll through the news for posts made about new tutorials. I provided links and tried to provide summaries of what it covers in the code. |
|
Back to top |
|
 |
Preach
Joined: 25 Nov 2004 Posts: 122
|
Posted: Sun May 06, 2007 1:16 am Post subject: |
|
|
Yeah, if you go to tutorial 6 for the articles I wrote for qexpo, there is some guidance on how to write QC for a new model.
http://qexpo.quakedev.com/booth.php?id=32&page=186
The first half of the tutorial is how to animate things in gmax, but the second half gives an introduction to custom animations in QC. Tutorial 7 expands on this idea by adding a second animation, one where the monster moves. You can get at all these tutorials from the main page:
http://qexpo.quakedev.com/booth.php?id=32
Feedback would be really useful for when I rewrite these things neatly, so let me know anything in them that's unclear or not helpful. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2004 phpBB Group
|