[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Reloading in Vanilla Quake with Animations?

Reloading in Vanilla Quake with Animations?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Reloading in Vanilla Quake with Animations?

Postby thommoboy » Fri Jan 13, 2012 7:22 am

i have a reload code but how would i add animations to it?
thommoboy
 
Posts: 95
Joined: Mon Nov 21, 2011 6:35 am

Re: Reloading in Vanilla Quake with Animations?

Postby ceriux » Fri Jan 13, 2012 8:31 am

err.. im not to sure on this but maybe something like
if (self.reloading == 1 && self.weapon == x)
{
self.weaponframe = x;
if (time == time + 1)
self.weaponframes = self.weaponframe + 1;
};

prolly wrong... but it would be the first something i would try off the top of my head.

prolly throw in a check that the frame number doesn go over a certain number and if it does return;?
User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: Reloading in Vanilla Quake with Animations?

Postby dr_mabuse » Fri Jan 13, 2012 2:42 pm

User avatar
dr_mabuse
 
Posts: 80
Joined: Sat Sep 03, 2011 6:07 pm

Re: Reloading in Vanilla Quake with Animations?

Postby Baker » Fri Jan 13, 2012 2:58 pm

The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Reloading in Vanilla Quake with Animations?

Postby ceriux » Fri Jan 13, 2012 5:29 pm

i should really learn quake animation macro's i just dont like them.
User avatar
ceriux
 
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Re: Reloading in Vanilla Quake with Animations?

Postby Jukki » Fri Jan 13, 2012 6:45 pm

I made a nice system for my game that handles the weaponframes. It is built from 2 functions. First one is called whenever you want to update the frames (like at the start of reload). You can set starting frame, ensing frame, speed of animation, function to be called during or at the end of animation (useful for stuf like reload canceling, weapons that has animation before the actual fire). Second function is called every frame and updates the frames (usualy every 0.1 secpnds (or what ever quake time) but incase i have speeden
Or slowen the frame then at that time of course. It also calls the function i have assinged with the animation at given frame/end of the animation. Prety cool system
That doesnt require macro stuff or interfence
With player
Frames

And not hard to code at all :)
Jukki
 
Posts: 214
Joined: Wed Apr 07, 2010 4:59 am

Re: Reloading in Vanilla Quake with Animations?

Postby DusterdooSmock » Fri Jan 13, 2012 8:39 pm

Last edited by DusterdooSmock on Fri Jan 13, 2012 8:55 pm, edited 1 time in total.
DusterdooSmock
 
Posts: 170
Joined: Thu Aug 19, 2010 9:58 pm

Re: Reloading in Vanilla Quake with Animations?

Postby dr_mabuse » Fri Jan 13, 2012 8:51 pm

Nice..

BTW: Do you have problems when picking up ammo or new weapons?
My reloading animations are stopping when i picking up ammo and i still dont know how i can fix this the easy way xD
User avatar
dr_mabuse
 
Posts: 80
Joined: Sat Sep 03, 2011 6:07 pm

Re: Reloading in Vanilla Quake with Animations?

Postby DusterdooSmock » Fri Jan 13, 2012 9:03 pm

DusterdooSmock
 
Posts: 170
Joined: Thu Aug 19, 2010 9:58 pm

Re: Reloading in Vanilla Quake with Animations?

Postby dr_mabuse » Fri Jan 13, 2012 9:11 pm

thanks, i will try it, finally something i can use ;)

My little mod will have pickupable items like original Quake (ammo, weapons etc..), and everytime i reload and pick up ammo some seconds later the animations will stop...
But i think your post will help me :D
User avatar
dr_mabuse
 
Posts: 80
Joined: Sat Sep 03, 2011 6:07 pm

Re: Reloading in Vanilla Quake with Animations?

Postby DusterdooSmock » Fri Jan 13, 2012 9:17 pm

DusterdooSmock
 
Posts: 170
Joined: Thu Aug 19, 2010 9:58 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 2 guests