• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

Need help with tower to a TD

Status
Not open for further replies.
Level 1
Joined
Oct 9, 2008
Messages
7
I want to make a boomerang Tower but i cant make it to work.
i can make so 1 tower shoots then go back and gets removed but i cant have more then 1 boomerang tower then.
they get stuck there and wont go back.
please help me.
(make a easy understanding (something))

EDIT: Plz fix my trigger the boomerang wont go back
  • Boomerang Tower
    • Events
      • Unit - A unit owned by Player 12 (Brown) Is attacked
    • Conditions
      • ((Attacking unit) is in (Units of type Boomerang Tower)) Equal to True
    • Actions
      • Custom script: local unit udg_Boomerang_Dummy
      • Custom script: local unit udg_Boomerang_Tower
      • Set Boomerang_Tower = (Attacking unit)
      • Set BoomerangPoint = (Position of (Attacked unit))
      • Unit - Create 1 Boomerang Dummy for (Owner of Boomerang_Tower) at (Position of Boomerang_Tower) facing Default building facing degrees
      • Set Boomerang_Dummy = (Last created unit)
      • Unit - Order Boomerang_Dummy to Move To BoomerangPoint
      • Wait until ((Current order of Boomerang_Dummy) Equal to (Order(move))), checking every 1.00 seconds
      • Wait until ((Current order of Boomerang_Dummy) Not equal to (Order(move))), checking every 0.10 seconds
      • Unit - Order Boomerang_Dummy to Move To (Position of Boomerang_Tower)
      • Wait until ((Distance between (Position of Boomerang_Dummy) and (Position of Boomerang_Tower)) Less than or equal to 100.00), checking every 0.10 seconds
      • Unit - Remove Boomerang_Dummy from the game
 
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
Easy understanding is pretty hard, since you're talking about MUI...
MUI is something that a lot of spells need, otherwise the spell will big like in your case.

The easiest way to achieve MUI nowadays is with hashtables, I suggest you have a look at a tutorial about that :)
You just need to store everything inside that hashtable with as key the tower which is shooting the boomerang.
 
Level 1
Joined
Oct 9, 2008
Messages
7
Ok No double post then tnx for leting me know that. xD
but how to solve the wait problem?
the boomerang wont go back if im not using last created unit.
 
Level 1
Joined
Oct 9, 2008
Messages
7
ok?
is it possible to inport "triggers" from JASS?
omg help me (dont understand a thing)
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
@adi

yes if you wait a local integer of time and just checking boolean and the waits are higher than 0.27

@dgz

remake the code into 2 different triggers, one with a loop and one that is casting, read a tutorial essentials made by deuturium, it's very good
 
Status
Not open for further replies.
Top