- Joined
- Jul 14, 2011
- Messages
- 3,213
Hi!
In my map I made a torch based on the 'Torch Glowing' Model. The thing is that when the unit picks the torch, the light remains where the torch was until the item is dropped, and then the light remains where the item was dropped, and so on.
To avoid that, I made two torches. When the unit picks the Torch(1), item is removed (Glowing is removed too), and system gives the user a Torch(2).
Also, if the unit gives the Torch(2) to another Unit, it triggers, creating a torch on the floor instead of giving it to the another unit.
How can I fix all this?
In my map I made a torch based on the 'Torch Glowing' Model. The thing is that when the unit picks the torch, the light remains where the torch was until the item is dropped, and then the light remains where the item was dropped, and so on.
To avoid that, I made two torches. When the unit picks the Torch(1), item is removed (Glowing is removed too), and system gives the user a Torch(2).
-
Torch 1
-
Events
- Unit - A unit Acquires an item
-
Conditions
- (Item-type of (Item being manipulated)) Equal to Torch
-
Actions
- Item - Remove (Item being manipulated)
- Hero - Create Torch2 and give it to (Triggering unit)
-
Events
-
Torch 2
-
Events
- Unit - A unit Loses an item
-
Conditions
- (Item-type of (Item being manipulated)) Equal to Torch2
-
Actions
- Set DropItemPoint = ((Position of (Triggering unit)) offset by 130.00 towards (Facing of (Triggering unit)) degrees)
- Item - Remove (Item being manipulated)
- Item - Create Torch at DropItemPoint
- Custom script: call RemoveLocation(udg_DropItemPoint)
-
Events
Also, if the unit gives the Torch(2) to another Unit, it triggers, creating a torch on the floor instead of giving it to the another unit.
How can I fix all this?