• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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