lfnetwork.com mark read register faq members calendar

Thread: New Saber throw Mechanic WIP/Help/Brainstorm
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 01-01-2004, 07:20 AM   #1
keshire
Veteran
 
keshire's Avatar
 
Join Date: Nov 2003
Location: St. Charles, Mo
Posts: 959
Post New Saber throw Mechanic WIP/Help/Brainstorm

The current saber throw mechanics are not representative of the Star Wars Universe. Currently its little more than a yo-yo.

I'd like to make saber throw a single use power.
You throw it and its gone. (until you force pull it back)
I'd also like it to change owners to whoever used forcepull on it.

I'd like to give semi-realistic physics.
Wall sticking. (being worked on)
Player sticking. (Instant death lock win, or stab down when knocked down death)

I'm open to any/all suggestions.

Also I'd like to redo the current throw and make it similar to the way the thermal det is handled. Charge up the throw to determine the distance. Your force level sets the arc, and speed of the spin.


Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
-Keshire of the Bleak Cabal.
keshire is offline   you may: quote & reply,
Old 01-01-2004, 07:26 AM   #2
keshire
Veteran
 
keshire's Avatar
 
Join Date: Nov 2003
Location: St. Charles, Mo
Posts: 959
This is my brainstorm right now. Most is similar to the way the Thermal det is handled.

in WP_SaberPositionUpdate


