• 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.

Need help whit Projectile creation ( not jass )

Status
Not open for further replies.
Level 18
Joined
Oct 18, 2007
Messages
930
How do i create a unit that will do the same thing as a missile? like going from 1 point to another then damaging the unit " Know the first part but not the last " :p
I know triggering well and i might be able to do it, whit alot of spare time, like 20 painfull hours of trying to understand how the heck i am supposed to do it:hohum: Any ideas? just post them here ^^
 
Level 8
Joined
Jun 25, 2007
Messages
165
Try that, its more a "bomb" trigger (the missile go at a point and damage an area):
  • FireBall
    • Events
      • Unit - A unit Start cast an Ability
    • Conditions
      • (Ability being cast) Equal to YourAbility
    • Actions
      • Unit - Create 1 YourUnitMissile for (Owner of (Casting unit)) at (Position of (Casting unit)) facing (Facing of (Casting unit)) degrees
      • Unit - Set (Last created unit) movement speed to TheSpeedYouWant
      • Set Unit = (Last created unit)
      • Region - Center YourRegion <gen> on (Target point of ability being cast)
      • Set Region(A region variable) = YourRegion <gen>
      • Unit - Order (Last created unit) to Move to (Center of Region)
      • Wait until ((Region contains Unit)) Equal to TRUE), checking every 0.10 seconds
      • Wait TheTimeYouWant[like 0.1 - 0.6] seconds
      • Unit - Kill Unit
      • Unit - Cause Unit to damage circular area after 0.00 seconds of radius TheAreaYouWant at (Center of Region), dealing ThedamageYouWant damage of attack type YouWant and damage type YouWant
      • Special Effect - Create a special effect at (Center of Region) using TheExplosionModelYouWant
      • Special Effect - Destroy (Last created special effect)
      • Unit - Remove Unit from the game
Warning, that kill your unit to, if you want i can try to do a "missile-like" trigger.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Triggers? GUI? Jass? I must be in the wrong world
lol ^_^

Your solution is kinda
  • lalal
    • Events
      • Whenever u want
    • Conditions
      • If dolphins can kill whole humanity is equal to true
    • Actions
      • Create a bullet unit......................................
      • Add Last Created Unit To bullets group
  • OMFG
    • Events
      • Every 0.03 secs
    • Conditions
      • If True is equal to True
    • Actions
      • Unit Group - Pick Every Unit in Bullets group
        • Loop - Actions
          • Set Temp_Unit = (Picked Unit)
          • Unit - Change position of Temp_Unit to Position of Temp_Unit with offset of speed*0.03 distance and Facing of Temp_Unit Direction
          • Unit Group - Pick Every Units around Temp_unit with 100 or 150 radius
            • Loop - Actions
              • if then else etc
                • if Temp_Unit is alive
                • Then - Actions
                  • Unit - Cause Temp_Unit to do x damage to Picked Unit
                  • Unit - Kill Temp_Unit
 
Level 7
Joined
Jul 1, 2008
Messages
1,025
This is just a quick guess but you could try using the goblin landmine ability, order the missile/unit to move at centre of region like in elevngods trigger then if any other units come in the way the landmine ability goes off. You would have to mess about with the ability as I think it's delayed since it's launched. If that dosnt work you could try the same with the Kaboom ability, only trigger it to go off when a uni comes within ranged of your created missile unit.

Thats what I'd try anyway as it requires least triggering which is what I suck at.
 
Level 18
Joined
Oct 18, 2007
Messages
930
  • lalal
    • Events
      • Whenever u want
    • Conditions
      • If dolphins can kill whole humanity is equal to true
    • Actions
      • Create a bullet unit......................................
      • Add Last Created Unit To bullets group
  • OMFG
    • Events
      • Every 0.03 secs
    • Conditions
      • If True is equal to True
    • Actions
      • Unit Group - Pick Every Unit in Bullets group
        • Loop - Actions
          • Set Temp_Unit = (Picked Unit)
          • Unit - Change position of Temp_Unit to Position of Temp_Unit with offset of speed*0.03 distance and Facing of Temp_Unit Direction
          • Unit Group - Pick Every Units around Temp_unit with 100 or 150 radius
            • Loop - Actions
              • if then else etc
                • if Temp_Unit is alive
                • Then - Actions
                  • Unit - Cause Temp_Unit to do x damage to Picked Unit
                  • Unit - Kill Temp_Unit

This command will leave you whit a leak every 0.03 secs, i suggest creating a point then removing it at the end ^^
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
Ah forgot to include one thing
This leaks much remove leaks on usage (I cant believe I forgot to say that)

btw it leaks (1 unit group + 3 locations) x (number of bullets alive) every 0.03 seconds

And give bullets -hp regen and remove them from group when they die
 
Status
Not open for further replies.
Top