• 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 with a few spell ideas

Status
Not open for further replies.
Level 5
Joined
Jan 6, 2005
Messages
137
Greetings i've recently been playing with a few ideas for spells i'd love to be able to make, yet lack the abilities and/or knowledge to do so.
I'd be delighted if any of these spell ideas are met with a solution and i'm sure some of you guys will find these laughably easy to do.

Also, please note that Variables is a very weak point in what i CAN do, i guess i haven't used them enough, so if such are included (They most likely will be, please explain what kind of variable you chose for what, thank you)


CoH morph:

I'd like one of my heroes to have a CoH(Chance on Hit) ability that when cast/triggered turns him into a more powerfull version of this hero for a short period of time, and then returns to normal.
This new version will of course have to work exactly as if it was the orignal hero, as it is supposed to be the hero transformed, with this i mean, level, spells, items are to remain the same.
However the spell triggered the transformation is of course to be gone untill the hero is back to orignal form.



CoH shadowstrike:

Yet another CoH based idea, and i've seen this before.
I'd like to have an ability that when cast/triggered creates a dummy(shadow)
to strike the target of the casting/abillity possessing hero, damaging fx 100%, 200%, 300% of the orginal hero's damage.
After one strike the shadow will then have to disapear again of course.



Flashy spells:

I realize this may come off as a slightly less serious idea and basic it's a request on to how to make spells such as, a light circling a hero, shooting fire at enemies nearby works. Bare in mind that i do not actully wish to create this very spell, but wish to learn and understand the basics of such spells, but do feel free to use this spell as an example, so that we both know what we are talking about.



Shackwave/teleport:

A simple one i'd think... A shockwave based spell that works as a teleport the same time, the caster disapearing when casting, reapearing at the waves ending point,
i've seen alot of these and they all seem to work for great fun.
The stats/buffs for the ability may be freely changed when explaining how to, fx. Feel free to cause units hit to be knocked back, stunned, buffed ect.



And Lastly...


Damage and heal:

A powerfull attack intented to kill the targeted enemy, as if it does not, it is supposed to heal the enemy backup to its orignal hp(health points) value, now this may also grant the targeted enemy a positive buff if surviving the strike if possible.
And yes i have tried altering both Shadowstrike and Breath of fire, using negative values for the damage over time, however did not work.
(I thought this idea was somewhat just slightly orignal)
 
Level 9
Joined
May 27, 2006
Messages
498
1. Create a dummy ability based on critical strike, that have no chance for crit, but have description, that read what`s the chance to morph.
Variables:
MorphChance - Integer type variable
  • CoH Morph
    • Events:
      • Unit - A unit is target of attack
    • Conditions:
      • (Attacking unit) equal to YourHero (remove this line if the ability can be used by heroes of different type)
      • Level of YourCritChanceBasedAbility for (Attacking unit) does not equal 0
    • Actions:
      • Set MorphChance to (Random integer number between 1 and 10)
      • If Then Else - Multiple functions
        • If - Conditions
          • MorphChance equal to (Level of CoHMorph for (Attacking unit))
        • Then - Actions
          • Unit - Add Morph (demon hunter`s ulti) to (Attacking unit)
          • Unit - Order (Attacking unit) to (Night Elf - Demon Hunter - Metamorphosis)
          • Unit - Remove Morph from (Attacking unit)
        • Else - Actions
Im not sure if this will work, removing morph before effect ends may cause some problems...

2.
Variables:
TempPoint - Point type variable
  • CoH Shadowstrike
    • Events:
      • Unit - A unit takes damage
    • Conditions:
      • Level of YourCritChanceBasedAbility for (Attacking unit/Damage source) does not equal 0
    • Actions:
      • Set TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 dummy for (Owner of(Attacking unit/Damage source)) at TempPoint facing (any) degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Unit - Cause (Last Created unit) to damage (Triggering unit) dealing ((Damage Taken) * 1 [or 2/3/whatever])
      • Unit - Add a 5 second generic expiration timer to (Last Created unit)
