PDA

View Full Version : Special Saber Cog



Han5678
10-13-2000, 02:19 PM
I need help with a saber cog. I have been working on this cog but have not been able to get it to work. I want to have a sort of vibroblade type deal. The blade is there and then when you press a hotkey it activates the blade. Then when you press the hotkey again it deactivates it. I want to still be able to attack while the blade is on or off. To get the different damages would i have to make to different projectiles in my static file, but then how do i get them to work in the same cog? I need some major help if you could please help i would appreciate it. I would put your name in the credits since some ppl like recognition.

zagibu
10-13-2000, 02:25 PM
hmmm...you could have different projectiles, then have a new inventory bin, and when the player hits the hotkey, activate the bin. In the fire message, check if the bin is activated or not. If yes, fire projectile1, if no, fire projectile2.
Take the projectiles fired in the fist.cog as a reference...they have a fixed range...i think its +punch...

Han5678
10-13-2000, 06:06 PM
i know what you are talking about but i need it to stay on until the person turns it off again not just last for a few seconds or whatever i set it to, i think i would have to set up some kind of pulse wouldn't i since i want it to draw power from the battery while it is on

zagibu
10-14-2000, 12:28 AM
well, a bin is there to store information. The blade will be on until you change this information (by deactivating the blade)...If you activate that blade by pressing the hotkey, have a print message that says
Print("Vibroblade: On"); or something, then SetInv(player, bin, 1); and SetPulse(1);
further you need an if(GetInv(player, bin)==1.0) condition in the fire message of the weapon_cog. And have a pulse message in there, too, and every pulse you do ChangeInv(player, 13, -1); this will suck up your battery. In the deactivated message of the hotkey-cog you need to set the pulse and the bin off: SetPulse(0);, SetInv(player, bin, 0); and have again a print line that tells the player that the blade is off...that's all
ah yes, you have to add the bin to items.dat. Just give it an appropriate name (like vibrostatus or so) and set all other information except of the maxvalue and binnumber on zero:
vibrostatus 116 0 1 0x000
that's all

[This message has been edited by zagibu (edited October 14, 2000).]

[This message has been edited by zagibu (edited October 14, 2000).]

Han5678
10-14-2000, 08:37 AM
ok thanks i understand now i knew what a bin was and how to set one up but not keep it going in my cog until deactivated thanks. NOw this is a question you have probably had to answer a million times. HOw do i make a trail for my blade. I know it has something to do with some sort of layering but how? And i only want it to be on when i activate my blade

zagibu
10-14-2000, 12:18 PM
ask Gunboy, he's the expert for saber trails...he knows a lot more than I about this topic...take a look at the showcase forum, he's always somewhere around there...

Midget Basher
10-15-2000, 03:52 PM
for trails, you need to make several models, and in the firing section of the cog, make several setweaponmesh commands
one on fire, one on timer, and another on timer