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 → Client Weapons Cog
Client Weapons Cog
2002-05-25, 4:28 AM #1
I've got some weapon templates I want to test over multi, so I rigged up the client cog, listed it in the items.dat with 0x020 flags and a minimum bin of 1, and launched. It didn't work. I've checked all the cogs over with Parsec, they're bug-free. I set the client cog to print out a message once trigger: is called, and I don't get the text, so I think it's something in the items.dat.

Here's the items.dat line:
Code:
mpweaps 		185 	1 	1 	0x020 	cog=00_mpweaps.cog


here's the client cog:
Code:
flags=0x240

symbols

template     9mmpistol=+9mmpistol               local                         
template     45pistol=+45pistol                 local                         
template     44magnum=+44magnum                 local                         
template     9x18mm=+9x18mm                     local                         
template     12gaugeslug=+12gaugeslug           local                         
template     9mmsmg=+9mmsmg                     local                         
template     45smg=+45smg                       local                         
template     545mm=+545mm                       local                         
template     762x51mm=+762x51mm                 local                         
template     556mm=+556                         local                         
template     50cal=+50cal                       local                         
template     762x54mm=+762x54mm                 local                         
template     40grenade=+40grenade               local                         
template     30grenade=+30grenade               local                         

int          vector1                            local                         
int          vector2                            local                         

int          player                             local                         

int          weaponref                          local                         

vector       vectornorm                         local                         

message      trigger                                                          

end                                                                           

# ========================================================================================

code

trigger:

	Print("This is to prove that the stupid weapons cog works.");
	//Grab the variables
	player = GetParam(0);
	vector1 = GetParam(1);
	vector2 = GetParam(2);
	vectornorm = VectorSet(vector1, vector2, 0);
	weaponref = GetSourceRef();

	//Find out what we shootin', and shoot it!
	if(weaponref == 502) //If Glock
	{
		FireProjectile(player, 9mmpistol, -1, -1, '0.0135 0.1624 0.0', vectornorm, 1.0, 0x20, 0, 0);
	}
	else if(weaponref == 503) //If mk. 23
	{
		FireProjectile(player, 45pistol, -1, -1, '0.0135 0.1624 0.0', vectornorm, 1.0, 0x20, 0, 0);
	}
	else if(weaponref == 512) //If MP5
	{
		FireProjectile(player, 9mmsmg, -1, -1, '0.0135 0.1624 0.0', vectornorm, 1.0, 0x20, 0, 0);
	}
	else if(weaponref == 521) //If M16A2
	{
		FireProjectile(player, 556mm, -1, -1, '0.0135 0.1624 0.0', vectornorm, 1.0, 0x20, 0, 0);
	}
	else if(weaponref == 540) //If M203
	{
		FireProjectile(player, 40grenade, -1, -1, '0.0135 0.1624 0.0', vectornorm, 1.0, 0x20, 0, 0);
	}
	else if(weaponref == 541)
	{
		FireProjectile(player, 30grenade, -1, -1, '0.0135 0.1624 0.0', vectornorm, 1.0, 0x20, 0, 0);
	}


	Return;

# ........................................................................................

end


I've changed a couple other things, like weapon cog names, fire rates, etc., but that stuff shouldn't have any effect on this, should it? Please Help! Thanks.

------------------
Christianity: Don't knock it if you haven't tried it.