if (self->client->ps.saberInFlight) //keshire
{ //do the thrown-saber stuff
gentity_t *saberent = &g_entities[saberNum];

if (saberent)
{

if (!self->client->ps.saberEntityState && self->client->ps.saberEntityNum)
{

vec3_t startorg, startang, dir;

float chargeAmount = 1.0f; // default of full charge

??VectorCopy( forward, dir ); //from thermal code
??VectorCopy( muzzle, start ); //from thermal code

AngleVectors(self->client->ps.viewangles, dir, NULL, NULL);

VectorCopy(boltOrigin, startorg);
VectorCopy(boltAngles, startang);

saberent->s.saberInFlight = qtrue;

WP_SaberAddG2Model( saberent, self->client->saber[0].model, self->client->saber[0].skin );
saberent->s.modelGhoul2 = 127;
self->client->ps.saberEntityState = 1;


saberent->physicsObject = qtrue; //Should I leave this in?

??bolt->classname = "thermal_detonator"; //from thermal

saberent->nextthink = level.time + FRAMETIME;
saberent->think = saberFirstThrown;
saberent->touch = thrownSaberTouch; //maybe NULL?

VectorSet( saberent->r.mins, SABERMINS_X, SABERMINS_Y, SABERMINS_Z );
VectorSet( saberent->r.maxs, SABERMAXS_X, SABERMAXS_Y, SABERMAXS_Z );

??bolt->clipmask = MASK_SHOT; //from thermal

W_TraceSetStart( saberent, startorg, saberent->r.mins, saberent->r.maxs );//make sure our start point isn't on the other side of a wall

if ( saberent->client )
{
chargeAmount = level.time - saberent->client->ps.weaponChargeTime;
}

chargeAmount = chargeAmount / (float)TD_VELOCITY;

if ( chargeAmount > 1.0f )
{
chargeAmount = 1.0f;
}
else if ( chargeAmount < TD_MIN_CHARGE )
{
chargeAmount = TD_MIN_CHARGE;
}

saberent->genericValue5 = 0;

saberent->s.pos.trType = TR_GRAVITY; //set its arc and modify it based on force level

saberent->parent = self;

??bolt->r.ownerNum = ent->s.number;

VectorScale( dir, TD_VELOCITY * chargeAmount, saberent->s.pos.trDelta );

if ( saberent->health >= 0 )
{
saberent->s.pos.trDelta[2] += 120;
}

if ( self->client->saber[0].spinSound )
{
saberent->s.loopSound = self->client->saber[0].spinSound;
}
else
{
saberent->s.loopSound = saberSpinSound;
}
saberent->s.loopIsSoundset = qfalse;

saberent->damage = SABER_THROWN_HIT_DAMAGE;

saberent->s.eType = ET_GENERAL;
saberent->s.eFlags = 0;
saberent->r.svFlags &= ~(SVF_NOCLIENT);
saberent->s.weapon = WP_SABER;

saberent->methodOfDeath = MOD_SABER;
saberent->splashMethodOfDeath = MOD_SABER;
saberent->s.solid = 2;
saberent->r.contents = CONTENTS_LIGHTSABER;

saberent->s.pos.trTime = level.time;

VectorCopy(startorg, saberent->s.pos.trBase);
VectorCopy(startang, saberent->s.apos.trBase);

VectorCopy(boltOrigin, saberent->r.currentOrigin); //copies current to bolt

??VectorCopy( start, bolt->pos2 );

??bolt->bounceCount = -5;


Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
-Keshire of the Bleak Cabal.
keshire is offline   you may: quote & reply,
Old 01-02-2004, 11:19 AM   #3
keshire
Veteran
 
keshire's Avatar
 
Join Date: Nov 2003
Location: St. Charles, Mo
Posts: 959
I don't think making it charge is going to work well. So I just put a standard distance on it. I'll change this based on force level.


Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
-Keshire of the Bleak Cabal.
keshire is offline   you may: quote & reply,
Old 01-03-2004, 01:32 AM   #4
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
Why don't you think charging will work?

And what are the "??" suppose to represent in your code? That you don't know what those lines do? I think I can help you with that.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 01-03-2004, 03:49 AM   #5
keshire
Veteran
 
keshire's Avatar
 
Join Date: Nov 2003
Location: St. Charles, Mo
Posts: 959
Well I put in all the charging code and it seems to be throwing it even though the button is pressed down. Despite changes to the spot where it determines charging and weaponstate. It was pissing me off too.


Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
-Keshire of the Bleak Cabal.
keshire is offline   you may: quote & reply,
Old 01-03-2004, 03:59 AM   #6
keshire
Veteran
 
keshire's Avatar
 
Join Date: Nov 2003
Location: St. Charles, Mo
Posts: 959
And yes the question marked statements were originally fromt he thermal code.

Is it just me or is it just me and you who browse this forum?


Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
-Keshire of the Bleak Cabal.
keshire is offline   you may: quote & reply,
Old 01-03-2004, 04:19 AM   #7
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
I know that Wudan and some n00bs also browse this forum.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 01-06-2004, 09:44 AM   #8
keshire
Veteran
 
keshire's Avatar
 
Join Date: Nov 2003
Location: St. Charles, Mo
Posts: 959
Ok now for a hard question.

How to go about the saber damage re-working?

From what I can tell

saberCheckRadiusDamage has a similar function to CheckSaberDamage

then

CheckThrownSaberDamaged has a similar function to SaberRadiusDamage

The main difference (from what I can tell) is the regular damage checks have the saber divided into saber and blade.

as so
void saberCheckRadiusDamage(gentity_t *saberent, int returning)
a check for returning
determining what distance to use.

and

qboolean CheckThrownSaberDamaged(gentity_t *saberent, gentity_t *saberOwner, gentity_t *ent, int dist, int returning, qboolean noDCheck)

The actual damage function where if damage isn't done it reverts back to the touch function.


Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
-Keshire of the Bleak Cabal.
keshire is offline   you may: quote & reply,
Old 01-30-2004, 09:28 PM   #9
Azymn
 
Azymn's Avatar
 
Join Date: Jul 2002
Location: ~(40.14, -111.40)
Posts: 544
You get it all workin?

I had some similar ideas as far as implementing saber throw went...
Azymn is offline   you may: quote & reply,
Old 01-31-2004, 05:47 AM   #10
keshire
Veteran
 
keshire's Avatar
 
Join Date: Nov 2003
Location: St. Charles, Mo
Posts: 959
Everything but the collision and damage re-do is done. RazorAce and RenegadeOfPhunk have the code. Hopefully RazorAce can work in the saber throw into his new collison detection code.


Apathy Cannot Inspire.
Ambivalence cannot lead.
Loved me. Feared me.
Changed me. Killed me.
Anything would be something.
But nothing is worst of all.
-Keshire of the Bleak Cabal.
keshire is offline   you may: quote & reply,
Old 02-01-2004, 09:21 AM   #11
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
I'm still working on the saber system mechanics but I made excellent progress today after taking a short break from coding.

I hope your progress hasn't been held up by me.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace 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 > New Saber throw Mechanic WIP/Help/Brainstorm

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:51 PM.

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