Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Saber blocking - identifying what initiated the block
Saber blocking - identifying what initiated the block
2002-11-14, 9:57 AM #1
I'm wr0king on my saber mod, and I come up with a cool little idea - make the anims normal for blocking a lightsaber, but when blocking bullets, play a swinging animation, so they bat it away like in the movies.

It sounds fine on paper, but I have absolutely no idea how to identify the thing that initiates the block.

See... erum... this is the part where Massassi saves me...
2002-11-15, 7:28 AM #2
Ive never done saber cogs before, so I dont know which message handles the saber block . . . but try Getsourceref() under that message...
And when the moment is right, I'm gonna fly a kite.
2002-11-15, 9:49 AM #3
Tried. -_-

Getsourceref() doesn't work, and getsenderref() is the player.

I don't know what else to do.
2002-11-15, 1:55 PM #4
You can't. Had you gotten a copy of the Datamaster, you would know that the blocked: message doesn't send info on what was blocked. [http://forums.massassi.net/html/tongue.gif] You could however, use damaged: and get exactly what damaged the player, and just fire out a projectile of the same type in a random direction with an appropriate keyframe. Mind you returnEx(0); when you do. Just like Rbots. [http://forums.massassi.net/html/smile.gif]
-Hell Raiser
2002-11-15, 2:17 PM #5
That's kinda what I'm doing for the Magician Saber System. Removing the auto-block and replacing it with a dammaged message (for Saber Locks). But that is the only way to do it, remove the autoblock, check the damage flags, and play the blocking animation, haven't gotten far enough to tell you what to do about reflecting projectiles. [http://forums.massassi.net/html/redface.gif] Sorry

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-11-16, 7:39 AM #6
Just list the projectile templates in kyle.cog, and just GetThingTemplate(GetSourceRef()) inside the damaged: message. Easy as pie. [http://forums.massassi.net/html/smile.gif] Add all the neccessary checks tho so you don't wind up creating a walkplayer if you fall and get hurt. [http://forums.massassi.net/html/redface.gif]

[This message has been edited by Hell Raiser (edited November 16, 2002).]
-Hell Raiser
2002-11-16, 10:15 AM #7
It's a good idea, but it can't be realised in a good looking way, because you would have to start the animation BEFORE the player gets hit. And that is impossible.

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-11-16, 10:18 AM #8
Hmm...you could make the weapon fire two projectiles, an invisible one with a Y-Offset of 1 and the standard projectile, then have the blocked: message only react on the invisible one...but that's probably too much work for that effect...

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-11-17, 1:35 AM #9
Hmmm... how would you make a saber block other sabers, but not projectiles, and how would you make a saber only block on secondary fire?
Cordially,
Lord Tiberius Grismath
1473 for '1337' posts.
2002-11-18, 4:20 AM #10
Would it be conceivable to have a super fast pulse running a firsthinginview() to check for projectiles about to hit the player and then start the reaction prior to the projectile ever hitting the player that way?

It most likely wouldn't work, and if it did it would probably be buggy. But I'm just brainstorming.
2002-11-22, 11:40 PM #11
This might work, but probably not for multiplayer...

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-11-23, 9:48 AM #12
It would work perfectly in MP. A projectile in a players view is a projectile in a players view. :P Only problem might be executing it at the right time, every time.
-Hell Raiser
2002-11-24, 8:45 PM #13
Hell Raiser: So you're saying that even when the bullet harmlessly bounces off of my saber, it still calls damaged:? And I have datamaster, you personally sent it to me over IRC, remember? This was before I got kicked out of #dbztdir by Vash.

You see, that would be really convenient, because blocked: and damaged: are both in Kyle.cog, so I wouldn't have to do a whole lot.

And Zagibu: Why the hell go through all that trouble? Just open the 3do and orient the bullet so the actual center is a little in front of the visible bullet.

[This message has been edited by Checksum (edited November 24, 2002).]
2002-11-25, 2:06 AM #14
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Checksum:
Hell Raiser: So you're saying that even when the bullet harmlessly bounces off of my saber, it still calls damaged:?</font>


No. You disable saber blocking and do it "manually" with damaged:

Quote:
<font face="Verdana, Arial" size="2">
And Zagibu: Why the hell go through all that trouble? Just open the 3do and orient the bullet so the actual center is a little in front of the visible bullet.
</font>


Has anyone actually seen the way JK does the blocking? It's not like JO. The projectile actually hits the player, a super duper fast keyframe is played and the projectile is bounced back. It'd look the same to do it this other way.
-Hell Raiser
2002-11-25, 5:06 AM #15
Hell Raiser is correct, moving the projectile's model back in the 3do file wouldn't really change the way JK reacted.

The fact that its multiplayer shouldn't affect the firstthinginview() method at all really, all the relevant searching and reacting would be done pretty much locally anyway.
2002-11-25, 5:22 PM #16
But, because the bullet turns around when blocked, it would create the effect of covering the gap.

Either way, I came up with a different approach, so there.
2002-11-29, 11:50 AM #17
If you just moved the center forth, the visible bullet would never hit the player, but turn around some feet in front of him...

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-11-30, 6:15 PM #18
Um.. no... it wouldn't...

When it turned around, it rotated on its center, making the bullet appear to come from the player.

Still, no matter what it does, it will never look like it's just turning around in front of him.
2002-11-30, 11:54 PM #19
Yes, you are right...it would appear BEHIND the player...

------------------
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2002-12-14, 7:46 PM #20
Ok, update on this whole thing: I found out that touched: is called if you block a bullet, so I just ran a check for the 0x2000 flag in touched: and used it to identify it, got it working perfectly.

Thanks to everyone for their help.

↑ Up to the top!