3. Dunno what you mean.. Explain more, plz

4. Just make your shockwave and then this simple trigger:
Variables:
TempPoint - Point type variable
  • Shockwave Teleport
    • Events:
      • Unit - A unit starts effect of ability
    • Conditions:
      • (Ability being cast) equal to (YourAbility)
    • Actions:
      • Set TempPoint = (Target point of (Ability being cast))
      • (Add any wait-actions if you want to teleport the caster after some time)
      • Unit - Move (Triggering unit) instantly to TempPoint
      • Custom script: call RemoveLocation(udg_TempPoint)
5. Create your shadowstrike ability, modify it to deal the start damage what you want, but set the damage over time to 0, then make these triggers:
NOTE THAT THIS SPELL IS NOT MUI
Variables:
TargetUnit - Unit type variable
  • Heal unit init
    • Events:
      • Unit - A unit is starting effect of an ability
    • Conditions:
      • (Ability being cast) equal to (YourShadowStrikeAbility)
    • Actions:
      • Set TargetUnit = (Target unit of ablity being cast)
      • Trigger - Turn on Heal unit <gen>
  • Heal unit
    • Events:
      • Time - Every 1 second of game time
    • Conditions:
      • (TargetUnit) have buff (YourShadowStrikeAbilityBuff)) equal to TRUE
    • Actions:
      • Set life of (TargetUnit) to (Life of (TargetUnit) + (Max life of (TargetUnit) / 100)) [this will cause units to regenerate 1% of their hp, set it to more to decrease the % healed]
 
Level 3
Joined
Oct 23, 2007
Messages
36
Before I start, it helps if you are highly specific when asking for how to do something, because there are usually a couple of ways to do it. anywho...

CoH Morph:If you do not mind the icon for the ability showing up when the ability is used, then use this trigger.
  • CoH morph
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Mountain King
      • (Random integer number between 1 and 100) Less than 20
    • Actions
      • Unit - Remove Chemical Rage from (Triggering unit)
      • Unit - Add Chemical Rage to (Triggering unit)
      • Unit - Order (Attacking unit) to Neutral Alchemist - Chemical Rage
      • Wait until (((Attacking unit) has buff Chemical Rage) Equal to True), checking every 0.20 seconds
      • Wait until (((Attacking unit) has buff Chemical Rage) Equal to False), checking every 0.20 seconds
      • Unit - Remove Chemical Rage from (Triggering unit)
This will add the ability to the unit, activate it, then remove it. I included the first "Remove Ability" so it will reset the cooldown if the ability is triggered while in a rage. If you don't want the icon to show up, then do some research on "disabled spellbook". There are plenty of tutorials on how to use it.

CoH Shadowstrike: since triggering the damage would be difficult (it's complicated to get a hero's adjusted damage), I create a dummy unit to cast the wand of illusion on the hero (make the ability cause the illusion to deal 100% damage), and give the illusion a bloodlust or roar buff to increase the dmg of the illusion by a %. Order the illusion to attack, wait 1 second, then kill it.

