lfnetwork.com mark read register faq members calendar

Thread: How do you make the saber do damage
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 07-16-2005, 04:35 PM   #1
Lord Markaine
 
Lord Markaine's Avatar
 
Join Date: Apr 2002
Posts: 17
How do you make the saber do damage

I'm working on finishing moves, probably in a nasty way.
I'll be setting up most of the stuff in "g.cmds.c?" forgot the spelling... Just like the old emotes coding.

I'll have checks for player health <= 2 but not 0.
if the other player's health is 2 or less and their saber gets knocked away, dropped, or whatever, they'll go into the propper animation.

That animation will be one of the death animations thats looks kinda like Dooku kneeling in front of Anakin in Ep3. I'm going to cut some frames out of it so they don't fall.

Now, my problem... I'm going to setup an emote/newbutton to deal the final blow. I can do that easily, but I need the saber to do damage only if it touches the victim. You know, that saber Idle damage isn't going to cut it... My first pun...

If I get that working, then I'll look into decapitations and such.
Lord Markaine is offline   you may: quote & reply,
Old 07-16-2005, 10:03 PM   #2
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
Ok, all the saber damage is calculated in SaberCheckDamage (near the top of the function). What you're going to have to do is add a special case where the saber only does that special damage when the other player is in that animation. The normal code does something similar to this with the saber-attacking-someone-on-the-ground animations.


---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 07-22-2005, 02:03 PM   #3
Lord Markaine
 
Lord Markaine's Avatar
 
Join Date: Apr 2002
Posts: 17
OK, having problems with health checks. I don't know where to start.

What I'm doing is trying to make someone do a certain animation when their health falls below 5.

I don't know if its posible to make the game constantly check for this though.

for example,

if (self->health <= 5)
{
self->client->ps.forceHandExtend = HANDEXTEND_DEFEATED;
}

Is there more to it than just this, or could I just put it somewhere?
Lord Markaine is offline   you may: quote & reply,
Old 07-22-2005, 04:59 PM   #4
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
uh, I'm not sure. I've never tried to do something like that before. I'd give your method a shot.

Maybe also try adding it to somewhere in clientthink_real.


---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 07-28-2005, 11:13 PM   #5
Lord Markaine
 
Lord Markaine's Avatar
 
Join Date: Apr 2002
Posts: 17
Yeah, you were right Razor. I added some code to clientthink_real about:

"I'll have checks for player health <= 2 but not 0.
if the other player's health is 2 or less and their saber gets knocked away, dropped, or whatever, they'll go into the propper animation."

It works, but as for the checks to get my saber to do my newmove = LS_FATALITY stuff, it didn't work. I used stabdown and the saber pull swing code as an example. no luck. So I just replaced the forward kick with it to see if the animation work. And It did, so I'll get back to the push/pull for a while.

Thanks, I had no idea where to start.
Hmm, clientthink_real...
If that staggering animation comes out,(unless it already is) and your fatigue code...
Lord Markaine is offline   you may: quote & reply,
Old 07-29-2005, 12:34 PM   #6
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
The fatigue code and all the other OJP code is availible from the OJP CVS Repository. There's a tutorial on how to access it on the OJP forums.

As for your problem, I imagine it needs to be handled in the BG code just like all the other moves.


---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 > How do you make the saber do damage

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 03:35 PM.

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