Why should the devil have all the good music? www.thousandfootkrutch.com
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-05-26, 7:06 AM #2
Um, anybody out there?
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-05-26, 7:20 AM #3
Beats the heck outa me. [http://forums.massassi.net/html/frown.gif]

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-26, 2:54 PM #4
Holy crap! I've confused a true master of cog? I'm trying to decide whether to feel triumphant or suicidal.

So far I've modified the 2,3, and 5 weapon cogs, and added some templates. I've also added four hotkeys, two of which send messages to the weapon cogs. Is it possible that any of this could be interfering?
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-05-26, 3:11 PM #5
Possibly. You shouldnt discount anything at this point. [http://forums.massassi.net/html/frown.gif]

------------------
I used to believe that we only want what we can't have. I was wrong. The truth is, the wonderful truth is, we only want what we think we can't have.

JK editing resources.
And when the moment is right, I'm gonna fly a kite.
2002-05-26, 3:26 PM #6
You could post the weapon cogs that sends the trigger and the entire items.dat for further analysis, if you can.

------------------
http://millennium.massassi.net - Millennium
JK Mods : Sniper Arena! - Enhancement Pack!
2002-05-26, 6:31 PM #7
Well gosh, this kinda stinks.

At the risk of having all my evil plans to keep my evil project an evil secret, here goes...

Items.dat:
Code:
# Item definition file for Jedi Knight
# ========================================================================================
# name 			id  	min 	max     flags   args
# ========================================================================================

###########
# Weapons #
###########

# ========================================================================================
none                    0 	0       0       0x004
fists                   1 	0       1       0x024   cog=weap_fists.cog
bryar_pistol            2 	0       1       0x0a4   cog=weap_m16.cog
stormtrooper_rifle      3 	0       1       0x0a4   cog=weap_usas12.cog
thermal_detonator       4 	0       30      0x0a4   cog=weap_thermdet.cog
tusken_prod             5 	0       1       0x0a4   cog=weap_mp5.cog
repeater                6 	0       1       0x0a4   cog=weap_repeater.cog
rail_detonator          7 	0       1       0x0a4   cog=weap_raildet.cog
sequencer_charge        8 	0       30      0x0a4   cog=weap_seqcharge.cog
concussion_rifle        9 	0       1       0x0a4   cog=weap_concrifle.cog
lightsaber              10 	0       1       0x0a4   cog=weap_saber.cog
# ========================================================================================
#berettam9 			151 	0 	1 	0x0a4 	cog=weap_berettam9.cog
#glock17 			152 	0 	1 	0x0a4 	cog=weap_glock17.cog
#hkmk23 			153 	0 	1 	0x0a4 	cog=weap_hkmk23.cog
#deserteagle 		154 	0 	1 	0x0a4 	cog=weap_deserteagle.cog
#makarovpm 			155 	0 	1 	0x0a4 	cog=weap_makarovpm.cog
#m1014 			156 	0 	1 	0x0a4 	cog=weap_m1014.cog
#ithacam37 			157 	0 	1 	0x0a4 	cog=weap_ithacam37.cog
#mossberg590 		158 	0 	1 	0x0a4 	cog=weap_mossberg590.cog
#870sp 			159 	0 	1 	0x0a4 	cog=weap_870sp.cog
#usas12 			160 	0 	1 	0x0a4 	cog=weap_usas12.cog
#win1300 			161 	0 	1 	0x0a4 	cog=weap_win1300.cog
#hkmp5a3 			162 	0 	1 	0x0a4 	cog=weap_hkmp5a3.cog
#hkmp5sd5 			163 	0 	1 	0x0a4 	cog=weap_hkmp5sd5.cog
#hkmp5k 			164 	0 	1 	0x0a4 	cog=weap_hkmp5k.cog
#hkump 			165 	0 	1 	0x0a4 	cog=weap_hkump.cog
#ingrammac10 		166 	0 	1 	0x0a4 	cog=weap_ingrammac10.cog
#skorpion82 			167 	0 	1 	0x0a4 	cog=weap_skorpion82.cog
#steyrtmp 			168 	0 	1 	0x0a4 	cog=weap_steyrtmp.cog
#ak74 				169 	0 	1 	0x0a4 	cog=weap_ak74.cog
#fnfal 			170 	0 	1 	0x0a4 	cog=weap_fnfal.cog
#m16a2 			171 	0 	1 	0x0a4 	cog=weap_m16a2.cog
#m4a1 				172 	0 	1 	0x0a4 	cog=weap_m4a1.cog
#g3a3 				173 	0 	1 	0x0a4 	cog=weap_g3a3.cog
#m249 				174 	0 	1 	0x0a4 	cog=weap_m249.cog
#rpk74 			175 	0 	1 	0x0a4 	cog=weap_rpk74.cog
#barretm82 			176 	0 	1 	0x0a4 	cog=weap_barretm82.cog
#druganovsvd 		177 	0 	1 	0x0a4 	cog=weap_druganovsvd.vog
#m24 				178 	0 	1 	0x0a4 	cog=weap_m24.cog
#mauser 			179 	0 	1 	0x0a4 	cog=weap_mauser.cog

# ammo bins #
545x39 			186 	0 	??? 	0x080
556x45 			187 	0 	??? 	0x080
762x51 			188 	0 	??? 	0x080
762z54 			189 	0 	??? 	0x080
9x18 			190 	0 	??? 	0x080
9x19 			191 	0 	??? 	0x080
44mag 			192 	0 	??? 	0x080
45auto 			193 	0 	??? 	0x080
50bmg 			194 	0 	??? 	0x080
12gashot 		195 	0 	??? 	0x080
12gaslug 		196 	0 	??? 	0x080
40grenade 		197 	0 	??? 	0x080

# dummy and mag ammo bins #
#dummy 			11 	0 	200 	0x000
# ========================================================================================

###################
# Ammo and Energy #
###################

# ========================================================================================
#energy is used for bryar pistol and stormtrooper rifle.
energy                  11              0       500     0x080

#power is used for the the bowcaster, repeater and concussion rifle.
power                   12              0       500     0x080

#battery is used for other inventory items.
battery                 13              0       200     0x020

#force is used for the force powers.
forcemana               14              0       400     0x000

#rail charges
railcharges             15              0       30      0x080
# ========================================================================================


###########
# Bonuses #
###########

#new force stars gained in a level.
new_stars               16 	0       32      0x000

#spendable stars
spend_stars             17 	0       32      0x000

#the choice
choice                  18 	0       2      0x000

#############################
# Damage multiplier powerup #
#############################

# ========================================================================================
# Bin 19 is reserved !!!
# Damage multiplier powerup should come before force powers...
# ========================================================================================


##############
#Force Powers#
##############

# Note that the icon names are taken from these names:
# ========================================================================================
# Attributes
jedi_rank               20 	0       8.0     0x000
# ........................................................................................

# Basic Powers
f_jump                  21 	0       4.0     0x000
f_speed                 22 	0       4.0     0x000
f_seeing                23 	0       4.0     0x000
f_pull                  24 	0       4.0     0x000
# ........................................................................................

# Light Side Powers
f_healing               25 	0       4.0     0x000
f_persuasion            26 	0       4.0     0x000
f_blinding              27 	0       4.0     0x000
f_absorb                28 	0       4.0     0x000
# ........................................................................................

# Light Side Bonus Powers
f_protection            29 	0       4.0     0x000
# ........................................................................................

# Dark Side Powers
f_throw                 30 	0       4.0     0x000
f_grip                  31 	0       4.0     0x000
f_lightning             32 	0       4.0     0x000
f_destruction           33 	0       4.0     0x000
# ........................................................................................

# Dark Side Bonus Powers
f_deadlysight           34 	0       4.0     0x000
# ========================================================================================

#################
#Inventory Items#
#################

# Note that the icon names are taken from these names:
# ========================================================================================
bactatank               40 	0       5       0x102   cog=item_bacta.cog
irgoggles               41 	0       1       0x102   cog=item_irgoggles.cog
fieldlight              42 	1       1       0x122   cog=item_fieldlight.cog
keyimperial             43 	0       1       0x042   cog=item_keyimperial.cog
wrench                  44 	0       1       0x042   cog=item_wrench.cog
datadisk                45 	0       1       0x042   cog=item_datadisk.cog
keyred                  46 	0       1       0x042   cog=item_keyred.cog
keyblue                 47 	0       1       0x042   cog=item_keyblue.cog
keyyellow               48 	0       1       0x042   cog=item_keyyellow.cog
wrchblue                49 	0       1       0x042   cog=item_wrenchblue.cog
wrchyellow              50 	0       1       0x042   cog=item_wrenchyellow.cog
keygreen                51 	0       1       0x042   cog=item_keygreen.cog
# ========================================================================================


#####################
# Player Statistics #
#####################

# ========================================================================================
shields                 60 	0       200.0   0x030   cog=item_shields.cog
force_armor             61 	0       200.0   0x000
supershields            62 	0         1.0   0x010   #cog=item_supershields.cog
powerboost              63 	1.0       2.0   0x000
s_dark                  64 	0         1.0   0x000
s_light                 65 	0         1.0   0x000
revive                  66 	0         1.0   0x000
# ========================================================================================

###########
# Scoring #
###########

# ========================================================================================
secrets                 70 	0       20      0x000
maxsecrets              71 	0       20      0x000

# morality

peds_killed             72 	0       1000    0x000
peds_total              73 	0       1000    0x000
force_morality          74 	-40     40      0x000
alignment               75 	-100    100     0x000

# ========================================================================================


#####################
# Multiplayer Modes #
#####################

# ========================================================================================
teamcolor               80 	0       2       0x040
redflag                 81 	0       1       0x048
goldflag                82 	0       1       0x048
redkey                  83 	0       1       0x042    cog=ctf_itemkeyred.cog
goldkey                 84 	0       1       0x042    cog=ctf_itemkeygold.cog

# ========================================================================================


###########
# Hotkeys #
###########

music 			116 	1 	1 	0x120 	cog=00_music.cog
reload 			117 	1 	1 	0x120 	cog=00_reload.cog
dropweapon 		118 	1 	1 	0x120 	cog=00_dropmenu.cog
rate 			119 	1 	1 	0x120 	cog=00_rate.cog


################
# Status Stuff #
################

#startup 		180 	1 	1 	0x000 	cog=00_startup.cog
bloodstatus 		182 	0 	1 	0x000
gorestatus 		183 	0 	1 	0x000
reloadstatus 		184 	0 	1 	0x000
mpweaps 		185 	1 	1 	0x020 	cog=00_mpweaps.cog

############################
# Goals & Level Completion #
############################

# ========================================================================================
# Bins 99 - 115 are RESERVED
# ========================================================================================
# They will store the number of the first goal description text in cogStrings.uni, and the
# display status of up to 16 goals (0 to 15).
# ========================================================================================

stringOffset            99              0       99999   0x000

goal00                  100             0       1000    0x040
goal01                  101             0       1000    0x040
goal02                  102             0       1000    0x040
goal03                  103             0       1000    0x040
goal04                  104             0       1000    0x040
goal05                  105             0       1000    0x040
goal06                  106             0       1000    0x040
goal07                  107             0       1000    0x040
goal08                  108             0       1000    0x040
goal09                  109             0       1000    0x040
goal10                  110             0       1000    0x040
goal11                  111             0       1000    0x040
goal12                  112             0       1000    0x040
goal13                  113             0       1000    0x040
goal14                  114             0       1000    0x040
goal15                  115             0       1000    0x040

hotkeyOffset            150             0       99999   0x000


# =============== #
# MAX Bins =  199 #
# =============== #

end


Here's the more workable cog I have right now, currently replacing the Bryar...

Code:
# Jedi Knight Cog Script
#
# WEAP_BRYAR.COG
#
# WEAPON x Script - M16A2
#
# M16A2 fires 5.56mm x 45mm rounds. It is roughly a meter long, and is one
# of the most powerful weapons available in Force One.
# 
#
# - Affected by MagSealed sectors/surfaces.
#
# [YB & CYW]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved


symbols

model       povModel=bryv.3do                   local
model       weaponMesh=bryg.3do                 local

keyframe    mountAnim=bryvmnt.key               local
keyframe    dismountAnim=bryvdis.key            local
keyframe    povfireAnim=bryvpst1.key            local
keyframe    holsterAnim=kyhlstr.key             local

sound       outSound=pistout1.wav               local
sound       mountSound=df_bry_ready.wav         local
sound       dismountSound=PutWeaponAway01.wav   local
sound       fireSound=556.wav                   local

template    projectile=+556mm                   local
template    grenade=+40grenade                  local

thing       player                              local
thing       victim                              local
thing       potential                           local

flex        dot                                 local
flex        maxDot                              local

flex        fireWait=0.075                      local
flex        holsterWait                         local
flex        fireDelay=0.6                       local
flex        autoAimFOV=20                       local
flex        autoAimMaxDist=0.25                 local

int         weaponIndex                         local
int         trackID=-1                          local
int         dummy=0                             local
int         mode                                local
int         firemode=0                          local
int         holsterTrack                        local
int         firestatus=0                        local

int         accuracy=6                          local
int         accuracy1=6                         local
int         controlskill                        local
int         magnum=30                           local #This needs to be the amount of rounds the mag can hold.
int         roundcount=0                        local #Roundcount is for reloading purposes. Not implemented.
int         roundnum=0                          local #Roundnum is for muzzleclimb.
int         reloadstatus=0                      local #Reloadstatus is for relaoding purposes. Not implemented yet.
int         vectornum0                          local
int         vectornum1                          local
int         sendvector0                         local
int         sendvector1                         local

message     startup
message     activated
message     deactivated
message     selected
message     deselected
message     autoselect
message     timer
message     single_fire
message     burst_fire
message     grenade
message     user0
message     user1

end

# ========================================================================================

code

startup:

	accuracy = 7;
	accuracy1 = 6;
	Return;

# ........................................................................................

activated:
	player = GetSourceRef();
	mode = GetSenderRef();

	jkSetWaggle(player, '0.0 0.0 0.0', 0);

	if(firestatus != 0) Return;
	if(reloadstatus == 1) Return;

	if(GetThingHealth(player) <= 0)
	{
		Return;
	}

	if(GetInv(player, 11) < 1.0)
	{
		PlaySoundThing(outSound, player, 1.0, -1.0, -1.0, 0x80);
		if(GetAutoSwitch() & 1)
			SelectWeapon(player, AutoSelectWeapon(player, 1));
		Return;
	}

	if(IsThingMoving(player))   //Is the player moving...
	{
		accuracy = accuracy + 2;
		accuracy1 = accuracy1 - 2;
	}

	if(IsThingCrouching(player))   //Is the player crouching...
	{
		accuracy = accuracy - 2;
		accuracy1 = accuracy1 + 2;
	}

	controlskill = 2;   //Get the control skill...(This will be a GetInv or sumpin later...)
	vectornum0 = accuracy - controlskill;   //Factor everything in...
	vectornum1 = accuracy - controlskill;
	if(rand() < 0.5)
	{
		vectornum0 = (-(vectornum0));
	}
	if(rand() < 0.5)
	{
		vectornum1 = (-(vectornum1));
	}

	if(mode == 0)
	{
		if(firemode == 0)
		{
			Return;
		}
		else if(firemode == 1)
		{
			call single_fire;
			Return;
		}
		else if(firemode == 2)
		{
			call burst_fire;
			Return;
		}
	}
	else if(mode == 1) call grenade;

	Return;

# ........................................................................................

deactivated:
	player = GetSourceRef();
	mode = GetSenderRef();
	jkSetWaggle(player, '10.0 7.0 0.0', 350);
	KillTimerEx(1);
	SetTimerEx(0.1, 1, 0.0, 0.0);

	Return;

# ........................................................................................

selected:
	player = GetSourceRef();

	// Setup the meshes and models.
	jkSetPOVModel(player, povModel);
	jkSetWeaponMesh(player, weaponMesh);
	SetArmedMode(player, 1);

	// Play mounting sound.
	PlayMode(player, 41);
	PlaySoundThing(mountSound, player, 1.0, -1.0, -1.0, 0x80);

	// Play the animation (NOLOOP + UNIQUE + ENDPAUSE).
	// The animation is held at the last frame after it is played.
	trackID = jkPlayPOVKey(player, mountAnim, 0, 0x14);
	jkSetWaggle(player, '10.0 7.0 0.0', 350);

	// Clear saber flags, and allow activation of the weapon
	jkClearFlags(player, 0x5);
	SetCurWeapon(player, 2);
	SetMountWait(player, GetKeyLen(mountAnim));

	Return;

# ........................................................................................

deselected:
	if(reloadstatus == 1) Return;
	player = GetSourceRef();
	weaponIndex = GetSenderRef();
   
	PlaySoundThing(dismountSound, player, 1.0, -1, -1, 0x80);
	jkPlayPOVKey(player, dismountAnim, 0, 0x18);
   
	holsterWait = GetKeyLen(holsterAnim);
	SetMountWait(player, holsterWait);
	holsterTrack = PlayKey(player, holsterAnim, 1, 0x4);
	SetTimerEx(holsterWait, 2, 0.0, 0.0);
	if (trackID != -1)
	{
		jkStopPOVKey(player, trackID, 0);
		trackID = -1;
	}
	jkSetWaggle(player, '0.0 0.0 0.0', 0);

	Return;

# ........................................................................................

autoselect:
   player = GetSourceRef();

   // If the player has the weapon
   if(GetInv(player, 2) != 0.0)
   {
      // If the player has ammo
      if(GetInv(player, 11) != 0.0)
      {
         ReturnEx(500.0);
      }
      else
      {
         ReturnEx(-1.0);
      }
   }
   else
   {
      ReturnEx(-1.0);
   }

   Return;

# ........................................................................................

timer:
	StopKey(player, holsterTrack, 0.0);

	if(GetSenderID() = 1) roundnum = 0;

	Return;

# ........................................................................................

single_fire:

	SetPOVShake('0.0 -.003 0.0', '0.5 0.0 0.0', .05, 80.0);
	firestatus = 1;
	sendvector0 = (vectornum0*rand());
	sendvector1 = (vectornum1*rand());
#	dummy = FireProjectile(player, projectile, fireSound, 8, '0.0135 0.1624 0.0', VectorSet(((vectornum0*rand())/(accuracy1*2))+(roundnum/20), ((vectornum1*rand())/(accuracy1*2)), 0), 1.0, 0x20, 0, 0);
	SendTrigger(-1, 521, player, sendvector0, sendvector1, -1);
	PlaySoundThing(fireSound, player, 1.0, 1.0, 50.0, 0x80);
	Sleep(firewait);
	firestatus = 0;
	roundnum = (roundnum + 1);
	roundcount = (roundcount + 1);
	ChangeInv(player, 11, -1.0);
	if(roundcount >= magnum)
	{
		call user0;
		firestatus = 0;
		Return;
	}
	if(roundnum >= magnum) roundnum = 0;

	Return;

# ........................................................................................

burst_fire:

	SetPOVShake('0.0 -.003 0.0', '0.5 0.0 0.0', .05, 80.0);
	firestatus = 1;
	sendvector0 = (vectornum0*rand());
	sendvector1 = (vectornum1*rand());
#	dummy = FireProjectile(player, projectile, fireSound, 8, '0.0135 0.1624 0.0', VectorSet(((vectornum0*rand())/(accuracy1*2))+(roundnum/20), ((vectornum1*rand())/(accuracy1*2)), 0), 1.0, 0x20, 0, 0);
	SendTrigger(-1, 521, player, sendvector0, sendvector1, -1);
	PlaySoundThing(fireSound, player, 1.0, 1.0, 50.0, 0x80);
	Sleep(firewait);
	roundcount = (roundcount + 1);
	roundnum = (roundnum + 1);
	ChangeInv(player, 11, -1.0);
	if(roundcount >= magnum)
	{
		call user0;
		firestatus = 0;
		Return;
	}
	SetPOVShake('0.0 -.003 0.0', '0.5 0.0 0.0', .05, 80.0);
	sendvector0 = (vectornum0*rand());
	sendvector1 = (vectornum1*rand());
#	dummy = FireProjectile(player, projectile, fireSound, 8, '0.0135 0.1624 0.0', VectorSet(((vectornum0*rand())/(accuracy1*2))+(roundnum/20), ((vectornum1*rand())/(accuracy1*2)), 0), 1.0, 0x20, 0, 0);
	SendTrigger(-1, 521, player, sendvector0, sendvector1, -1);
	PlaySoundThing(fireSound, player, 1.0, 1.0, 50.0, 0x80);
	Sleep(firewait);
	roundcount = (roundcount + 1);
	roundnum = (roundnum + 1);
	ChangeInv(player, 11, -1.0);
	if(roundcount >= magnum)
	{
		call user0;
		firestatus = 0;
		Return;
	}
	SetPOVShake('0.0 -.003 0.0', '0.5 0.0 0.0', .05, 80.0);
	sendvector0 = (vectornum0*rand());
	sendvector1 = (vectornum1*rand());
#	dummy = FireProjectile(player, projectile, fireSound, 8, '0.0135 0.1624 0.0', VectorSet(((vectornum0*rand())/(accuracy1*2))+(roundnum/20), ((vectornum1*rand())/(accuracy1*2)), 0), 1.0, 0x20, 0, 0);
	SendTrigger(-1, 521, player, sendvector0, sendvector1, -1);
	PlaySoundThing(fireSound, player, 1.0, 1.0, 50.0, 0x80);
	Sleep(firewait);
	firestatus = 0;
	roundcount = (roundcount + 1);
	roundnum = (roundnum + 1);
	ChangeInv(player, 11, -1.0);
	if(roundcount >= magnum)
	{
		call user0;
		firestatus = 0;
		Return;
	}
	if(roundnum >= magnum) roundnum = 0;

	Return;

# ........................................................................................

grenade:

	Return;

# ........................................................................................

user0:

	if(reloadstatus == 1) Return;
	reloadstatus = 1;
	reloadskill = 2/2;

	roundcount = 0;
	roundnum = 0;

	Sleep(3-reloadskill);
	Print("Weapon Reloaded");
	reloadstatus = 0;
	Return;

# ........................................................................................

user1:

	if(firemode == 0)
	{
		firemode = 1;
		Print("Single Fire");
		Return;
	}
	if(firemode == 1)
	{
		firemode = 2;
		Print("Burst Fire");
		Return;
	}
	if(firemode == 2)
	{
		firemode = 0;
		Print("Weapon Safe");
		Return;
	}
	Return;

# ........................................................................................

end


The FireProjectile()s were used before I put the SendTrigger()s in, to test the cog.
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-05-28, 5:07 PM #8
Come on, a little help here?
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-05-29, 12:55 AM #9
Ummmmm :| ?
2002-05-29, 4:06 AM #10
First you could put

sleep(2);
SendTrigger(-1, 521, 0, 0, 0, 0);

in the startup of kyle_m.cog(or any default cogs preferably unmodified) to see which of those 2 cogs are having the problem. If it prints, then the weap cog has a problem, otherwise, the client cog has a problem or not registered properly.

------------------
http://millennium.massassi.net - Millennium
JK Mods : Sniper Arena! - Enhancement Pack!

[This message has been edited by Hideki (edited May 29, 2002).]
2002-05-29, 5:54 AM #11
I put it in the kyle.cog, since I haven't messed with it yet. It didn't work. The client cog itself seems okay, so how in the world is this not working?
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-05-30, 4:55 AM #12
That makes that the weapon cog has no problem and the problem lies either in the items.dat or the client cog. (Assuming that there is no double mistake in both cogs)

And there seems to be no problem in that short client cog, so items.dat is very suspicious.

And btw what are those "???" in the items.dat? Hope they aren't really "???" in your items.dat file, or fix it.

The only thing I notice is to change "Print()" command into "jkPrintUNIString" or "jkStringOutput". (Both shown in jkspec for usage or in my cog verb list)

------------------
http://millennium.massassi.net - Millennium
JK Mods : Sniper Arena! - Enhancement Pack!
2002-05-30, 5:55 AM #13
Um, unfortunately, those question marks are in the items.dat. I used to have those as comments, waiting to be implemented. I can't remember why I changed it. I'll fix it.

Ok, I fixed it. No effect. The more I think about it, the more I think that it can't be the items.dat. All my other modifications to it are fine. That would leave the weapons client? But it seems ok. This is bad, isn't it?

[This message has been edited by TheTwistedSpasm (edited May 30, 2002).]
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-05-30, 7:42 AM #14
Ok, I borrowed a client cog from GaS and modified it to fire the 556 when it recieved the 521 ID, since I've been worried that my code is the problem. Well, I tested it, and it worked. Great huh? Here's the catch; When I added in the code for the error vector, it stopped working. But when I removed that code, the cog still wouldn't work. I think it's safe to say that the client cog is the problem. What I can't figure out is why.
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-05-30, 1:27 PM #15
So, it may be the vectors.

Does it print the first sentence in the trigger message no matter what or does so only when using GaS version?

Try PrintVector(vectornorm); if it can print.
It will print "bad vector" if the vectors are not a valid value.

It could be the template, but in this case it shouldn't have a problem printing the sentence in the cog though, but you may want to check the template values and see if there may be something that can cause a problem.

------------------
http://millennium.massassi.net - Millennium
JK Mods : Sniper Arena! - Enhancement Pack!
2002-05-30, 5:27 PM #16
It will only print the message when I use the virtually unmodified GaS code.

As soon as I made any modifications beyond changing the ID and projectile, the cog stopped working. It is still not working, no matter what I do to it. Vectors or not. I wonder if it's my keyboard...

I can tell you right now that it's not the templates. I've tested them all. I'll test the vector tomorrow, and we'll see what happens.
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-06-01, 7:51 AM #17
Ach, I was wrong. It is the templates. As soon as I add any of the projectile templates to the cog, it stops working completely. Here's the latest Static.jkl...

Code:
#********** World file D:\jedi\Products\JK\Release\Jkl\static.jkl ***** Created 10/30/1996 6:32pm **********

#### Copyright information #####
SECTION: COPYRIGHT
................................
................@...@...@...@...
.............@...@..@..@...@....
................@.@.@.@.@.@.....
@@@@@@@@......@...........@.....
@@@@@@@@....@@......@@@....@....
@@.....@.....@......@@@.....@@..
@@.@@@@@......@.....@@@......@@.
@@@@@@@@.......@....@@.....@@...
@@@@@@@@.........@@@@@@@@@@.....
@@@@@@@@..........@@@@@@........
@@.....@..........@@@@@.........
@@.@@@@@.........@@@@@@.........
@@.....@.........@@@@@@.........
@@@@@@@@.........@@@@@@.........
@@@@@@@@.........@@@@@@@........
@@@...@@.........@@@@@@@........
@@.@@@.@.........@.....@........
@@..@..@........@.......@.......
@@@@@@@@........@.......@.......
@@@@@@@@.......@........@.......
@@..@@@@.......@........@.......
@@@@..@@......@.........@.......
@@@@.@.@......@.........@.......
@@....@@........................
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@.@@@@@@@@@@@@@@@@@@
@@.@@..@@@@@..@@@@@@@@@@.@@@@@@@
@@.@.@.@@@@.@.@@@.@..@@...@@@..@
@@..@@@@@@....@@@..@@@@@.@@@@.@@
@@@@@@@@...@@.@@@.@@@@@..@@...@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@.copyright.(c).1997.lucasarts.@
@@@@@@..entertainment.co..@@@@@@
################################


###### Header information ######
SECTION: HEADER
# version and global constant settings
Version 1
World Gravity 4.00
Ceiling Sky Z    3.000000
Horizon Distance 100.000000
Horizon Pixels per Rev 768.000000
Horizon Sky Offset   0.000000 0.000000
Ceiling Sky Offset   0.000000 0.000000
MipMap Distances	2.000000	4.000000	6.000000	8.000000
LOD Distances		0.300000	0.600000	0.900000	1.200000
Perspective distance 2.00
Gouraud distance 2.00
################################


###### Sound information  ######
SECTION: SOUNDS
World sounds 60
end
################################


##### Material information #####
SECTION: MATERIALS
World materials 160
end
################################


Section: Soundclass
World soundclasses 1
0:	ky.snd
end

###### Models information ######
Section: MODELS

World models 36

0:	bryv.3do
1:	bryg.3do
2:	sabv.3do
3:	sabg.3do
4:	rldv.3do
5;	rldg.3do
6:	conv.3do
7:	cong.3do
8:	strv.3do
9:	strg.3do
10: rptv.3do
11: rptg.3do
12: detv.3do
13: detg.3do
14: seqv.3do
15: seqg.3do
16: fistv.3do
17: fistg.3do
18: bowv.3do
19: bowg.3do
20: ky.3do
21: bry0.3do
22: con0.3do
23: dflt.3do
24: rep0.3do
25: det0.3do
26: seqp.3do
27: rld0.3do
28: explode1.3do
29: 9mm.3do
30: 556mm.3do
31: 40mm.3do
end
################################


###### Sprite information ######
Section: SPRITES

World sprites 20
0: bryx.spr
1: detx.spr
2: bowx2.spr
3: bowx.spr
4: rptx.spr
5: seqx2.spr
6: debrisx.spr
7: rldx.spr
8: conx.spr
end
################################


##### Keyframe information #####
Section: KEYFRAMES

World keyframes 128
end
################################


###### Animation Classes #######
Section: ANIMCLASS

World puppets 16
0:	ky.pup
end
################################


########## COG scripts #########
Section: cogscripts
World scripts 51
0: 00_happy.cog
end
################################


######### COG placement ########
Section: cogs
World cogs 50
#Num	Script          Symbol values
end
################################


########### Templates ##########
Section: templates

World templates 400

_weapon          none         orient=(0.000000/0.000000/0.000000) type=weapon collide=1 move=physics thingflags=0x20000000 timer=10.000000 mass=5.000000 physflags=0x200 maxrotvel=90.000000 damageclass=0x2 typeflags=0x1
_explosion       none         orient=(0.000000/0.000000/0.000000) type=explosion typeflags=0x1 damageclass=0x4
+bullethit       _explosion   thingflags=0x1 light=0.200000 timer=0.300000 sprite=bryx.spr soundclass=exp_laserhit.snd typeflags=0x33 blasttime=0.300000 maxlight=0.400000
+bulletfleshhit  _explosion   thingflags=0x1 light=0.200000 timer=0.300000 sprite=bryx.spr soundclass=exp_laserhit.snd typeflags=0x33 blasttime=0.300000 maxlight=0.400000
+grenadehit1     _explosion   thingflags=0x1 light=5.000000 timer=0.300000 model3d=explode1.3do soundclass=exp_laserhit.snd typeflags=0x16 blasttime=0.500000 maxlight=10.00000 damage=300.0 flashrgb=(125/0/0) range=0.2 force=25.0
+mm9smg          _weapon      thingflags=0x20000000 model3d=9mm.3do movesize=0.0009 mass=0.05 vel=(0.0/340.0/0.0) airdrag=0.5 rate=1.0 explode=+bullethit fleshhit=+bulletfleshhit damage=80 typeflags=0xd physflags=0x4001
+mm556           _weapon      thingflags=0x20000000 model3d=556mm.3do movesize=0.000556 mass=0.05 vel=(0.0/815.0/0.0) airdrag=0.5 rate=1.0 explode=+bullethit fleshhit=+bulletfleshhit damage=90 typeflags=0xd physflags=0x4001
+grenade40       _weapon      thingflags=0x20000000 model3d=40mm.3do movesize=0.004 mass=0.1 vel=(0.0/50.0/0.0) airdrag=0.5 rate=1.0 explode=+grenadehit1 fleshhit=+grenadehit1 damage=200 typeflags=0xd physflags=0x4001
+deadcam         _weapon      size=0.0001 movesize=0.0001 maxvel=1 vel=(1.0/0/0) thingflags=0x0 damageclass=0 typeflags=0xd

################################


the 00_happy.cog was a simple test cog I'd rigged to print a greeting on startup. Intrestingly enough, the greeting doesn't print. What have I done?
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-06-01, 8:14 PM #18
From my 2 year old knowledge, I guess mistakes in template don't usually interfere anything with other stuff(unless like a template that is based by many is jacked), so, try increasing world sections count numbers

ex : world cogs 50 to world cogs 200

If your number of cogs in use goes over that number, it simply starts ignoring.

Just make sure to have lots of rooms for each sections like that.
Since it doesn't crash, 3do may not be the problem.

------------------
http://millennium.massassi.net - Millennium
JK Mods : Sniper Arena! - Enhancement Pack!
2002-06-03, 5:01 AM #19
Set the world cogs to 200, no effect.

What puzzles me is this (sorry that I didn't really say this before); it seems like when I add a template into the symbols section, it screws the cog up. I don't even need to put anything about 'em in the code section.
I just don't get it. They worked fine when they were in the weapon cog, now they're a mess.
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-06-03, 11:45 AM #20
Just about ANY template?

Even adding

template ghostStuff=ghost local

stops it from working?

------------------
http://millennium.massassi.net - Millennium
JK Mods : Sniper Arena! - Enhancement Pack!
2002-06-04, 9:41 AM #21
No, it doesn't. Seems I was wrong again. The problem is in the code section. I removed the FireProjectile, and the cog works now. Doesn't matter what the template is. The FireProjectile is identical to the one that was in my weapon cog, except that I put the sound stuff to -1, and I removed all those vector variables. That's just '0 0 0' now. I don't get it, this stuff should be bullet-proof. Why is it screwing up?
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-06-04, 11:27 AM #22
So, this can mess up in place of the 556mm line(with ID 521)?

FireProjectile(player, ghostStuff, -1, -1, '0 0 0', '0 0 0', 0, 0, 0, 0);


------------------
http://millennium.massassi.net - Millennium
JK Mods : Sniper Arena! - Enhancement Pack!
2002-06-05, 8:10 AM #23
Nope, it didn't screw up. Seems it's just my templates. Please tell me you know what's wrong, I'm about to go insane here.
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-06-05, 1:56 PM #24
See which template screws up. Even try _weapon and see if it prints, and keep on moving downwards of your template list.

Where it gets screwed is the template that's messed.

------------------
http://millennium.massassi.net - Millennium
JK Mods : Sniper Arena! - Enhancement Pack!
2002-06-05, 4:59 PM #25
But _weapon is taken straight from the master.tpl in JED, and after that is my templates. That means it's my templates. But they worked fine when they were local. Oh well, I guess I'll mess with 'em a little and see what happens.
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-06-07, 5:26 AM #26
Well, I got out Template Maker, and recreated my templates with that. They're almost identical to the originals, but these work right. I still don't know why though. Oh well...

Anyway, thanks for all your help. Hopefully I won't have weird problems like these again. [http://forums.massassi.net/html/smile.gif]
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!
2002-06-08, 2:17 PM #27
so, does tis mean our mod is done? [http://forums.massassi.net/html/biggrin.gif]
God Bless,
Adam
2002-06-08, 5:10 PM #28
I think I may have missed the humor there... do I know you?
Cynic (sin'ik) n. One of a sect of ancient Greek philosophers who held that virtue is the ultimate goal of life, their doctrine gradually coming to symbolize insolent self-righteousness.

Drink So-Be, and play longer!

↑ Up to the top!