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 → some assitance if you will?
some assitance if you will?
2004-02-28, 6:07 PM #1
Ok Ill try make this as clear as possible. Can someone PLZ write me a simple user2 message to add to my cog. I want it so that you can throw certain projectiles while in battle with any weapons you have.

So in order to do this I will have a user2 message which I will add on to each weapon.

So to get down to it can someone plz make me a user2 message that when activated it plays an external keyframe on kyle (the keyframe like if you throw a thermal det) then it fires 3 projectiles at slightly different angles(one going straight foward the other 2 going a bit to the side). it wont be neccasary to make it so that if you hold it down for ages it goes further.

If you caould just write in the message and the requierd symbols that would be much appreciated. I WILL give you credit when i relese it. (of course).

Thanks.

------------------
Nightfire Mod
Spoting an error in post will result in a $100 reward.
Offer expires on 6/6/06. Valid one per customer, per day.

Rangi
2004-02-29, 4:14 PM #2
Come on, PLZ [http://forums.massassi.net/html/smile.gif] It cant be to hard. Or is it?

------------------
Nightfire Mod
Spoting an error in post will result in a $100 reward.
Offer expires on 6/6/06. Valid one per customer, per day.

Rangi
2004-03-01, 7:47 AM #3
Ok, how about this - tell us what exactly you want to accomplish. Don't tell us what things you want done in cog, tell us the end result you're after.

Then we might get somewhere.
2004-03-02, 5:53 PM #4
Ok ill lay out the points. O yea and I changed my mind about using the user zero message ill use a new cog instead.

-New cog.

-To replace an item.

-When activated shoots three projectiles.

-also plays the keyframe when kyle throws a thermadet. (To give the look of throwing.)

-Does NOT work like thermal dets in the sense that the longer you hold down the further it goes. It just shoots the projectiles.

-NO pov keyframe is to be played.

-Takes down ammo from the thermadet bin.

-plays a sound when activated (thrown).

thank you.

------------------
Nightfire Mod
Spoting an error in post will result in a $100 reward.
Offer expires on 6/6/06. Valid one per customer, per day.

Rangi
2004-03-03, 2:47 PM #5
Try this. Right now, it takes one thermdet ammo for each projectile thrown (decrements by 3 each time it's activated). Do you want it like that or do you want it to take 1 instead of 3?
Code:
# Jedi Knight Cog Script
#
# item_throwthings.cog
#
# Item Script
#
# Item cog that fires three projectiles forward with a differing fire
#  angle for a spread shot.
#
# [3/3/04] - Darth Slaw
#==============================================================#
symbols

keyframe  povFireAnim=detvpst1.key        local
keyframe  prePOVThrowAnim=detvpre1.key    local

template  projectile=+grenade1            local

sound     throwSound=ThermalThrow01.wav   local
sound     clickSound=ThermClick01.wav     local

thing     player                          local

int       firing=0                        local
int       prethrowtrack=-1                local

flex      fireDelay=0.4                   local
flex      offset=8                        local

vector    vec                             local

message   activated
message   timer

end
#==============================================================#
code
#------------------------------------------------------
activated:
	player = GetSourceRef();
	if(GetInv(player, 4) == 0) Return;
	if(firing == 1) Return;
	firing = 1;
	PlaySoundThing(clickSound, player, 1.0, -1.0, -1.0, 0x80);
	//jkPlayPOVKey(player, prePOVThrowAnim, 1, 0x38);
	prethrowtrack = PlayMode(player, 38);
	SetTimerEx(0.2, 1, 0, 0);

Return;
#------------------------------------------------------
timer:
	if(GetSenderID() == 0)
	{
		// Start waggling after the throw.
		jkSetWaggle(player, '10.0 7.0 0.0', 350);
		firing = 0;
	}
	else if(GetSenderID() == 1)
	{
		StopKey(player, prethrowtrack, 0);
		prethrowtrack = -1;
		SetPOVShake('0.0 -.003 0.0', '0.5 0.0 0.0', .05, 40.0);
		jkPlayPOVKey(player, povFireAnim, 1, 0x38);
		PlaySoundThing(throwSound, player, 1.0, 0.5, 2.5, 0x80);
		FireProjectile(player, projectile, -1, 15, '0.05 0 0', '0 0 0', 1, 0x1, 0.0, 0.0);
		ChangeInv(player, 4, -1.0);
		if(GetInv(player, 4) > 0)
		{
			vec = VectorSet(0, offset, 0);
			FireProjectile(player, projectile, -1, 15, '0.05 0 0', vec, 1, 0x1, 0.0, 0.0);
			ChangeInv(player, 4, -1.0);
		}
		if(GetInv(player, 4) > 0)
		{
			vec = VectorSet(0, -offset, 0);
			FireProjectile(player, projectile, -1, 15, '0.05 0 0', vec, 1, 0x1, 0.0, 0.0);
			ChangeInv(player, 4, -1.0);
		}
		jkSetWaggle(player, '0.0 0.0 0.0', 0);
		if(GetInv(player, 4) < 1 && GetCurWeapon(player) == 4)
		{
			if(GetAutoSwitch() & 1)
			{
				SelectWeapon(player, AutoselectWeapon(player, 1));
			}
			else
			{
				SelectWeapon(player, 1);
			}
		}
		jkSetWaggle(player, '0.0 0.0 0.0', 0);
		//delay before we can fire again
		SetTimerEx(fireDelay, 0, 0, 0);
	}

Return;
#------------------------------------------------------
end


------------------
I am Darth Slaw.
The Dark Lord of the Sith,
And part of the Nightfire mod team
May the mass times acceleration be with you.
2004-03-03, 5:01 PM #6
Thanks alot darth slaw. [http://forums.massassi.net/html/smile.gif]

------------------
Nightfire Mod
Spoting an error in post will result in a $100 reward.
Offer expires on 6/6/06. Valid one per customer, per day.

Rangi
2004-03-05, 10:13 PM #7
Hey one more thing. In mp the other players cant see or get hurt by the projectiles. How do i fix this?

------------------
Nightfire Mod
Spoting an error in post will result in a $100 reward.
Offer expires on 6/6/06. Valid one per customer, per day.

Rangi
2004-03-06, 9:58 AM #8
The projectiles are not synching. There is a way to fix this over at Millenium. (link on news page of Massassi, right below logo) It requires a bit of cogging. Look under 'tutorials'.

------------------
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

-Tazz
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

Tazz
2004-03-06, 11:30 AM #9
It'll be stuff involving triggers and a c/s type of cog setup. I've never gotten that far on a mod yet, but here's the stuff that Tazz was referring to:
http://millennium.meekstreet.com/tutorials/

I guess you want to look at the Using Custom Projectiles in MP games topic.
There's plenty of other neat stuff there, too.

------------------
I am Darth Slaw.
The Dark Lord of the Sith,
And part of the Nightfire mod team
May the mass times acceleration be with you.

↑ Up to the top!