I made a hotkeyable jetpack. The first cog that actually activates it works perfectly. The 2 hotkey cogs that control the up/down movements is where I'm having the problems. I can't get the deactivated message to work. I want activated to work only when the button is pressed, and deactivated when it's released. However, I don't want icons for those functions to show up when I use them, or in the inventory icon "list" at the bottom of the screen. Here's the cogs:
[edit]I should also mention that when these inventories are at 1, the jetpack cog applies an upward or downward force to the player, depending on which one is activated. As a result, both up & down inventories cannot be 1 at the same time.[/edit]
------------------
"The Just shall live by faith." - Galatians 3:11
To edit is human... To COG is divine!!
pegasus_1984: Stop bushing that dang suck button.
guitarofgold: NOOOOOOOOO!!!!
-------[end post]-------
[This message has been edited by DogSRoOL (edited June 21, 2003).]
Code:
Second cog:
# DogSRoOL's Wasteland - Cog Script # Written by Brandon "DogSRoOL" Bull # # jpUp.COG # # Changes inventory for Jetpack "up" feature. # # You may not use this cog without permission. # Get Permission at: # GuitarOfGold@aol.com # GuitarOfGold@yahoo.com # IM available on both. symbols Message Activated Message Deactivated int upbin=117 int dnbin=118 Thing player end code Activated: player = GetSourceRef(); SetInv(Player, upbin, 1); SetInv(player, dnbin, 0); Return; Deactivated: player = GetSourceRef(); SetInv(Player, upbin, 0); Return; end
Code:
# DogSRoOL's Wasteland - Cog Script # Written by Brandon "DogSRoOL" Bull # # jpDown.COG # # Changes inventory for Jetpack "down" feature. # # You may not use this cog without permission. # Get Permission at: # GuitarOfGold@aol.com # GuitarOfGold@yahoo.com # IM available on both. symbols Message Activated Message Deactivated int upbin=117 int dnbin=118 Thing player end code Activated: player = GetSourceRef(); SetInv(Player, upbin, 0); SetInv(player, dnbin, 1); Return; Deactivated: player = GetSourceRef(); SetInv(Player, dnbin, 0); Return; end
[edit]I should also mention that when these inventories are at 1, the jetpack cog applies an upward or downward force to the player, depending on which one is activated. As a result, both up & down inventories cannot be 1 at the same time.[/edit]
------------------
"The Just shall live by faith." - Galatians 3:11
To edit is human... To COG is divine!!
pegasus_1984: Stop bushing that dang suck button.
guitarofgold: NOOOOOOOOO!!!!
-------[end post]-------
[This message has been edited by DogSRoOL (edited June 21, 2003).]