Inside3D!
     

Three Quake1 Questions?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
smd



Joined: 23 Sep 2007
Posts: 23

PostPosted: Sun Sep 23, 2007 3:15 pm    Post subject: Three Quake1 Questions? Reply with quote

hi!

i have 3 questions about q1!

1. what do i have to change that, when i gib a monster, all the bloody pieces dont disappear?

2. i have changed all my weapons to the right side, like in the dpmod, but when i shoot, the rockets nails & grenades dont appear in front of the guns, they are still in the middle of the screen. how can i fix that?

3. how can i add shell casings from the shotguns and nails stucking in the walls when i shoot with the nailguns?

i really hope someone can help... Cool
Back to top
View user's profile Send private message
Orion



Joined: 12 Jan 2007
Posts: 413
Location: Brazil

PostPosted: Sun Sep 23, 2007 4:47 pm    Post subject: Reply with quote

Well, I can only answer the first 2 questions for you...

To make the bloody pieces don't disappear, open player.qc and find ThrowGib(), replace that whole function with this one:

Code:

void(string gibname, float dm) ThrowGib =
{
   local   entity new;

   new = spawn();
   new.origin = self.origin;
   setmodel (new, gibname);
   setsize (new, '0 0 0', '0 0 0');
   new.velocity = VelocityForDamage (dm);
   new.movetype = MOVETYPE_BOUNCE;
   new.solid = SOLID_NOT;
   new.avelocity_x = random()*600;
   new.avelocity_y = random()*600;
   new.avelocity_z = random()*600;
   new.ltime = time;
   new.frame = 0;
   new.flags = 0;
};


Notice that I've removed the new.think and new.nextthink lines, that makes it disappear.

About the right side guns, open weapons.qc and scroll down to W_FireRocket(). Change the setorigin line to this:

Code:

setorigin (missile, self.origin + v_forward*8 + '0 0 16' + v_right*9);


v_right will make the rocket spawn 9 units to the right.

Do the same with W_FireGrenade():

Code:

setorigin (missile, self.origin + v_right*9);


Change launch_spike() in W_FireSuperSpikes():

Code:

launch_spike (self.origin + '0 0 16' + v_right*9, dir);


Same with W_FireSpikes(), but a little different:

Code:

launch_spike (self.origin + '0 0 16' + v_right*(9 + ox), dir);



Now the third question I don't know exactly... Maybe some other guy will help you.
_________________
There's no signature here. Stop looking for one.
Back to top
View user's profile Send private message
smd



Joined: 23 Sep 2007
Posts: 23

PostPosted: Sun Sep 23, 2007 7:38 pm    Post subject: Reply with quote

wow, thank u very much for your help !!!
Back to top
View user's profile Send private message
Urre



Joined: 05 Nov 2004
Posts: 1073
Location: Sweden

PostPosted: Mon Sep 24, 2007 6:10 am    Post subject: Reply with quote

There might be tutorials on this very site that can help you, but you really should consider removing entities such as the ones you describe, atleast after a while, since they'll eat memory and bandwidth, not to speak of the fact that you'll quickly hit the limit of 512 entities unless using an engine with upped limits or unlimited entities (such as darkplaces)
_________________
Look out for Twigboy
Back to top
View user's profile Send private message Visit poster's website
Error
Inside3D Staff


Joined: 05 Nov 2004
Posts: 558
Location: VA, USA

PostPosted: Mon Sep 24, 2007 6:14 am    Post subject: Re: Three Quake1 Questions? Reply with quote

smd wrote:

1. what do i have to change that, when i gib a monster, all the bloody pieces dont disappear?


This could cause some problems with older computers and older engines.... packet overflows are not your friend. I'd recommend making a count for useless objects that're spawned, and when you get too many of them, start making the others disappear.

smd wrote:

2. i have changed all my weapons to the right side, like in the dpmod, but when i shoot, the rockets nails & grenades dont appear in front of the guns, they are still in the middle of the screen. how can i fix that?


Problem with that is the client's crosshair wouldn't be accurate at all. You could make you're own crosshair if you so pleased.

smd wrote:

3. how can i add shell casings from the shotguns and nails stucking in the walls when i shoot with the nailguns?


Again, packet overflow hell. Would add to the counter if I were you. Does add a touch of realism though.

Good luck on your mod, and ask again if you need anything else.
_________________
Inside3D : Knowledge Is Power
Darkplaces Documentation Wiki
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
smd



Joined: 23 Sep 2007
Posts: 23

PostPosted: Mon Sep 24, 2007 7:24 pm    Post subject: Reply with quote

thanks for your tips guys Cool

the gibbing work great, also do my right sided weapons!

only 1 little problem left:

the big lightning bold from the lightning gun !!!

have moved the little one, but i cant move the big one!! ???
Back to top
View user's profile Send private message
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Mon Sep 24, 2007 11:20 pm    Post subject: Reply with quote

smd wrote:

only 1 little problem left:

the big lightning bold from the lightning gun !!!

have moved the little one, but i cant move the big one!! ???


You can't. Unless you use a custom engine. Oddly enough, iD made it such that entities other than the player can offset their bolts, but the player himself can't. O_o
_________________
"Roboto suggests Plasma Bazooka."
Back to top
View user's profile Send private message
FrikaC
Site Admin


Joined: 08 Oct 2004
Posts: 947