Flashy Spells: Most flashy spell use the line
  • Special Effect - Create a special effect at (Center of (Playable map area)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
then alot of math.
If you are creating effects in a circle, you would use a loop like this
  • For each (Integer A) from 1 to 90, do (Actions)
    • Loop - Actions
      • Special Effect - Create a special effect at ((Center of (Playable map area)) offset by 256.00 towards (Real((Integer A))) degrees) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
Which would create a circle in one flash. The majority of these effects require some trig and geometry, since they are just highly structured "create this special effect, then destroy it"

Shockwave/Teleport: I'll let someone else tackle that for now

Damage and Heal: I'm going to use the heals are static (X amount of hp healed) as opposed to dynamic (X% of hp healed). If this is the case, you can just cast rejuvenation at the time of spellcast. Also, you can heal a unit just with triggers. Just keep setting the unit's life higher at periodic times.

If you need more explanation on those feel free to ask.
 
Level 5
Joined
Jan 6, 2005
Messages
137
Thanks

Thank you so far, the morphing should work, as should the damage/heal, however i do have a few questions.
The shadowstrike im not sure.. but i'll try it

To the shockwave solution;
This would indeed teleport the hero, however on a timer that might not always fit the wave.
Also, the hero will appear at the targeted area rather than at the actual end of the wave.


On the "flashy" spells ,please do phrase it a little clearer, i realize that you did show what "to do", though, that angle thing... well, it's still somewhat unclear to me, however, thank you.
 
Level 5
Joined
Jan 6, 2005
Messages
137
Also, in many of your triggers you use A trigger Much like "if level of <Specific ability> is less than equal to 0"; I realize this is to prevent the trigger to trigger when the ability is not yet learned, however, i can't seem to make it myself
 
Level 3
Joined
Oct 23, 2007
Messages
36
  • For each (Integer A) from 1 to 360, do (Actions)
  • Loop - Actions
  • Special Effect - Create a special effect at ((Center of (Playable map area)) offset by 256.00 towards (Real((Integer A))) degrees) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl)
I made a typo in this, it should be "For each (Integer A) from 1 to 360" instead of "For each (Integer A) from 1 to 90".

At any rate, I used the command for "point at polar offset", so that you give a point, distance from point, and an angle, and it gives another point. I keep the distance the same, but include all angles from 0 to 360. Every time it goes through the loop, you can reference the number of times it has gone through the loop, using the integer (Integer A). I have to convert this integer into a real since angles are real numbers.

So the first time through the loop, it finds the center of the map, and goes 256 in the 0 degree angle. The next loop it does the same thing but goes 256 in the 1 degree angle until it hits 360 (a full circle).

Like I said, the majority of it is math. So Imagine taking a piece of paper, a ruler, and a protractor. Now draw a point that will represent the (center of playable map). Next draw another point 2 inches (5 cm) to the right, where the horizontal line is. Now draw another point 2 inches but at 1 degree instead of 0 degrees. Keep doing this every degree until you hit 360 degrees. The result is a circle, which is what the special effects would give.
 
Level 5
Joined
Jan 6, 2005
Messages
137
Thank i'll look into that when i'm done with my current work ;)

Another question, the damage/heal thing works, and it works perfectly, as does the shadowstrike thing, i managed to apply levels by myself, however, with the damage/heal thing, i'd like the hero who casts the spell is healed the amount of damage the spell deals if the target does die, or if possible, even better if the hero is healed the amount of damage the spell does to the target(aka for how hp it had before dying)
 
Level 3
Joined
Oct 23, 2007
Messages
36
Copy and paste this into your map, then cast war stomp with a tauren chieftain.
  • Circle Stomp
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to War Stomp
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set Point[0] = ((Position of (Triggering unit)) offset by 150.00 towards ((Real((Integer A))) x 36.00) degrees)
          • Special Effect - Create a special effect at Point[0] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
          • Custom script: call RemoveLocation(udg_Point[0])
I think you are overcomplicating this in your mind. This will create 10 stomp special effects in a circle. Fiddle with the code (change some numbers and the effect) and you will probably start to pick it up.

P.S. You can edit previous posts. Please refrain from double posting.
 
Level 5
Joined
Jan 6, 2005
Messages
137
Thanks...

Thank you but.. i can't directly copy this.. only look at it and find the similar triggers, aand i cant find atleast some of them, fx that offset one, i can find an offset, but that integer *36 or something... where is that?
 
Level 9
Joined
May 27, 2006
Messages
498
Another question, the damage/heal thing works, and it works perfectly, as does the shadowstrike thing, i managed to apply levels by myself, however, with the damage/heal thing, i'd like the hero who casts the spell is healed the amount of damage the spell deals if the target does die, or if possible, even better if the hero is healed the amount of damage the spell does to the target(aka for how hp it had before dying)

