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

Alien Drop Ship V 1.2

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Calls down an Alien Dropship to bolster your invasion force.

Level 1 - Every 5 seconds summons an Alien Militia that lasts 30 seconds.
Level 2 - Every 3 seconds summons a Martian Manhunter that lasts 20 seconds.
Level 3 - Every 2 seconds summons a ME that lasts 4 seconds.
(These are clones of myself obviously as I could NEVER die. :p )

Have fun and enjoy =D
Your friendly Neighborhood Guishiu
High General of EIF (Earth Invasion Force)

---------------------------------------------------------------------------------
Updates -----
Version 1.1 - Fixed Offset leak, Cleaned up Trigger off Function
Version 1.2 - Changed internal timers & removed Init Trigger, Removed Unit Group Leaks
*Latest update - Removed the special effect since it leaked. (I've been away for too long to know how to fix it.)

Keywords:
Alien, martian, dropship, drop, ship, invasion, invader, invade
Contents

Drop Ship (Map)

Reviews
19:25, 8th Dec 2009 TriggerHappy: Review for Spell You are leaking special effects in you Spell Action trigger. You should also be using some kind of loop in your Alien Spawn trigger, it would decrease the code size by a lot...

Moderator

M

Moderator

19:25, 8th Dec 2009
TriggerHappy:


Review for Spell

You are leaking special effects in you Spell Action
trigger.

You should also be using some kind of loop in your
Alien Spawn trigger, it would decrease the code
size by a lot.

Also, please learn to use arrays.

Status

Rejected

Hanky:
You got several location leaks. Remember that you have to clear up the Offset variable everytime.
 
Level 6
Joined
Nov 10, 2006
Messages
181
I just briefly scanned it through and you shouldn't use that terrain deformation, I ran a test from some of my spells that had a terrain deformation and I spammed it 20 times at a go and it lagged like mad and the terrain went off.
 
Level 17
Joined
Mar 17, 2009
Messages
1,349
Ok I'm not gonna go for a full review now, since the whole thing is slightly spammed and could be improved critically...

This is totally unnecessary:
  • Spell Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- These have to be set at map start, otherwise they are Initially ZERO --------
      • -------- Used in Alien Spawn trigger --------
      • Set SpawnTimer1 = 5
      • Set SpawnTimer2 = 3
      • Set SpawnTimer3 = 2
Instead, here's what you do:
  • Spell Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Drop Ship
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Level of Drop Ship for (Triggering unit)) Equal to 1
              • (Level of Drop Ship for (Triggering unit)) Equal to 2
        • Then - Actions
          • Set SpawnTime[DS_CastNO] = ((Level of Drop Ship for (Triggering unit)) + 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Drop Ship for (Triggering unit)) Equal to 3
        • Then - Actions
          • Set SpawnTime[DS_CastNO] = ((Level of Drop Ship for (Triggering unit)) + 2)
        • Else - Actions
      • -------- Set the caster for Whom to do damage upon the ships crash. --------
      • Set Caster[DS_CastNO] = (Triggering unit)
      • -------- First let's set the level of the Ability being cast, so that we can determine what Units will spawn later. --------
      • Set DS_Level[DS_CastNO] = (Level of Drop Ship for (Triggering unit))
      • -------- Next we set the Target Point of the spell to remove the leak. --------
      • Set TargetPoint[DS_CastNO] = (Target point of ability being cast)
      • -------- Create the Fallin Dropship and add an Expiration timer to it, The timer is set to make the ship Die when it hits the ground. --------
      • Unit - Create 1 Drop Ship for (Owner of (Triggering unit)) at (TargetPoint[DS_CastNO] offset by 500.00 towards 45.00 degrees) facing TargetPoint[DS_CastNO]
      • Unit - Add a 4.40 second Generic expiration timer to (Last created unit)
      • -------- Set the Drop ship under the Cast Number as a variable, to determine Ownership later. --------
      • Set DropShip[DS_CastNO] = (Last created unit)
      • -------- Change the Cast Number for new ownership to the next caster. --------
      • Set DS_CastNO = (DS_CastNO + 1)
      • Unit - Cause (Triggering unit) to damage circular area after 4.40 seconds of radius 500.00 at TargetPoint[DS_CastNO], dealing 20.00 damage of attack type Siege and damage type Fire
      • -------- Turns the Action Triggers on --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Spell Action <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Spell Action <gen>
          • Trigger - Turn on Alien Spawn <gen>
        • Else - Actions
And then, instead of having all those: If/Then/Else for each single level, you simply do the actions once and use the new variable "SpawnTime[DS_CastNO]".

An why all this:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Number of units in (Units of type Crashed Ship (Level 1))) Equal to 0
    • Then - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units of type Crashed Ship (Level 2))) Equal to 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in (Units of type Crashed Ship (Level 3))) Equal to 0
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in (Units of type Drop Ship)) Equal to 0
                • Then - Actions
                  • Set DS_CastNO = 0
                  • Custom script: call DestroyGroup (udg_ShipGroup1)
                  • Trigger - Turn off (This trigger)
                  • Trigger - Turn off Alien Spawn <gen>
                • Else - Actions
            • Else - Actions
        • Else - Actions
    • Else - Actions
Instead of this:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Number of units in (Units of type Crashed Ship (Level 1))) Equal to 0
      • (Number of units in (Units of type Crashed Ship (Level 2))) Equal to 0
      • (Number of units in (Units of type Crashed Ship (Level 3))) Equal to 0
      • (Number of units in (Units of type Drop Ship)) Equal to 0
    • Then - Actions
      • Set DS_CastNO = 0
      • Custom script: call DestroyGroup (udg_ShipGroup1)
      • Trigger - Turn off (This trigger)
      • Trigger - Turn off Alien Spawn <gen>
    • Else - Actions
