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 → What code would cause a weapon...
What code would cause a weapon...
2005-01-23, 4:47 PM #1
... to fire once when selected...?

_K_
2005-01-23, 5:56 PM #2
You're trying to get the weapon to fire when it's selected?
-under the selected message(or maybe it's activated, can't remember) call the firing message.

Or the weapon fires when selected and you don't want it to?
-if that's the case, you'll have to post the cog for us to looki at it.

Just a note for in the future, a little more information of what you're trying to do makes everything easier in the long run. ;)
2005-01-23, 6:22 PM #3
Thanks for the reply...!

QUOTE:..."You're trying to get the weapon to fire when it's selected?
-under the selected message(or maybe it's activated, can't remember) call the firing message...."

Yes; I want to know what the code for "FireWhenSelected" (or whatever) would be in order to cause a saber to swing one time when selected... I want it to fire when it's selected. What is the "firing message?"

QUOTE:..."Or the weapon fires when selected and you don't want it to?
-if that's the case, you'll have to post the cog for us to looki at it..."

Nope; it doesn't fire when selected (but I want it to).

Thanx...!

_K_
2005-01-23, 6:34 PM #4
Not sure if this'll work, but open weap_saber.cog in notepad and at the end of the selected: code (before the return) add

call fire;

I havn't edited in a while, but if I remember right, that might do what you're looking for.
2005-01-23, 7:02 PM #5
Try this code:

ActivateWeapon(player, fireWait, mode);

Put it under selected. Choose whichever mode you want the weapon to fire in.
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2005-01-25, 9:52 AM #6
Wahoo...! THANX -- that did it...!!!

Well, sorta -- now I just need to stop that saber from incessantly swinging once selected ;)

Thanx again,
_K_
2005-01-25, 1:21 PM #7
Oops, my bad.

Sleep(fireWait);
DeactivateWeapon(player, mode);

Throw that in after the ActivateWeapon, and it should be good. Set the mode to whatever it was in ActivateWeapon.
_ _ _____________ _ _
Wolf Moon
Cast Your Spell On Me
Beware
The Woods At Night
The Wolf Has Come
2005-01-26, 7:05 PM #8
Whoah: Not "your bad": it was easy enough to stop the incessant saber swinging... thanx for your input -- your SetFireWait command may be just the next little piece of code that may solve the remainder of what I'm trying to accomplish: a big THANX to ya...!

_K_

↑ Up to the top!