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 → Key won't deactivate
Key won't deactivate
2003-08-24, 1:24 AM #1
Hi!
I'm making a mod, and in it I have a third action to each weapon. I'm starting of with the cross bow, and all 3 fires shall have a warm up... In the sence of when you hold down the fire key, it will warm up and shoot more bolts. Fire1 works: Click, sound, bolt counter inc, let go, and blam!
Fire2 works: Click, sound, bolt counter inc, let go, and a new set of blam!
Fire3 doesn't: Click, sound, bolt counter inc, let go, and it won't stop! The more I press Fire3, the more times it restarts the counter and sound without stopping!
What should I do so that a deactivated message gets sent to the third-action-COG...
Code:
# Third action/fire
#
# By Edward
symbols

message		activated
message		deactivated

end
#
code
activated:
SendMessage(GetInvCog(GetLocalPlayerThing(), GetCurWeapon(GetLocalPlayerThing())), user3);
return;
deactivated:
SendMessage(GetInvCog(GetLocalPlayerThing(), GetCurWeapon(GetLocalPlayerThing())), deactivated);
return;
end

BV told me to move it here...
Edward's Cognative Hazards
2003-08-24, 4:58 PM #2
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Edward:
BV told me to move it here...[/B]</font>


*big thumbs up*
GBK or Sabermaster or that other guy will surely be able to help.


------------------
Well that's stupid. I'm not buying a so-called Star Wars game that doesn't have Yoda. - Tracer
That painting was a gift, Todd. I'm taking it with me.
2003-08-24, 5:53 PM #3
you could try using a user4 (or whatever user# is open that you want to use) message that does the same as what your deactivated is supposed to do.

if that doesnt work could you post the user3 message and the deactivated message.
or maybe just the deactivated message will do.

------------------
Famous last words - "It seemed like a good idea at the time."

[This message has been edited by DSLS_DeathSythe (edited August 24, 2003).]
Famous last words - "It seemed like a good idea at the time."
2003-08-24, 9:33 PM #4
Well, the deactivated message isn't being sent in THIS code... I tried a Print command in each and the only text that printed was the one in the activated messag... So it must be this code...

/Edward
Edward's Cognative Hazards
2003-08-25, 12:55 PM #5
Hi there [http://forums.massassi.net/html/smile.gif]

Just a quick thought (because I'm running out of "free" hours with my ISP - honestly - only 5hrs a day ... they obviously don't visit Massassi [http://forums.massassi.net/html/wink.gif] )

... Haven't got time to thoroughly look at your code, but if it is only sending an "activated" message, why not include an "if" statement block to deactivate your item (much like how the player's fieldlight/infra-red goggles cog works - "item_fieldlight.COG" and "item_goggles.COG", I think...). Perhaps check that possibility out?

Sorry I don't have much time to expand further/clarify my point, but I hope this helps [http://forums.massassi.net/html/redface.gif] [http://forums.massassi.net/html/biggrin.gif]

-Jackpot
(fast running out of "free" time... [http://forums.massassi.net/html/frown.gif])

------------------
Are you feeling lucky, cuz if you are, get your hands off me... [http://forums.massassi.net/html/wink.gif]

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)

[This message has been edited by lucky_jackpot (edited August 25, 2003).]
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2003-08-25, 8:44 PM #6
Well, thanks for the idea, but I want it so when I hold down the key, it sends the activated message. When I release the key, it will send the deactivated message. Something like the Fire key.

/Edward
Edward's Cognative Hazards
2003-08-26, 2:55 AM #7
So deactivated isn't running in your hotkey and the message isn't sent? Put a print statement there to check. And if that's it, open up the items.dat and add the 0x2 bin flag to bin of your firing hotkey. And make sure you find some sort of icon for the bin (for testing, just rename your bin to a force power), or JK will crash when you load a level.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2003-08-26, 10:47 AM #8
Like you said, it crashed when I tried to add the 0x2 to my "item"... But when I tried to add a force_pull.cog to it, it also crashed... Maybe you could help me if I gave you what I have writen down:
third 118 1 1 0x122 cog=third.cog
Before it was 0x120, like I've seen in all other Mods...

Oh, and I have already tested it with some Print statements... I said so in the topic Above yours, SM.

[This message has been edited by Edward (edited August 26, 2003).]
Edward's Cognative Hazards
2003-08-26, 7:03 PM #9
Quote:
<font face="Verdana, Arial" size="2">Like you said, it crashed when I tried to add the 0x2 to my "item"... But when I tried to add a force_pull.cog to it, it also crashed... Maybe you could help me if I gave you what I have writen down:
third 118 1 1 0x122 cog=third.cog</font>


Quote:
<font face="Verdana, Arial" size="2">And make sure you find some sort of icon for the bin (for testing, just rename your bin to a force power), or JK will crash when you load a level.</font>


Rename the bin with the name of another force power, not a force power's cog. Just so you know, an explanation for this is in the hotkey tutorial and a few other relevant parts of the DM. [http://forums.massassi.net/html/rolleyes.gif]

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2003-08-27, 5:44 AM #10
OK, I changed only the name to f_pull and it worked! Only one problem... When I died the gun fired... Any idea on how to not... Hang on... Ok, I've got it... Just reset the counter at the end of the weapons deactivated message... Thanks you all!
Edward's Cognative Hazards
2003-08-27, 6:28 AM #11
And the moral of the story ... "It's all in the DataMaster" lol [http://forums.massassi.net/html/wink.gif]

-Jackpot

------------------
Are you feeling lucky, cuz if you are, get your hands off me... ;)

"Life is mostly froth and bubble,
But two things stand in stone,
Kindness in another's trouble,
Courage in your own"
("Ye Wearie Wayfarer" - by Adam Lindsay Gordon)
"lucky_jackpot is the smily god..." -gothicX
"Life is mostly froth and bubble, but two things stand in stone,
Kindness in another's trouble, courage in your own"
- "Ye Wearie Wayfarer"
|| AI Builder: compatible with both JK & MotS || My website ||
2003-08-27, 5:28 PM #12
lol. [http://forums.massassi.net/html/smile.gif]

No problem, Edward. [http://forums.massassi.net/html/wink.gif]

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!