[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/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 - Reload Help

Reload Help

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Reload Help

Postby DusterdooSmock » Mon Aug 23, 2010 11:39 pm

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

Postby Karatorian » Tue Aug 24, 2010 7:09 am

Karatorian
 
Posts: 31
Joined: Tue Aug 17, 2010 4:26 am
Location: Rindge, NH, USA

Postby DusterdooSmock » Wed Aug 25, 2010 2:43 am

Ok, i did some looking around in "player.qc" and i came up with this:

// At the top of "player.qc"
$frame shotrel1 shotrel2 shotrel3 shotrel4 shotrel5 shotrel6


// A little bit after that
void() player_sreload1 = [$shotrel1, player_sreload2 ] {self.weaponframe=1;};
void() player_sreload2 = [$shotrel2, player_sreload3 ] {self.weaponframe=2;};
void() player_sreload3 = [$shotrel3, player_sreload4 ] {self.weaponframe=3;};
void() player_sreload4 = [$shotrel4, player_sreload5 ] {self.weaponframe=4;};
void() player_sreload5 = [$shotrel5, player_sreload6 ] {self.weaponframe=5;};
void() player_sreload6 = [$shotrel6, player_run ] {self.weaponframe=6;};

But, i have no idea how to trigger the animation....
DusterdooSmock
 
Posts: 170
Joined: Thu Aug 19, 2010 9:58 pm

Postby Karatorian » Wed Aug 25, 2010 4:47 pm

Karatorian
 
Posts: 31
Joined: Tue Aug 17, 2010 4:26 am
Location: Rindge, NH, USA

Postby DusterdooSmock » Wed Aug 25, 2010 10:21 pm

I looked at that tutorial, and i'm pretty sure that i didn't do this right:

void() player_sreload1 =
{
self.frame = $shotrel1;
self.think = player_sreload2;
self.nextthink = time + 4;
reload ();
};

Because, when i try to compile i get this error:

"weapons.qc:56: error: Unknown frame macro $shotrel1"

Any help would be appreciated.
DusterdooSmock
 
Posts: 170
Joined: Thu Aug 19, 2010 9:58 pm

Postby frag.machine » Thu Aug 26, 2010 2:23 am

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Postby DusterdooSmock » Thu Aug 26, 2010 9:52 pm

I think that i defined $shotrel1, but if i didn't what do i have to do to define it?

This is what i have so far:

-- Top of "player.qc"

//
// Reload
//
$frame shotrel1 shotrel2 shotrel3 shotrel4 shotrel5 shotrel6 shotrel7 shotrel8 shotrel9 shotrel10 shotrel11 shotrel12 shotrel13 shotrel14 shotrel15 shotrel16 shotrel17 shotrel18 shotrel19 shotrel20



-- Somewhere right after that

void() player_sreload1 = [$shotrel1, player_sreload2 ] {self.weaponframe=10;};
void() player_sreload2 = [$shotrel2, player_sreload3 ] {self.weaponframe=11;};
void() player_sreload3 = [$shotrel3, player_sreload4 ] {self.weaponframe=12;};
void() player_sreload4 = [$shotrel4, player_sreload5 ] {self.weaponframe=13;};
void() player_sreload5 = [$shotrel5, player_sreload6 ] {self.weaponframe=14;};
void() player_sreload6 = [$shotrel6, player_sreload7 ] {self.weaponframe=15;};
void() player_sreload7 = [$shotrel7, player_sreload8 ] {self.weaponframe=16;};
void() player_sreload8 = [$shotrel8, player_sreload9 ] {self.weaponframe=17;};
void() player_sreload9 = [$shotrel9, player_sreload10 ] {self.weaponframe=18;};
void() player_sreload10 = [$shotrel10, player_sreload11 ] {self.weaponframe=19;};
void() player_sreload11 = [$shotrel11, player_sreload12 ] {self.weaponframe=20;};
void() player_sreload12 = [$shotrel12, player_sreload13 ] {self.weaponframe=21;};
void() player_sreload13 = [$shotrel13, player_sreload14 ] {self.weaponframe=22;};
void() player_sreload14 = [$shotrel14, player_sreload15 ] {self.weaponframe=23;};
void() player_sreload15 = [$shotrel15, player_sreload16 ] {self.weaponframe=24;};
void() player_sreload16 = [$shotrel16, player_sreload17 ] {self.weaponframe=25;};
void() player_sreload17 = [$shotrel17, player_sreload18 ] {self.weaponframe=26;};
void() player_sreload18 = [$shotrel18, player_sreload19 ] {self.weaponframe=27;};
void() player_sreload19 = [$shotrel19, player_sreload20 ] {self.weaponframe=28;};
void() player_sreload20 = [$shotrel20, player_run ] {self.weaponframe=29;};



-- "weapons.qc" after main reload function

void() player_sreload1 =
{
self.frame = $shotrel1;
self.think = player_sreload2;
self.nextthink = time + 0.1;
reload ();
};
DusterdooSmock
 
Posts: 170
Joined: Thu Aug 19, 2010 9:58 pm

Postby frag.machine » Thu Aug 26, 2010 10:46 pm

Last edited by frag.machine on Fri Aug 27, 2010 3:12 am, edited 1 time in total.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Postby DusterdooSmock » Thu Aug 26, 2010 11:24 pm

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

Postby frag.machine » Fri Aug 27, 2010 3:19 am

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Postby DusterdooSmock » Fri Aug 27, 2010 3:40 am

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

Postby frag.machine » Fri Aug 27, 2010 1:18 pm

I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Postby DusterdooSmock » Fri Aug 27, 2010 1:40 pm

Is this the function that you are talking about?

void() player_run;

void() player_stand1 =[ $axstnd1, player_stand1 ]
{
self.weaponframe=0;
if (self.velocity_x || self.velocity_y)
{
self.walkframe=0;
player_run();
return;
}
DusterdooSmock
 
Posts: 170
Joined: Thu Aug 19, 2010 9:58 pm

Postby frag.machine » Fri Aug 27, 2010 4:07 pm

Yes, that's it.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Postby DusterdooSmock » Mon Aug 30, 2010 1:39 pm

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

Next

Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest