Tony Ayalew on 28/5/2011 at 19:34
Quote Posted by Tiens
How to create a lantern for the player's inventory, step-by-step tutorial:[
NOTICE:The only one bug is: when the player turns the lantern on/off, the game plays the same sounds and Garrett plays the same animation as if the player throws a flash-bomb. To tell the truth, I'm not going to get rid of this bug. I prefer to leave these sounds/animation as they are now. It helps me to control the moment of "using" any new item.
I've found a solution to the AI bug (and my bug, since this bug is also in my MOD):
In stead of using the following scripts:[0] GarrettPocketLightBulb:
cond.:
- Received trigger message [PocketLight]
act.:
- Delay [0.01] GAME seconds
- Toggle [bLightOn] on linked objects of type [MYSELF]
- Reset script conditions and actions
[1] GarrettPocketLightBulb_OnStartToFalse:
cond.:
- When map starts, arriving from a different map
act.:
- Delay [0.01] GAME seconds
- Set [bLightOn] to [False] on linked objects of [MYSELF]
- Reset script conditions and actions
Use these scripts:[0] GarrettPocketLightBulb:
cond.:
- Received trigger message [PocketLight]
act.:
- Delay [0.01] GAME seconds
- Toggle [bHidden] on linked objects of type [MYSELF]
- Reset script conditions and actions
[1] GarrettPocketLightBulb_OnStartToFalse:
cond.:
- When map starts, arriving from a different map
act.:
- Delay [0.01] GAME seconds
- Set [bHidden] to [True] on linked objects of [MYSELF]
- Reset script conditions and actions