PDA

View Full Version : Deactivated message not getting called



GuNbOy
03-27-2003, 01:04 PM
I have three inventory items scripted so that all they do is activate the respective bin when you press the button, and deactivate it when you release the button.
they work fine by themselves, but when i try to press more than one at a time, only one will be deactivated upon releasing them--the one I released first.


# Jedi Knight Cog Script
#
# ITEM_BACTA.COG
#
# INVENTORY script - Combo Button 1
#
# [GB]
#
#
#================================================= =============#
symbols

thing player

message activated
message deactivated

end
#================================================= =============#
code
#------------------------------------------------------
activated:
player = GetSourceRef();
SetInvActivated(player, 40, 1);

Return;
#------------------------------------------------------
deactivated:
SetInvActivated(player, 40, 0);

Return;
#------------------------------------------------------

end


this is what the cogs look like.

It must be getting confused when so many deactivated messages get called or something.

------------------
I'm just an old man with a skooma problem.

Checksum
03-27-2003, 10:07 PM
Put a print("deactivated"); in the message. Then try again.

------------------
"Anakin, when I tried to earn my knighthood by defeating a Sith Lord, I actually WON."
-Obi Wan Kenobi

Hell Raiser
03-28-2003, 03:59 PM
JK is quirky like that for some reason. I found this out for myself unfourtunatly. JK just won't recognize the deactivated message for other bins (in the same group, force/invintory) when another one is actived and deactivated.

However, if you target an item with force pull, and use force lighting, JK deactivates force pull. (and vice versa) Strange..... http://forums.massassi.net/html/confused.gif

------------------
-Hell Raiser
Remember kiddies, trial and error.
Without struggles there is no progress
DBZ: The Destruction is Real (http://tdir.hellraiser64.com)