Tavern and Spell quetion

SFilip

Gone but not forgotten
Reaction score
634
maybe Player - Set Training/Construction Availability Of Unit would work here...first do a player pick and then make unit type of sold unit (assuming that your event is unit - sells a unit) unavailable for picked player.
as for the push back...its not so simple and it requires jass if you want it to be mui (which means that 2 units can cast the spell at the same time). so if you dont really need this, i suggest that you just skip making this.
 
R

R3velati0n

Guest
Code:
    Events
        Unit - A unit Sells a unit
    Conditions
        ((Sold unit) is A Hero) Equal to True
        (Unit-type of (Selling unit)) Equal to Tavern
    Actions
        Unit - Remove (Buying unit) from the game
:D
 
R

R3velati0n

Guest
Theres a jass spell tutorial on world-editor-tutorials website, try reading that.
Jass is so confusing :p
 

SFilip

Gone but not forgotten
Reaction score
634
why do you need this spell anyway?
 
R

R3velati0n

Guest
I tried it in a trigger and got this
Code:
Untitled Trigger 002
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to War Stomp
    Actions
        Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 750.00 at (Target point of ability being cast), dealing 100.00 damage of attack type Spells and damage type Normal
        Unit Group - Pick every unit in (Units within 750.00 of (Position of (Casting unit))) and do (Actions)
            Loop - Actions
                Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by (50.00, 50.00))
                Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl

Change the 50.00's to the distance you want to move them
Code:
Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by (50.00, 50.00))

I added this again because the effect went :confused:
Code:
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl

finally edit this to deal the right amount of damage
Code:
Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 750.00 at (Target point of ability being cast), dealing 100.00 damage of attack type Spells and damage type Normal

Try it, i dont know id its any good :p
 
R

R3velati0n

Guest
change this bit
Code:
Unit Group - Pick every unit in (Units within 750.00 of (Position of (Casting unit)) matching ((Owner of (Picked unit)) Not equal to (Owner of (Casting unit)))) and do (Actions)
loop - actions
 Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by (50.00, 50.00))
    Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
should work now :p
 

SFilip

Gone but not forgotten
Reaction score
634
pdts said:
for a map im making
figured that out...lol
but i mean...is it really necessary? is it some hero spell?

anyway that trigger is bad...first of all Unit - A unit Begins casting an ability is a bad event for that. use Unit - Starts the Effect Of An Ability instead.
also it leaks memory.
use special effect - destroy last created special effect right after you create it. it will show anyway and it wont leak memory.
you also need to store Position of (Casting unit), Position of (Picked unit) and Units within 750.00 of (Position of (Casting unit)) matching ((Owner of (Picked unit)) Not equal to (Owner of (Casting unit))) intro variables and destroy them afterwards. for more info on how to do this, search the forum for "leaks".
 

the Immortal

I know, I know...
Reaction score
51
Code:
Pushback
    Events
        Unit - A unit Starts the effect of ability
    Conditions
        (Ability being cast) Equal to War Stomp
    Actions
        Set TempUnitGroup = (Units within 250.00 of (Position of (Casting unit))) [b]matching[/b](((Owner of (Matching Unit)) is an enemy of (Owner of (Triggering Unit))) Equal to True)
        Unit Group - Pick every unit in TempUnitGroup and do (Actions)
            Loop - Actions
                Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by (50.00, 50.00))
                Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
                Special Effect - Destroy (Last Created Special Effect)
        Custom script: call DestroyGroup (udg_TempUnitGroup)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top