• 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] Another spell review..

Status
Not open for further replies.
Level 4
Joined
May 27, 2012
Messages
60
I just finished another spell, I'm hoping this ones leakless, and fine the way it is.
Here we go.
I'm just posting these for learning purposes.
  • Soul Eater
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (==) Soul Eater (UL)
    • Actions
      • -------- Set Variables --------
      • Set SoulEaterAbpoint = (Target point of ability being cast)
      • -------- Special Effects --------
      • Unit - Create 1 SoulEaterDummy1 for Player 1 (Red) at SoulEaterAbpoint facing (Position of (Triggering unit))
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit - Create 1 SoulEaterDummy2 for Player 1 (Red) at SoulEaterAbpoint facing (Position of (Triggering unit))
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • -------- Damage --------
      • Unit Group - Pick every unit in (Units within 600.00 of SoulEaterAbpoint matching ((((Matching unit) is A structure) Equal to (==) False) and ((((Matching unit) is alive) Equal to (==) True) and (((Matching unit) belongs to an enemy of (Triggering player)) Equal to (==) True)))) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((Real((Level of (Ability being cast) for (Triggering unit)))) x (0.50 x (Real((Intelligence of (Triggering unit) (Include bonuses)))))) damage of attack type Spells and damage type Normal
          • Custom script: call RemoveLocation (udg_SoulEaterAbpoint)
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
  • Unit - Create 1 SoulEaterDummy1 for Player 1 (Red) at SoulEaterAbpoint facing (Position of (Triggering unit))
This causes a leak, you need to store the location into a variable first.
And, use (Owner of (Triggering Unit)) instead of "Player 1 (red)" so that every player could use the spell.

Also put this:
  • Custom script: call RemoveLocation (udg_SoulEaterAbpoint)
Outside the group loop.
 
Level 4
Joined
May 27, 2012
Messages
60
  • Unit - Create 1 SoulEaterDummy1 for Player 1 (Red) at SoulEaterAbpoint facing (Position of (Triggering unit))
This causes a leak, you need to store the location into a variable first.
And, use (Owner of (Triggering Unit)) instead of "Player 1 (red)" so that every player could use the spell.

Also put this:
  • Custom script: call RemoveLocation (udg_SoulEaterAbpoint)
Outside the group loop.

Thanks again, I'm trying to make sure the map won't lag out, and i'm also trying to learn how to make better trigger-enhancing spells.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Player 1 (Red) >>> TriggerPlayer

trigger enhancing spells is really hard for beginners, I suggest you look into the tutorials
and learn basic GUI, but dont waste too much time learning GUI, jump to learn JASS
immediately, coz there you can really enhance your spell...

A person with low knowledge on programming language can't even properly do GUI, how do you expect them to understand JASS that fast ?

If they have background knowledge on programming, that's fine, but what if that person is just a new person trying to learn triggers and stuff, he has to at least master GUI at about 80% of it and understand every possible problems and solutions

It's better for him to stick to GUI until he has learned a proper indexing or Hashtable, then go on for JASS :)
 
Level 4
Joined
Oct 20, 2011
Messages
129
A person with low knowledge on programming language can't even properly do GUI, how do you expect them to understand JASS that fast ?

If they have background knowledge on programming, that's fine, but what if that person is just a new person trying to learn triggers and stuff, he has to at least master GUI at about 80% of it and understand every possible problems and solutions

It's better for him to stick to GUI until he has learned a proper indexing or Hashtable, then go on for JASS :)

I have stuck to GUI for 6 years :goblin_jawdrop:
Can you show me somewhere to learn JASS?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I said...
I suggest you look into the tutorials and learn basic GUI, but dont waste too much time learning GUI, jump to learn JASS immediately,...
I did not say 'fast', and even without programming language, you can still
learn jass if you are willing to learn, have patience and time...
Jass editors such as JassNewGenPack and JassCraft has an auto fill information of all
those functions and arguments within that function, plus it is faster than GUI if coded properly...
 
Status
Not open for further replies.
Top