PDA

View Full Version : Saber Color Toggle Cogs



Saber_Scorpion
03-29-2003, 08:53 AM
I need some help from ANYONE! I've been trying to set a lightsaber 3do toggle that ONLY toggles the hilt (because my sabers are just metal swords, not lightsabers) and does nothing to the blade. I looked at the weap_saber.cog in Glowsaber 3D for an example to go by, but their cog changes only the blade color, not the external and internal models... so I looked in Glowsaber 3 and SBX... both of them have saber trails that make it very confusing to find anything in the cog... at least, confusing to a newbie at COG like I am...

I also want it to display the name of the sword at the top of the screen as you toggle, like Glowsaber 3D displayed "Blue saber", "green saber", "red saber", etc... but Glow3 and SBX don't do that, I don't think anyway...

In the end, I just need to know how to make a simple weap_saber.cog that changes only the handle 3do, displays the name of the sword at the top of the screen, and does not have anything to do with the saber blade and/or trails... can anyone help?

Thanks in advance...

------------------
-Justin "Saber-Scorpion" Stebbins
"(sigh) All this chatter is fine, but I have places I'd rather be..." - Drizzt Do'Urden(Baldur's Gate PC Game)

DSLS_DeathSythe
03-31-2003, 01:12 PM
heres a cog that will do what it sounds like you want.


# Written By DSLS_DeathSythe
symbols
#=====
message startup
message activated
message timer
thing player=-1 local
int sword_num=0 local
model sword_mdl01 local
model povsword_mdl01 local
model sword_mdl02 local
model povsword_mdl02 local
model sword_mdl03 local
model povsword_mdl03 local
model sword_mdl04 local
model povsword_mdl04 local
model sword_mdl05 local
model povsword_mdl05 local
keyframe mountanim=sabvmnt.key local
int animID local
keyframe holsteranim=kyhlstr.key local
sound change_snd=putweaponaway01.wav local
int can_change=1 local
flex change_spd=0.25 local
#-----
end
#=====
code
#-----
startup:
sword_num = 0;
can_change = 1;
return;
#-----
activated:
player = GetSourceRef();
if(can_change != 1) return;
if(GetCurWeapon(player) == 10)
{
can_change = 0;
sword_num = sword_num + 1;
if(sword_num > 5) sword_num = 1;
PlaySoundThing(change_snd, player, 1.0, -1, -1, 0x80);
animID = PlayKey(player, holsteranim, 1, 0x2);
Sleep(GetKeyLen(holsteranim));
PlayMode(player, 42);
animID = jkPlayPOVKey(player, mountanim, 0, 0x2);
SetTimer(change_spd);
if(sword_num == 1)
{
jkSetWeaponMesh(player, sword_mdl01);
jkSetPOVModel(player, povsword_mdl01);
Print("PUT SWORD (1) NAME HERE");
return;
}
else
if(sword_num == 2)
{
jkSetWeaponMesh(player, sword_mdl02);
jkSetPOVModel(player, povsword_mdl02);
Print("PUT SWORD (2) NAME HERE");
return;
}
else
if(sword_num == 3)
{
jkSetWeaponMesh(player, sword_mdl03);
jkSetPOVModel(player, povsword_mdl03);
Print("PUT SWORD (3) NAME HERE");
return;
}
else
if(sword_num == 4)
{
jkSetWeaponMesh(player, sword_mdl04);
jkSetPOVModel(player, povsword_mdl04);
Print("PUT SWORD (4) NAME HERE");
return;
}
else
if(sword_num == 5)
{
jkSetWeaponMesh(player, sword_mdl05);
jkSetPOVModel(player, povsword_mdl05);
Print("PUT SWORD (5) NAME HERE");
return;
}
return;
}
return;
#-----
timer:
can_change = 1;
return;
#=====
end

just list the 3dos up at the top. replace all the PUT SWORD NAME HERE with your sword names. you'll need to have this as a separate hotkey. right now it can do 5 separate swords, if you need more just ask.
hope that will work for you.

------------------


[This message has been edited by DSLS_DeathSythe (edited March 31, 2003).]

Saber_Scorpion
04-02-2003, 04:33 PM
Thanks! I was beginning to think no one was ever going to reply! I'll test it out as soon as I get the last of the pov meshes ready...

(PS: I'll mention you in the mod credits too)

------------------
-Justin "Saber-Scorpion" Stebbins
"(sigh) All this chatter is fine, but I have places I'd rather be..." - Drizzt Do'Urden(Baldur's Gate PC Game)

Saber_Scorpion
04-02-2003, 05:19 PM
Worked like a charm, thanks again! Oh, and five was exactly the number I had in mind.

------------------
-Justin "Saber-Scorpion" Stebbins
"(sigh) All this chatter is fine, but I have places I'd rather be..." - Drizzt Do'Urden(Baldur's Gate PC Game)