Other things to mention, is that when the ship is close to the ground, it's motion gets really weird.

In my opinion, you shouldn't automatically kill the units, but instead, create three, once one dies you create another... ;)


Guishiu, now what you gotta do is learn how to minimize number of actions in a trigger as much as possible by learning how to use equations for level-related issues; random examlpe:
Set UnitsToBeSpawned[Index] = Power(Level of Ability, 2) + 2

This would allow spawning then 3 units at level 1, 6 at level 2, 11 at level 3, 18 at level 4 and etc...

Practice on such mathematical equations :)
 
Last edited:
Level 8
Joined
Apr 7, 2008
Messages
176
Ok, thanx man.

BUT, the Init trigger cant be put into the cast trigger, it would reset my timers evertime someone cast the spell.
I already thought about doing it that way.

And that condition for turning off the triggers... I am not sure how those work. I have seen people use them as a "If any conditions are met" sort of thing. So I just keep away from them.

And the math isnt new to me, I can write equations easily. =D
I HATE math but I LOVE science, and they tell me I cant have science without math, So im stuck with it. :(
 
Level 31
Joined
May 3, 2008
Messages
3,155
You are getting better and better, a bit more knowledge in optimization and I have no doubt you could advance to JASS.

At the Ship Death trigger, you could set it this way.

  • Ship Death
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • -------- This is here because otherwise when a ship is killed, it isnt actually REMOVED from the game and units are still spawned. --------
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Multiple ConditionsOr - Any (Conditions) are true
              • Conditions
                • (Unit-type of (Triggering unit)) Equal to (==) Crashed Ship (Level 1)
                • (Unit-type of (Triggering unit)) Equal to (==) Crashed Ship (Level 2)
                • (Unit-type of (Triggering unit)) Equal to (==) Crashed Ship (Level 3)
          • Then - Actions
            • Unit - Remove (Triggering unit) from the game
          • Else - Actions
At here, I notice you got offset leak.

  • Unit - Create 1 Drop Ship for (Owner of (Triggering unit)) at (TargetPoint[DS_CastNO] offset by 500.00 towards 45.00 degrees) facing TargetPoint[DS_CastNO]
The right solution is to make another variable to store the offset such as this example below.

  • Set OffSet = (TargetPoint[DS_CastNO] offset by 500.00 towards 45.00 degrees)
Also, special effect leak. You need to remember that.

Once the offset and special effect was fix along with some optimization. This resources is as good as 3/5 (Useful).

I HATE math but I LOVE science, and they tell me I cant have science without math, So im stuck with it. :(

What to do, maths is too important and almost in our daily lives.
 
Level 8
Joined
Apr 7, 2008
Messages
176
You are getting better and better, a bit more knowledge in optimization and I have no doubt you could advance to JASS..

Hey, thanx for the support! =D
I get what you're saying about the Off Functions, and thanx for spotting the leak. I knew I was missing something, just couldnt focus. Working on a Perpetual Motion Machine right now. I'm still in testing phase (In my head) but after a couple of live tests it should be ready to change the world!!

What to do, maths is too important and almost in our daily lives.

Yea yea, Oh and im looking at vJASS right now. =D
New Gen WE makes it WAY easy!!


*Update* Updated it.
 
Level 31
Joined
May 3, 2008
Messages
3,155
get what you're saying about the Off Functions, and thanx for spotting the leak.

Forgot to tell you, the rest of your action with offset leak.

no one has gone there before now.

Not really, I have seen it before. It just that it was rejected due to violation and poor quality.

Yea yea, Oh and im looking at vJASS right now. =D

Good luck to you, vjass isn't easy. Jumping from GUI to VJASS was a bad idea. I do it, I knew it.. :p

Recommend you to start from jass first.

But unfortunately not much can be done without it involving a ship of some sort. :(

You can if you think outside the box.
 
Level 8
Joined
Apr 7, 2008
Messages
176
Ok, yea u meant the Action trigger that moves the falling ship. Fixed it now.

But yea since I dont know the difference in Jass and vJass, the difficulty of jumping straight to vJass is lost on me. =D At this point it's about where GUI was when I made the Piccolo Grow spell. LOL


You can if you think outside the box.

You kidding? I LIVE outside the box. :mwahaha:

OK!! GOING TO WATCH TRANSFORMERS 2!! TTYAL
 
Level 8
Joined
Apr 7, 2008
Messages
176
FireLord213?? And i saw the RED gem as unique, still sort of wish i had it. :(
But thanx for the approval guys.

Updated again. :D

********************************************************8
December 14 ***************
*********************************************************
So my wife go tired of me playing Dragon Age on my PS3 too much and now im bored and decided to see whats happening here.
I removed the special effect since it leaked. I dont feel its worth my time and dedication to keep it around.
Also i have no idea how the Spawn Trigger could be shortened. I tried and tried multiple ways to make it work, the way i got it to work seemed like genius to me then and seems like ULTRAMEGASUPERGENIUS to me now. :p

Oh, and i thought i was using ARRAYS. that's what allowed me to make my spells MUI isnt it?
But as far as that code being too long... its only as long as need be for it to spawn units for mulitple levels of the spell. So with the removal of the leak, it should be suitable for approval now.
 
Last edited:
Top