• 🏆 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!

[Trigger] Missile-thingy.

Status
Not open for further replies.
Level 3
Joined
May 3, 2004
Messages
46
Aloha, well, I've been working on a map a little now and then where the player has to "manually fire" the units weapon, and I'm using weapons such as cannonballs etc. and then comes the problem,

I've been trying many different ways of the "cannonball", everything from dummies with shockwave, units with cannonball model and such, and I wonder if there's any "easy" way in GUI that lets say, makes the cannonball-unit explode whenever it hits/gets close to any unit that aren't the caster?

I guess it's alot easier in JASS, but right now I'm not really good at it(but I've been practicing! :p)
 
Level 27
Joined
Feb 22, 2006
Messages
3,052
  • Time - Every 0.05 seconds
  • Set Var_ALG = Units of Type CannonBall
  • Unit Group - Pick every unit in (ALG) and do actions:
  • Loop - Actions
  • Set Var_TempUnit = Picked Unit
  • Set Var_ALG2 = units within X range of PickedUnit
  • Unit Group - Pick every unit in (ALG2) and do actions:
  • If Picked Unit Not Equal to No Unit Then do actions
  • Unit - Kill TempUnit
  • --Do other actions here--
  • --At the very end of your trigger:--
  • Custom Script: call DestroyGroup(udg_Var_ALG)
  • Custom Script: call DestroyGroup(udg_Var_ALG2)
--donut3.5--
 
Level 3
Joined
May 3, 2004
Messages
46
Cheers, I kinda get the idea :)

It's kinda buggy atm but I guess I just have to adjust some few things, thanks alot :D
 
Status
Not open for further replies.
Top