PostPosted: Tue Sep 25, 2007 12:49 am    Post subject: Reply with quote

umm. What? The little one I'm assuming is the model piece on the end of the gun viewmodel, you're talking about? The big one being the actual in engine lightning beam?

You most certainly can move that without modifying the engine.

look for:
Code:

   WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
   WriteByte (MSG_BROADCAST, TE_LIGHTNING2);
   WriteEntity (MSG_BROADCAST, self);
   WriteCoord (MSG_BROADCAST, org_x);
   WriteCoord (MSG_BROADCAST, org_y);
   WriteCoord (MSG_BROADCAST, org_z);
   WriteCoord (MSG_BROADCAST, trace_endpos_x);
   WriteCoord (MSG_BROADCAST, trace_endpos_y);
   WriteCoord (MSG_BROADCAST, trace_endpos_z);


The org variable here is the start position of the beam, you can move it over by adding this before it (probably want to add it before the traceline too):

org = org + v_right * 9;
Back to top
View user's profile Send private message Send e-mail
smd



Joined: 23 Sep 2007
Posts: 23

PostPosted: Tue Sep 25, 2007 5:56 am    Post subject: Reply with quote

Code:
   org = self.origin + '0 0 16' + v_right*8;
   
   traceline (org, org + v_forward*600, TRUE, self);

   WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
   WriteByte (MSG_BROADCAST, TE_LIGHTNING2);
   WriteEntity (MSG_BROADCAST, self);
   WriteCoord (MSG_BROADCAST, org_x);
   WriteCoord (MSG_BROADCAST, org_y);
   WriteCoord (MSG_BROADCAST, org_z);
   WriteCoord (MSG_BROADCAST, trace_endpos_x);
   WriteCoord (MSG_BROADCAST, trace_endpos_y);
   WriteCoord (MSG_BROADCAST, trace_endpos_z);

   LightningDamage (self.origin, trace_endpos + v_forward*4, self, 30);
};



org = self.origin + '0 0 16' + v_right*8;

changed that for the little model piece!!!


can you please show me exactly what to change for the engine ligthning beam???

sorry im a n00b !
Back to top
View user's profile Send private message
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Tue Sep 25, 2007 6:20 am    Post subject: Reply with quote

I think the engine automatically attaches the lightning beam to the person who fired it (as determined by the WriteEntity in there). Maybe that's only DarkPlaces though.

You could spawn a new entity to act as the origin of the lightning beam but that's kinda ugly...
_________________
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Back to top
View user's profile Send private message
Urre



Joined: 05 Nov 2004
Posts: 1073
Location: Sweden

PostPosted: Tue Sep 25, 2007 6:50 am    Post subject: Reply with quote

How is that ugly? Aren't those kind of things what Quake modding is all about? Razz
_________________
Look out for Twigboy
Back to top
View user's profile Send private message Visit poster's website
FrikaC
Site Admin


Joined: 08 Oct 2004
Posts: 947

PostPosted: Tue Sep 25, 2007 3:27 pm    Post subject: Reply with quote

Normal engines do not attach the beam to the entity. The entity parm is only for overriding an existing beam being fired by that entity. The start and end positions are the other parameters and ought to be followed. If LordHavoc fused it to the entity, then he just broke one of my mods (again).
Back to top
View user's profile Send private message Send e-mail
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Tue Sep 25, 2007 6:41 pm    Post subject: Reply with quote

FrikaC wrote:
umm. What? The little one I'm assuming is the model piece on the end of the gun viewmodel, you're talking about? The big one being the actual in engine lightning beam?

You most certainly can move that without modifying the engine.


o rly?

At long range in stock winquake, with org = self.origin + '0 0 16' + v_right*16;
http://tlb.quakedev.com/PICS/misc/lngvrx16a.jpg

At short range:
http://tlb.quakedev.com/PICS/misc/lngvrx16b.jpg

As for the separate entity method being ugly, I agree. For starters, whenever you shoot it up or down, it looks like you're shooting lightning from your eyes. And that's just for starters.

However, it is acceptable if you're going for a railgun.
_________________
"Roboto suggests Plasma Bazooka."
Back to top
View user's profile Send private message
FrikaC
Site Admin


Joined: 08 Oct 2004
Posts: 947

PostPosted: Tue Sep 25, 2007 9:44 pm    Post subject: Reply with quote

Dr. Shadowborg wrote:

o rly?

At long range in stock winquake, with org = self.origin + '0 0 16' + v_right*16;
http://tlb.quakedev.com/PICS/misc/lngvrx16a.jpg

At short range:
http://tlb.quakedev.com/PICS/misc/lngvrx16b.jpg

As for the separate entity method being ugly, I agree. For starters, whenever you shoot it up or down, it looks like you're shooting lightning from your eyes. And that's just for starters.

However, it is acceptable if you're going for a railgun.


wtf
Back to top
View user's profile Send private message Send e-mail
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Wed Sep 26, 2007 4:27 am    Post subject: Reply with quote

FrikaC wrote:
If LordHavoc fused it to the entity, then he just broke one of my mods (again).


It's a cvar. cl_lightningbeam_something probably.

Dr. Shadowborg wrote:
whenever you shoot it up or down, it looks like you're shooting lightning from your eyes.


That's probably because you add '0 0 16'. Try origin + view_ofs - v_up * 6 or something.
_________________
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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