Hi!
Yes, more COG problems... I thought as I'm waiting for these things to be fixed, I could pass the time by trying new things... But then I get into problems...
The problem is: I can't select this weapon COG!
It replaces weap_conc.cog, so it should be on number 9 after typing in red5.
/Edward
Yes, more COG problems... I thought as I'm waiting for these things to be fixed, I could pass the time by trying new things... But then I get into problems...
The problem is: I can't select this weapon COG!
Code:
# A CANON COG! # # By Edward symbols message activated message deactivated message pulse message selected message deselected model weapmesh=CANON.3DO local model weapon=CANON.3DO local keyframe mountAnim=ConVmnt.key local keyframe dismountAnim=ConVdis.key local keyframe povfireAnim=ConVpst1.key local keyframe holsterAnim=kyhlstr.key local template ball=ball local sound mountSound=df_rif_ready.wav local sound dismountSound=PutWeaponAway01.wav local sound fireSound=expl_09.wav local sound outSound=railchargeattach.wav local sound warmupSound=16metalcreak02.wav local int bigsound=1 local thing player local int power=0 local flex autoAimFOV=30 local flex autoAimMaxDist=5 local int trackID=-1 local end # code activated: player=GetSourceRef(); if(GetThingHealth(player) <= 0) return; if(GetInv(player, 12) < 1.0) { PlaySoundThing(outSound, player, 1.0, -1, -1, 0x80); if(GetAutoSwitch() & 1) SelectWeapon(player, AutoSelectWeapon(player, 1)); Return; } power=0; SetPulse(0.1); bigsound=PlaySoundThing(warmupSound,player,0,-1,10,0xC0); ChangeSoundPitch(bigsound,1.05,1); ChangeSoundVol(bigsound,1,1); ActivateWeapon(player, 0, 1); return; deactivated: player=GetSourceRef(); SetPOVShake('0.1 -.05 0.0', '0.5 0.0 0.1', .05, 40.0); jkPlayPOVKey(player, povfireAnim, 1, 0x38); FireProjectile(player, ball, fireSound, power, '0.02 0.15 0.0', '0 0 0', 1.0, 0x20, autoAimFOV, autoAimMaxDist); StopSound(bigsound,1); PlaySoundThing(fireSound,player,1,-1,10,0xC0); ChangeInv(player, 12, -1.0); DeactivateWeapon( player, 1 ); return; pulse: power=power+1; If(power>=20) power=20; SetPOVShake('-0.001 -.001 0.0', '0.001 0.0 0.001', .05, 40.0); return; selected: player = GetSourceRef(); // Play external mounting animation PlayMode(player, 41); // Setup the meshes and models. jkSetPOVModel(player, weapon); SetArmedMode(player, 1); jkSetWeaponMesh(player, weapmesh); jkSetWaggle(player, '10.0 7.0 0.0', 350); // Play mounting sound. PlaySoundThing(mountSound, player, 1.0, -1, 10, 0xC0); // Play the animation (NOLOOP + UNIQUE + ENDPAUSE). // The animation is held at the last frame after it is played. trackID=jkPlayPOVKey(player, mountAnim, 0, 20); SetMountWait(player, GetKeyLen(mountAnim)); // Clear saber flags, and allow activation of the weapon jkClearFlags(player, 0x5); SetCurWeapon(player, 9); // Check Ammo - If we are out, autoselect best weapon. if(GetInv(player, 12) < 1.0) { PlaySoundThing(outSound, player, 1.0, -1, -1, 0x80); if(GetAutoSwitch() & 1) SelectWeapon(player, AutoSelectWeapon(player, 1)); } Return; deselected: player = GetSourceRef(); PlaySoundThing(dismountSound, player, 1.0, -1, -1, 0x80); jkPlayPOVKey(player, dismountAnim, 0, 18); SetMountWait(player, 1); PlayKey(player, holsterAnim, 1, 0x4); if (trackID != -1) { jkStopPOVKey(player, trackID, 0); trackID = -1; } jkSetWaggle(player, '0.0 0.0 0.0', 0); Return; end
It replaces weap_conc.cog, so it should be on number 9 after typing in red5.
/Edward