Item Transfer Fixing

Level 20
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).
  • 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)
BUT... if the unit drops the Torch(2), the history repeats =D. So I though about creating a Torch(1) where the Torch(2) was dropped.
  • 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)
But I have some problems with it. The unit may be facing one point different to the targeted drop point, and the system creates the item where the unit is facing, not the selected point =).

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?
 
Level 25
Joined
Aug 18, 2009
Messages
4,087
When items are being picked up, their 3d objects remain at the spot, they just get hidden, which seemingly does not consider lights. I would say to not directly give the light model to the item but create special effects/dummy units at the position, when the item is acquired, destroy the sfx and you can attach a new one to the carrier if you want.
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
The model is the common WC3 torch. Torch model and Torch Glowing models have glowing fx... But I'm good with that so far. If I find gameplay problems in the future attached to the 3dLight remaining on where the item was picked, I'd make the Torch without light source and use that as a model =) Thanks for suggestions though :D
 
Top