• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Mine Tower

Status
Not open for further replies.
Level 9
Joined
Aug 16, 2008
Messages
318
I'm about to create a spell of a tower that the goblin mine dummy will automatically place land mines. The problem is it's bugged about indexing.

Produce Mine
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Produce Mine to...
(Casting unit) Equal to MineProducer[MineProducerMain]
Actions
Set MineProducerMain = (Custom value of (Casting unit))
Unit - Move MineProducerTarget[MineProducerMain] instantly to (Target point of ability being cast)
 
Level 9
Joined
Aug 16, 2008
Messages
318
Dome fixing the point leak. Here are the rest of Mine tower trigger.

Mineproducer
Events
Unit - A unit Finishes construction
Conditions
(Unit-type of (Constructed structure)) Equal to Mine Producer
Actions
Set MineProducerMain = (Custom value of (Constructed structure))
Set TowerPoint = (Position of (Constructed structure))
Set MineProducer[MineProducerMain] = (Constructed structure)
Unit - Create 1 Mine Target for (Owner of (Constructed structure)) at TowerPoint facing Default building facing degrees
Set MineProducerTarget[MineProducerMain] = (Last created unit)
Custom script: call RemoveLocation(udg_TowerPoint)

Mineproducer Dies
Events
Unit - A unit Dies
Conditions
(Unit-type of (Dying unit)) Equal to Mine Producer
Actions
Set MineProducerMain = (Custom value of (Dying unit))
Unit - Kill MineProducerTarget[MineProducerMain]
 
Level 39
Joined
Feb 27, 2007
Messages
4,992
I cannot believe how often I have to link this: How To Post Your Trigger

What is doing your indexing? Are you certain the indexing is running before the on-construct trigger fires? You can print the unit's CV in the trigger to make sure it has been set. If it has, then the only thing you need to do is remove the condition I highlighted above; it serves no purpose.
 
Status
Not open for further replies.
Top