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 → Attaching a projectile to the player.......
Attaching a projectile to the player.......
2002-12-02, 2:49 PM #1
I'd like to create the effect of someone getting the snot smacked out of them by increasing the player's velocity, attaching a projectile to that player, and once that projectile hits the victim, it sends them hurling. However, my projectile doesn't want to explode when attached. Here's the template:

Code:
+meleehit			none		type=explosion timer=0.001 soundclass=exp_punch.snd typeflags=0x0
+flykick			none		type=weapon model3d=dflt.3do orient=(0/0/0) size=0.1 movesize=0.1 thingflags=0x400 damageclass=0x1 typeflags=0xd collide=1 move=physics explode=+meleehit fleshhit=+meleehit damage=20 cog=melee_flykick.cog


and the cog made after all else failed:

Code:
# Jedi Knight Cog Script
#
# melee_flykick.cog
#
# Yes, I type that in every cog, wuahaha
#
# Created by: Hell Raiser [Jon Harmon]

symbols

message		created
message		pulse
message		removed

end

code

created:

	//SetThingPulse(GetSenderRef(), 0.01);
	AttachThingToThingEx(GetSenderRef(), GetThingParent(GetSenderRef()), 0x4);

return;

pulse:

	//SetThingLook(
	SetThingVel(GetSenderRef(), VectorScale(GetThingVel(GetThingParent(GetSenderRef())),1));
	//TeleportThing(GetSenderRef(), GetThingParent(GetSenderRef()));

return;

removed:

	Print("Owie!");

return;

end


I've tried lots of different things, this is the best that I could come up with, but it's got it's flaws. =\

Heck, I'm not even so sure what the cog does it's been so long since I've messed with it. I'd like to forgo the use of any cog if at all possible. It's all in the template, cuz it worked perfectly the way I wanted to (staying in it's position relative to the player) but it just wouldn't explode.

[This message has been edited by Hell Raiser (edited December 02, 2002).]
-Hell Raiser
2002-12-03, 9:08 AM #2
HR, if it's a punch that sends the person it hits flying and only him, here's the template, I've already done it before.
Code:
+fisthit         _explosion       sprite=fist.spr soundclass=exp_conc.snd light=20.000000 thingflags=0x1 timer=0.100000 typeflags=0x53 blasttime=0.051000 force=3000.000000 range=1.000000 
+fisthit2        +fisthit         range=0.000000 force=0.000000 light=10.000000
+fisthit3        +lgflash         soundclass=exp_punch.snd
+fisthit4        +fisthit3        soundclass=exp_conc.snd
+punch           _weapon          explode=+fisthit4 fleshhit=+fisthit3 thingflags=0x20000001 mass=10.000000 size=0.005000 movesize=0.005000 vel=(0.000000/15.000000/0.000000) damage=50.000000 mindamage=10.000000 typeflags=0x440d rate=20.000000 timer=0.0015 
+bigpunch        +punch           explode=+fisthit2 fleshhit=+fisthit mass=50.000000 


It's saber blockeable and it sends people flying, have at 'er.

It doesn't require any of that 'attach a projectile to the victim' crap either.

Tested and proven over multiplayer.
2002-12-03, 11:17 AM #3
Use the same flags that the rail charge uses and give it alot of mass and velocity but not too much.
I am _ Ace_1 _ , and I approve this message.
2002-12-03, 12:35 PM #4
Nonononono NO! [http://forums.massassi.net/html/tongue.gif] None of that is what I'm talking about.

Player A starts flying at a velocity of 5 jku's per second.

Player B is dumbfounded and just floating around.

Player A is 15 jku's away from Player B

When Player A is 10 jku's away from Player B, he initiates the send-player B-flying attack.

The projectile that is used needs to stay with Player A along his lookvector for however long I want it to, so that when Player A gets to Player B, the projectile hits Player B.

My problems with this is that a projectile with a Vel of 0/0/0 doesn't explode (unless I'm doing something wrong), and setting it's velocity proportionate to Player A's velocity so that it does explode isn't quite that effective.

I don't wanna know how to make a projectile send a player flying. [http://forums.massassi.net/html/tongue.gif] I already have a method thats far superior to a projectile's force setting. [http://forums.massassi.net/html/wink.gif]

Maybe this explains it a bit better?
-Hell Raiser
2002-12-03, 9:51 PM #5
Well HR, I don't quite understand.

Maybe you need a copy of The Datamaster. [http://forums.massassi.net/html/biggrin.gif]

Anyway, if it involves any sort of push based on the player's current speed, I'd do it through cog.

Cog pushing is quite reliable.

[This message has been edited by Checksum (edited December 04, 2002).]
2002-12-04, 7:07 PM #6
Why do I even bother? I just figured it out:

I just repeatedly fire my projectile that knocks the heck out of someone, however in it's template, the explode= setting isn't the same as the fleshhit= setting. Explode= will point to a dummy template with a cog that tells me that I didn't hit a player. Fleshhit= will be my whollop template with a cog that tells me that I did hit a player and that I'm done with the super-duper-whollop-attack.

Geeze guys, try thinking outside the box for once. [http://forums.massassi.net/html/tongue.gif]

------------------
-Hell Raiser
Without struggles there is no progress
DBZ: The Destruction is Real
-Hell Raiser
2002-12-04, 7:17 PM #7
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Hell Raiser:
try thinking outside the box for once. [http://forums.massassi.net/html/tongue.gif]
</font>


Heh, no problem. [http://forums.massassi.net/html/smile.gif]


Good thinking HR.
And when the moment is right, I'm gonna fly a kite.

↑ Up to the top!