lfnetwork.com mark read register faq members calendar

Thread: From Jet To Flight
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 08-15-2005, 05:52 PM   #1
D-style
Rookie
 
D-style's Avatar
 
Join Date: Feb 2005
Posts: 12
From Jet To Flight

ya i deleted the previous thread cuz it was messy..
neways 1st thing i did was add a fly type movement in bg_public.h
Code:
typedef enum {
	PM_NORMAL,		// can accelerate and turn
	PM_JETPACK,		// special jetpack movement
	PM_FLOAT,		// float with no gravity in general direction of velocity (intended for gripping)
	PM_NOCLIP,		// noclip movement
	PM_SPECTATOR,	// still run into walls
	PM_DEAD,		// no acceleration or turning, but free falling
	PM_FREEZE,		// stuck in place with no control
	PM_INTERMISSION,	// no movement or status bar
	PM_SPINTERMISSION	// no movement or status bar
	PM_FLY		//Flightmode by *Shady-D*
} pmtype_t;
The second thing i did was animate some flying animations for it and adding them in animtable.h and anims.h
than i copied some of the JP code and made the animations work with the PM_FLY
in bg_pmove.c
Code:
	//If we are flying, play anims
	if (pm->ps->pm_type == PM_FLY)
	{
		if (pm->cmd.rightmove > 0)
		{
			PM_ContinueLegsAnim(BOTH_FLY_RIGHT);
		}
		else if (pm->cmd.rightmove < 0)
		{
            PM_ContinueLegsAnim(BOTH_FLY_LEFT);
		}
		else if (pm->cmd.forwardmove > 0)
		{
			PM_ContinueLegsAnim(BOTH_FLY_FORWARD);
		}
		else if (pm->cmd.forwardmove < 0)
		{
			PM_ContinueLegsAnim(BOTH_FLY_BACKWARDS);
		}
		else
		{
			PM_ContinueLegsAnim(BOTH_FLY_IDLE);
		}
and now.. what do i do now? :P
Help me achieve my goal and receive a free COOKIE!

[edit]
well ensiform coded a console cmd for me.. i tried to compile and got 3 errors
Code:
c:\jkasdk\codemp\game\bg_pmove.c(11187) : error C2143: syntax error : missing ';' before 'type'
c:\jkasdk\codemp\game\bg_pmove.c(11190) : error C2065: 'finalTime' : undeclared identifier
g_active.c
c:\jkasdk\codemp\game\g_active.c(2174) : error C2065: 'PM_FlyMove' : undeclared identifier
i dun get it


...........::::::::THIS IS MY SIG!::::::::........

Problem is.. i dont have a sig..

Last edited by D-style; 08-15-2005 at 06:59 PM. Reason: updates
D-style is offline   you may: quote & reply,
Old 08-15-2005, 09:42 PM   #2
GangsterAngel
Rookie
 
GangsterAngel's Avatar
 
Join Date: May 2004
Posts: 139
c:\jkasdk\codemp\game\bg_pmove.c(11187) : error C2143: syntax error : missing ';' before 'type'

Is saying you have a new line without using a ";" where you should have.

c:\jkasdk\codemp\game\bg_pmove.c(11190) : error C2065: 'finalTime' : undeclared identifier
g_active.c

is saying you have not defined "finalTime"
( int finalTime ) ( Case sensitive )

g_active.c
c:\jkasdk\codemp\game\g_active.c(2174) : error C2065: 'PM_FlyMove' : undeclared identifier

you did not call it "PM_FlyMove" in bg_public.h , you called it "PM_Fly"
or if PM_Fly is a Void , you have not included it in g_active.c
GangsterAngel is offline   you may: quote & reply,
Old 08-16-2005, 11:06 AM   #3
D-style
Rookie
 
D-style's Avatar
 
Join Date: Feb 2005
Posts: 12
Code:
/*
===================
PM_FlyMove

Only with the flight powerup
===================
*/
static void PM_FlyMove( void ) {
	int		i;
	vec3_t	wishvel;
	float	wishspeed;
	vec3_t	wishdir;
	float	scale;

	// normal slowdown
	PM_Friction ();

	scale = PM_CmdScale( &pm->cmd );
	
	if ( pm->ps->pm_type == PM_SPECTATOR && pm->cmd.buttons & BUTTON_ALT_ATTACK) {
		//turbo boost
		scale *= 10;
	}

	//
	// user intentions
	//
	if ( !scale ) {
		wishvel[0] = 0;
		wishvel[1] = 0;
		wishvel[2] = pm->ps->speed * (pm->cmd.upmove/127.0f);
	} else {
		for (i=0 ; i<3 ; i++) {
			wishvel[i] = scale * pml.forward[i]*pm->cmd.forwardmove + scale * pml.right[i]*pm->cmd.rightmove;
		}

		wishvel[2] += scale * pm->cmd.upmove;
	}

	VectorCopy (wishvel, wishdir);
	wishspeed = VectorNormalize(wishdir);

	PM_Accelerate (wishdir, wishspeed, pm_flyaccelerate);

	PM_StepSlideMove( qfalse );
}
heres the PM_FlyMove i want it to include while using my anims..


...........::::::::THIS IS MY SIG!::::::::........

Problem is.. i dont have a sig..
D-style is offline   you may: quote & reply,
Old 08-16-2005, 01:30 PM   #4
GangsterAngel
Rookie
 
GangsterAngel's Avatar
 
Join Date: May 2004
Posts: 139
at the top of G_Active.c
Below:
extern void Jedi_Decloak( gentity_t *self );

add
extern Void PM_FlyMove( void );

if the void is already in g_active.c
dont eaven try that.
if its not in g_active.c , that could be your problem.
GangsterAngel is offline   you may: quote & reply,
Old 08-16-2005, 05:39 PM   #5
D-style
Rookie
 
D-style's Avatar
 
Join Date: Feb 2005
Posts: 12
Quote:
Originally Posted by The errors
c:\jkasdk\codemp\game\bg_pmove.c(3021) : error C2373: 'PM_FlyMove' : redefinition; different type modifiers
c:\jkasdk\codemp\game\bg_public.h(371) : see declaration of 'PM_FlyMove'
c:\jkasdk\codemp\game\bg_pmove.c(10675) : error C2063: 'PM_FlyMove' : not a function
c:\jkasdk\codemp\game\bg_pmove.c(11053) : error C2063: 'PM_FlyMove' : not a function
c:\jkasdk\codemp\game\bg_pmove.c(11187) : error C2143: syntax error : missing ';' before 'type'
c:\jkasdk\codemp\game\bg_pmove.c(11190) : error C2065: 'finalTime' : undeclared identifier
g_active.c
c:\jkasdk\codemp\game\g_active.c(9) : error C2061: syntax error : identifier 'PM_FlyMove'
c:\jkasdk\codemp\game\g_active.c(9) : error C2059: syntax error : ';'
c:\jkasdk\codemp\game\g_active.c(9) : error C2059: syntax error : 'type'
maybe i should get back to try and edit the JP again...

lemme just explain what i wanna do.. Go in spectator mode.. lovely huh? flying around like that? Well i want to make it so you can fly exactly like that with the exception that u can turn it off and go trhough doors and see your own player model lol.. *sighs*


...........::::::::THIS IS MY SIG!::::::::........

Problem is.. i dont have a sig..
D-style is offline   you may: quote & reply,
Old 08-17-2005, 04:25 PM   #6
GangsterAngel
Rookie
 
GangsterAngel's Avatar
 
Join Date: May 2004
Posts: 139
so basicly no clipping lol

/noclip
GangsterAngel is offline   you may: quote & reply,
Old 08-17-2005, 08:31 PM   #7
MDN14
Rookie
 
Join Date: Sep 2003
Posts: 159
I think he means he wants it to work like the noclip. But he doesnt want to be able to fly through solid walls. And he wants it to work when the player types in a command or gets a powerup or something like that. But copying the noclip stuff would probably help, just edit the part that allows you to fly through walls.
MDN14 is offline   you may: quote & reply,
Old 08-17-2005, 09:04 PM   #8
D-style
Rookie
 
D-style's Avatar
 
Join Date: Feb 2005
Posts: 12
yeah tried that was buggy as hell.. (well i didnt try but Ben did a good coder)
very buggy you could go halfway trough walls and floors and stay stuck in there, and also instead of flying like in noclip the camera shaked like when u went in a elevator in jk2 remember?


...........::::::::THIS IS MY SIG!::::::::........

Problem is.. i dont have a sig..
D-style is offline   you may: quote & reply,
Old 08-19-2005, 09:04 PM   #9
MDN14
Rookie
 
Join Date: Sep 2003
Posts: 159
I never had a camera shake problem in JK2. I have had camera problems when in an elevator in JA quite often though.
MDN14 is offline   you may: quote & reply,
Old 08-20-2005, 05:03 AM   #10
Wudan
Got Balance?
 
Wudan's Avatar
 
Join Date: Oct 2002
Location: Salt Lake, UT
Posts: 1,442
Couldn't you just set the player's gravity to zero while they are using the 'jetpack' and call it good? They shouldn't fall to the earth, in that case, could hover, etc.


Mt-Wudan.com
I made a silly little program called Dragon, which is an animation tool for the GLA format, used in Jedi Outcast, Jedi Academy and Krakatoa.
Wudan is offline   you may: quote & reply,
Old 08-20-2005, 06:50 AM   #11
Kurgan
Headhunter
 
Kurgan's Avatar
 
Join Date: Nov 1997
Location: The Dawn of Time
Posts: 18,329
LFN Staff Member 10 year veteran! 
Sort of like the Flight powerup in Quake3? Then again that functioned a lot like the Jetpack come to think of it (except no toggle on/off)...


Download JK2 maps for JA Server|BOOT CAMP!|Strategic Academy|
(JA Server: 108.178.55.189:29070)


"The Concussion Rifle is the weapon of a Jedi Knight Player, an elegant weapon, from a more civilized community." - Kyle Katarn
Kurgan is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > From Jet To Flight

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:22 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.