So, for example, hero with 500hp casts the shadowstrike ability on a unit, that have 200hp. Shadowstrike deals initial damage 300, so unit dies. And the casting hero is healed for this 200hp, the target unit had, that`s your point? If yes, this would be:

  • Heal unit init
    • Events:
      • Unit - A unit is starting effect of an ability
    • Conditions:
      • (Ability being cast) equal to (YourShadowStrikeAbility)
    • Actions:
      • Set TargetUnit = (Target unit of ablity being cast)
      • If (Integer((Life of (TargetUnit)))) less than ([some amout which when multiplied by lvl still fills your ability damage] * (Level of ShadowstrikeAbility for (Triggering unit))) then do (Skip remaining actions) else (Do nothing)
      • Trigger - Turn on Heal unit <gen>


@Up
You go to offset by creating a place. Change from (Center of playable map area) to (Point with polar offset). Then just fit the numbers...

The Integer A thing is not bound to any trigger group (like Unit, Special Effect, Cinematic, etc..). Dont know how to explain that with words, ill submit an image in a while...

EDIT:
Added the image (paint-made xD)
 

Attachments

  • image.bmp
    650.4 KB · Views: 108
Last edited:
Level 5
Joined
Jan 6, 2005
Messages
137
Hmm

I'm not sure the heal system will work as i have in mind.. it's possible though.. i'll try, now again, i can't find this life of unit thing under the boolean conditions, please again, direct me :), and i'd be very glad if you could upload that image :)

also, I'm so gratefull you guys are helping me here, means alot to me :)



oooh well i did find that one, but its at
"Set Point[0] = ((Position of (Triggering unit)) offset by 150.00 towards ((Real((Integer A))) x 36.00) degrees)" I cant find the "((Real((Integer A))) x 36.00) degrees)" part

also, about the healing, cant find
"If (Integer((Life of (TargetUnit)))) less than ([some amout which when multiplied by lvl still fills your ability damage] * (Level of ShadowstrikeAbility for (Triggering unit)))"
 
Last edited:
Level 3
Joined
Oct 23, 2007
Messages
36
Here, I made a demo map. Just run it and cast the spells the units currently have. From there go to the code and change numbers or effects and you'll start to understand. If that doesn't help, well, I don't know what to do.
 

Attachments

  • Flashy Spell Effects.w3x
    10.4 KB · Views: 93
Level 3
Joined
Oct 23, 2007
Messages
36
Here, I made a demo map. Just run it and cast the spells the units currently have. From there go to the code and change numbers or effects and you'll start to understand. If that doesn't help, well, I don't know what to do.

NOTE: Server messed up and reposted this twice.
 
Level 9
Joined
May 27, 2006
Messages
498
(...) i can't find this life of unit thing under the boolean conditions, please again, direct me :) (...)

The life thing is in Integer Comparison, and is selectable after Coversion - Convert Real to Integer ;P

(...) I cant find the "((Real((Integer A))) x 36.00) degrees)" part (...)

Just do the convertion (Integer to Real) and choose the Integer A thing.

also, about the healing, cant find
"If (Integer((Life of (TargetUnit)))) less than ([some amout which when multiplied by lvl still fills your ability damage] * (Level of ShadowstrikeAbility for (Triggering unit)))"

Thats just a complicated equation, like "2 + 2 = 4" or "a > b". There is Convertion - Convert Real to Integer, next you just choose the "less than" ("<") thing. In the square brackets i wrote, you have to put an universal number, that when multiplied by level of ability still fills its damage. Example: abilitie`s damage are: lvl 1 - 100 dmg, lvl 2 - 200 dmg, lvl 3 - 300 dmg, etc... So in the square brackets you put 100. Then you choose the "multiply" option (the star *). Next just find the level of ability for unit (its found in Real, so you`ll possibly have to do the convertion once again).

Hope you understand now? If not, feel free to ask xD
 
Level 5
Joined
Jan 6, 2005
Messages
137
Sorry for double posting but just wanted you two atleast to test the ones i've made, the blademasters already learned ability is not done, but the effect is what i want, plus it deals damage.
One thing though, can i add so only enemy units take damage from the spell, considering i use a damage trigger to apply the damage?, just look the trigger called "test" to find it :)

Also, try to Shadow Warders spells...
Feel free to come with suggestions to improve in any way.
 

Attachments

  • g.w3x
    392.2 KB · Views: 64
Level 12
Joined
Aug 20, 2007
Messages
866
Sorry I Skipped

Yeah walls of text scare me :eek:

I actually made a shockwave/tele spell you can study all you'd like
It's a little complicated, but you can take all the time you'd like

As for the metamorphosis, you could trigger it so it is exactly how you want it

If you don't need to make him completely change models, I suggest using vertex coloring

I made another map that had a pretty decent effect on the unit's appearance without changing the model file

PLEASE NOTE: Neither of these spells have been approved on THW, so there are a few leak errors and such, but the spells themselves work fine :thumbs_up:
 

Attachments

  • LightningTele.w3x
    17.1 KB · Views: 43
  • MutilationAugmentTESTING.w3x
    32.5 KB · Views: 54
Level 5
Joined
Jan 6, 2005
Messages
137
Thanks!

Thanks alot!, that was exactly what i was looking for ;), i'll learn from your map, works beautifully, please check the one i put in my last post and come with suggestios of improving the spells i'vemade for the shadowarder if you want :)

Edit;
hehe now that i see the triggers.. i doubt i'll redo those.. making 5 levels of that spell will take my whole life xD
 
Level 12
Joined
Aug 20, 2007
Messages
866
You remind me of myself

Yeah I took a look at your map

Great job on the terrain :thumbs_up:

It looks as if you would really like to learn how to make maps

All you need to do is practice, over and over, until you understand all the functions and such

One thing that could help you sh*tloads is

Fors
- They say either "For Each Integer A", "For Each Integer B", or "For Each Integer Variable"

All of those are loops, this is how they work:

First They set a variable (Depending on which one you picked, if you picked "For Each Integer A" then it is "Integer A", "For Each Integer B" it is "Integer B", "For Each Integer Variable" it will be the variable you made for yourself.
  • Help
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
      • For each (Integer B) from 1 to 10, do (Actions)
        • Loop - Actions
      • For each (Integer VARIABLE) from 1 to 10, do (Actions)
        • Loop - Actions
      • For each (Integer A) from 1 to 10, do (Do nothing)
      • For each (Integer B) from 1 to 10, do (Do nothing)
      • For each (Integer VARIABLE) from 1 to 10, do (Do nothing)

Here is what they look like in GUI
You should only use the "Multiple Actions" one, because it is waaaaaaaaaaay easier to do, and will do exactly the same thing if you do it with only one


The variable is set to the first number, or the "LoopStart"
  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions

For reference: "Looping Variable" = (Integer A)
"LoopStart" = 1
"LoopEnd" = 10

This one, sets the variable at 1, for the start

Second - Now begins the loop, the computer will now "loop" as in continually do the same action, until it is told to stop
If nothing tells it to stop, it runs into an infinite loop, like pi
Eventually crashing your computer

In order to know when to stop, you must set the "LoopEnd",
Now what happens, is the computer sets your variable to "LoopStart", or in this case 1, it will run the entire loop of actions, and then, at the very end set your variable to itself + 1

What that does, is allows the computer to do, is know exactly how many times the loop has looped

In order to end the loop, the computer checks to see if your variable, or in this case "Integer A" is equal to the "LoopEnd" number, which is 10 for this one

During the loop, you can refer to your variable, in order to use it
This is extremely useful in triggers such as this one

  • Spawn
    • Events
      • Time - Every 45.00 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Footman for (Player((Integer A))) at Point_Array[(Integer A)] facing Default building facing degrees

As opposed to

  • Spawn Copy
    • Events
      • Time - Every 45.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at Point_Array[1] facing Default building facing degrees
      • Unit - Create 1 Footman for Player 2 (Blue) at Point_Array[2] facing Default building facing degrees
      • Unit - Create 1 Footman for Player 3 (Teal) at Point_Array[3] facing Default building facing degrees
      • Unit - Create 1 Footman for Player 4 (Purple) at Point_Array[4] facing Default building facing degrees
      • Unit - Create 1 Footman for Player 5 (Yellow) at Point_Array[5] facing Default building facing degrees
      • Unit - Create 1 Footman for Player 6 (Orange) at Point_Array[6] facing Default building facing degrees
      • Unit - Create 1 Footman for Player 7 (Green) at Point_Array[7] facing Default building facing degrees
      • Unit - Create 1 Footman for Player 8 (Pink) at Point_Array[8] facing Default building facing degrees
      • Unit - Create 1 Footman for Player 9 (Gray) at Point_Array[9] facing Default building facing degrees
      • Unit - Create 1 Footman for Player 10 (Light Blue) at Point_Array[10] facing Default building facing degrees
      • Unit - Create 1 Footman for Player 11 (Dark Green) at Point_Array[11] facing Default building facing degrees
      • Unit - Create 1 Footman for Player 12 (Brown) at Point_Array[12] facing Default building facing degrees

Which one is easier to read, write, and doesn't look like ass???
Thats right, the loop
It makes your life much easier

If you'll notice the "Point_Array" that would bring me to my next point, arrays, you have probably seen them before, and they are useful in loops

I won't talk about those much (this isn't a tutorial)

When your variable finally reaches the "LoopEnd", it will stop the loop, it won't reset your variable, but when you start the loop again, the initial "set (variable) = "LoopStart", will set it to what you want

All of this stuff happens in the computer, where you can't see it
If you would like to know what it does that you can't see, learn JASS,
But at your level I highly suggest not even trying

Here are some more examples of Fors

  • Pointless
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Special Effect - Create a special effect at (Center of (Playable map area)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)

This one would've taken hours to do without loops
  • IntegerIsUsed
    • Events
      • Time - Elapsed game time is 5.00 seconds
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Footman for (Player((Integer A))) at Point_Array[(Integer A)] facing Default building facing degrees
          • Unit - Create 1 Knight for (Player((Integer A))) at Point_Array[(Integer A)] facing Default building facing degrees
          • Unit - Create 1 Flying Machine for (Player((Integer A))) at Point_Array[(Integer A)] facing Default building facing degrees
          • Unit - Create 1 Mountain King for (Player((Integer A))) at Point_Array[(Integer A)] facing Default building facing degrees
          • Unit - Create 1 Spell Breaker for (Player((Integer A))) at Point_Array[(Integer A)] facing Default building facing degrees
      • For each (Integer B) from 1 to 12, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Footman for (Player((Integer B))) at Point_Array[(Integer B)] facing Default building facing degrees
          • Unit - Create 1 Knight for (Player((Integer B))) at Point_Array[(Integer B)] facing Default building facing degrees
          • Unit - Create 1 Flying Machine for (Player((Integer B))) at Point_Array[(Integer B)] facing Default building facing degrees
          • Unit - Create 1 Mountain King for (Player((Integer B))) at Point_Array[(Integer B)] facing Default building facing degrees
          • Unit - Create 1 Spell Breaker for (Player((Integer B))) at Point_Array[(Integer B)] facing Default building facing degrees
      • For each (Integer VARIABLE) from 1 to 12, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Footman for (Player(VARIABLE)) at Point_Array[VARIABLE] facing Default building facing degrees
          • Unit - Create 1 Knight for (Player(VARIABLE)) at Point_Array[VARIABLE] facing Default building facing degrees
          • Unit - Create 1 Flying Machine for (Player(VARIABLE)) at Point_Array[VARIABLE] facing Default building facing degrees
          • Unit - Create 1 Mountain King for (Player(VARIABLE)) at Point_Array[VARIABLE] facing Default building facing degrees
          • Unit - Create 1 Spell Breaker for (Player(VARIABLE)) at Point_Array[VARIABLE] facing Default building facing degrees
Ok, well that covers "Fors"
PLEASE NOTE You must set variable arrays using an initialization trigger, I might make a GUI tutorial to cover all this sh*t, I probably won't

Pick Every Unit in Unit Group - These are loops that work similar to integer loops, but use units as their variables

First - You must set the unit group that the computer will be looping through

There are two ways to do it:

  • IntegerIsUsed
    • Events
    • Conditions
    • Actions
      • Set A_Unit_Group = (Units currently selected by Player 1 (Red))
      • Unit Group - Pick every unit in A_Unit_Group and do (Actions)
        • Loop - Actions

This sets a variable to the unit group

  • IntegerIsUsed
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Actions)
        • Loop - Actions

This one uses the unit group directly

Second - The computer will pick a unit from the unit group, and run all the actions, referring to the picked unit literally as "Picked Unit"

When the computer has cycled through all the units, it will stop

I'm not 100% how, but that is what it does

Loops are infinitely useful, in many many ways, as well as extremely flexible, there are many functions to set unit groups

I'm way too lazy to go into too much detail with the rest, but if you master the loops, it will make your triggering 10000000000000000000x faster

Btw: I made the Mutilator spell in 2 days :wcool:

[Here is what I *think* the computer does when you cycle through a unit group, it randomly picks a unit, adds it to a generated variable (like Integer A, or B) and then runs all the functions, then removes the unit from the original unit group, so it doesn't randomly reselect it, and then adds that unit to the generated group. After it cycles all the units out, the loop ends, it resets the original variable to the generated group, and then destroys the generated group]
 
Level 12
Joined
Aug 20, 2007
Messages
866
if you'd like

I could make the spells that you wanted, and make it really easy to edit, so you can just import them into your map

Just let me know
 
Level 5
Joined
Jan 6, 2005
Messages
137
If you tested my heroes you'd note that the mian part of my requested spells are on the Shadow Warder allready.. didn't read the full long post yet, as i'm going to bed, but i do get the point with 1-12 variable instead of doing each single one.. however, i did those as the first function after finishing terrains (and thhanks for that btw :) ), and i finally instood how usefull variables are xD; Hehe, anyway, thanks ,i'll send a new version your way soon if you want?
 
Level 12
Joined
Aug 20, 2007
Messages
866
That'd be Great

Yeah, I could give you hints and tips on your triggers when you finish 'em :thumbs_up:
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
By the way, didn't really have the spirit power (lol) to read all this thread because im really tired, but I did notice your solution of the Shockwave/Teleport spell is not good.

Shockwave is a spell that has a certain range that is NOT based on the target point.

If the player would cast it say, exacly near his unit, it will hardly teleport at all even if the shockwave will end 1000 of him or so.

So for this you will need to make something like this (also added a wait like you need [Warning] this makes this non MUI trigger !)

  • Naga Pwnz
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shockwave
    • Actions
      • Set Point[0] = (Position of (Triggering unit))
      • -------- Instead of 1000, put the maximum range of your shockwave --------
      • Set Point[1] = (Point[0] offset by 1000.00 towards (Angle from Point[0] to Point[1]) degrees)
      • -------- The first 1000 would be the shockwaves speed --------
      • -------- The second 1000 would be the point where the shockwave would end --------
      • -------- You could say "so why didn't you just type 1 second", but this is only to show you how the math part of the wait is supposed to work --------
      • Wait (1000.00 / 1000.00) seconds
      • Unit - Move (Triggering unit) instantly to Point[1]
      • Custom script: call RemoveLocation(udg_Point[0])
      • Custom script: call RemoveLocation(udg_Point[1])
 
Level 5
Joined
Jan 6, 2005
Messages
137
bug in this... he'll look at the shockwave while it runs through the ground, he's supposed to like "be" the wave, therefore disapear as it's launched, else this'll work nicely.

Now, i have a question, for some reason my "dreamer" hero dosen't work as he should...

I have normal sleep spell, not using any triggers.
Then i have a nightmare spell that checks constantly if the target has sleep buff and if it dosent, the nightmare buff will be tkaen off.
Each second a target has the nightmare buff a trigger deals dmg according to lvl of the ability.
Now this works fine.. but

His "Ulti" if you will is a simple tweaking of warstomp, using sleep buff instead of stun, and a trigger to make them invournuable(sorry if misspelled), however, the nightmare buff gets removed from these targets and i'm sure it's the same buff, i don't understand this.
Also, the targets at supposed to become vulnerable after 15*ablity lvl seconds... but this dosen't happen either :(
 
Level 12
Joined
Aug 20, 2007
Messages
866
Hm

Try using different buff's for each spell

Usually when spells bug, it's due to their buffs/effects being used improperly
Try using the regular stun buff for the Ulti, just change the name etc. so it looks like sleep

For the second part, I would need to see the code
 
Level 5
Joined
Jan 6, 2005
Messages
137
No, that wouldnt work, because the trigger that allows for the damage buff only works with the sleep buff...

I'll put my newer version on this post so you can see for yourself, the spells in question are "sleep", "nightmare" and "sleep powder"

Only nightmare and sleep powder are using triggers, so see these, the trigger folders with matching names contains these and Startgame trigger turns off the neccecary triggers.
 

Attachments

  • Rage of Races.w3x
    885.6 KB · Views: 62
Level 12
Joined
Aug 20, 2007
Messages
866
I'll edit the triggers a bit, and send it back

I think I can fix the triggs up a bit, so that it works fine

I'll put it in my next post


Ugh, um, yeah compared to a map that I would make, I'd consider this extremely bugged up

It would take me hours, if not days, to fix all the stuff in this
Also, a bunch of systems to make all the spells you want MUI could take a while, sorry I couldn't fix much in 30mins

I couldn't really help you too much with the sleep spells, mostly because they are almost completely buff based, and I never use buffs because they can be extremely buggy and generally unpredictable

If I took a few hours out of my time to design a 3 spell system for that character, I would, but I have a sh*tload of stuff I gotta get done, sorry

This is what I got so far, but I don't think it works so well, as it's still based off the extremely buggy buffs
 

Attachments

  • Rage of RacesEDITED.w3x
    884.3 KB · Views: 98
Last edited:
Level 5
Joined
Jan 6, 2005
Messages
137
Mind if i ask why it's so bugged up?, merely because i used drawn out triggers dosen't mean that they're bugged, however i don't suggest that you're not right, however i'd like to know in what aspects, and most of the triggers are merely done to achieve their funtions, not to work at their best.
And yes the Sleep spells are buff based as i didn't see any other option to be honest, but please get back to me.

And another thing, as i read your message.
"Did wrong"... hmm... I realize you it's not your intention, but that is directly insulting, the fact that my triggers arent optimized does not mean that they're "wrong"; and perhaps instead of pointing out what is wrong, a solution is normally in order, and again, i do realize that you fixed the spawn, but doing so does not show me an actual solution, only how that thing is supposed to look, in my opinion you take for granted that i can read your mind, i'm not trying to be rude, but to critisize something i've worked on for quite a while now to harshly would be taken better if you'd take the time to atleast explain these things, and again, i know you wrote there are alot of "flaws" and i don't argue that, however, how am i to find flaw that i myself made i wonder?, however if you decide to respond (i truly hope you will) do so in a PM, as this has gone slightly offtopic :), Thank you

And again, i don't mean to be rude, if i did offend you i'm sorry, and please let me know in such case.
 
Status
Not open for further replies.
Top