Custom spell issues...

Bananarama1

Member
Reaction score
3
Hey guys!

I'm making a custom triggered spell i thought of to see if it worked, and the base spell used is Channel. However, i gave the unit i wanted the spell, tested the map, clicked the research button and learned the spell on the unit, but it did not show up as an ability where the other abilities usually appear to once learned. It wasn't there at all after that. It DOES have a research and normal icon.

Whats wrong?
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
open the ability editor and select the channel ability.
go to:
data - options - visible
and check the box.

voila, working.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
actually this aint that obvious. this question is asked dozens of times in here.
 

Bananarama1

Member
Reaction score
3
I dont suppose you'd be able to help here, i've only just started the spell, but here it is:

Trigger:
  • lolfail
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Charge
    • Actions
      • Set ChargeCaster = (Casting unit)
      • Set ChargeTarget = (Target unit of ability being cast)
      • Unit - Set ChargeCaster movement speed to 5000.00
      • Unit - Order ChargeCaster to Move To (Position of ChargeTarget)
      • Unit - Turn collision for ChargeCaster Off


Edit: Oops, not done yet, 1 min

Edit2: That trigger does nothing at all except change the movement speed and turn off the collision, should the caster even attempt to move to the targetted unit?
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
first of all the max movement speed for every unit is 522.00 regardless of whatever you do.

for your trigger, try changing the event to "unit starts the effect of an ability" instead. Because when you "begin" to cast the ability no target is declared yet.

more over your trigger does leak a point variable. if you dont know what a "leak" is you should read one of the many turtorials around the forums. this for example.
 

Bananarama1

Member
Reaction score
3
:) Is there any way to make him go to that point at a faster speed than 522? Even if it isnt an order to move to. :thup:
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
a slide trigger.

if you dont know what they are its quite simple.

they run periodically with a short period of time like 0.01 - 0.05 and move a unit to another position. they basically look similar to this trigger:
Trigger:
  • Untitled Trigger 001
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set TmpPnt = (Position of MySlidingUnit)
      • Set SlidePoint = (TmpPnt offset by 5.00 towards (Facing of MySlidingUnit) degrees)
      • Unit - Move MySlidingUnit instantly to SlidePoint, facing (Angle from TmpPnt to SlidePoint) degrees
      • Custom script: call RemoveLocation (udg_TmpPnt)
      • Custom script: call RemoveLocation (udg_SlidingPoint)
 

Bananarama1

Member
Reaction score
3
Would that work with a unit as well? If you set the units location as a TempPoint?

Edit: Not sure how you would do that though. The one you showed was an instant cast spell (right?) and the one i'm making is unit targetted.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
actually that is what the trigger is doing:
Code:
Set TmpPnt = ([B]Position of MySliding[U]Unit[/U][/B])

There are 3 variables in use.
MySlidingUnit is a unit variable. it references to the unit which is sliding
TmpPnt is a point variable
SlidingPoint is a point variable as well

the trigger is setting TmpPnt to the position of MySlidingUnit.
now comes the tricky part, SlidingPoint is set to a location close to TmpPnt with a distance of 5 towards the facing of MySlidingUnit.
Finally MySlidingUnit is moved instantly to SlidingPoint.
Ingame MySlidingUnit would move with a speed of 5 per 0.01 seconds towards its own facing direction.

this trigger is however not the solution to your answer but it is the base of how your trigger would work.
 

Bananarama1

Member
Reaction score
3
I meant that as in, the target of the spell was a unit, instead of an instant cast spell like yours was. (So the casting unit (Sliding Unit) slides to the position of the targetted unit.

Edit: Nevermind, changed it to instant cast. There is only one problem left though. He slides awesomely, but he doesn't stop. Is there any way of making him stop after a set distance?
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
what i was showing was neither for a target nor a instant spell but only the slide trigger. the trigger which is activating the slide trigger determines whether the spell is instant or unit targeting.

does the spell have to be MUI / MPI? if it hasnt got to be MUI it is really easy and i can create it for you in a few seconds. but if it has to be MUI i cant sorry because my editor somehow got corrupted and i cannot use Hashtables untill i re-install warcraft. (hashtables are the best way to go to make this kind of spells mui)
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
This is a very simple and basic concept of the spell. its not MUI nor MPI but leakless and working properly.
its made upon 3 triggers which are:
Trigger:
  • Charge Activate
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to #Charge
    • Actions
      • Set ChargeCaster = (Triggering unit)
      • Set ChargeTarget = (Target unit of ability being cast)


Trigger:
  • Charge Loop
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
      • ChargeCaster Not equal to No unit
    • Actions
      • Set ChargePoint[0] = (Position of ChargeCaster)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (ChargeTarget is alive) Equal to True
          • (Current order of ChargeCaster) Equal to (Order(channel))
        • Then - Actions
          • Set ChargePoint[1] = (Position of ChargeTarget)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between ChargePoint[0] and ChargePoint[1]) Less than or equal to 64.00
            • Then - Actions
              • Unit - Cause ChargeCaster to damage ChargeTarget, dealing 500.00 damage of attack type Spells and damage type Normal
              • Special Effect - Create a special effect attached to the origin of ChargeTarget using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • Unit - Move ChargeCaster instantly to ChargePoint[0]
            • Else - Actions
              • Set ChargePoint[2] = (ChargePoint[0] offset by 4.00 towards (Angle from ChargePoint[0] to ChargePoint[1]) degrees)
              • Custom script: call SetUnitX( udg_ChargeCaster, GetLocationX(udg_ChargePoint[2]) )
              • Custom script: call SetUnitY( udg_ChargeCaster, GetLocationY(udg_ChargePoint[2]) )
              • Custom script: call RemoveLocation (udg_ChargePoint[2])
          • Custom script: call RemoveLocation (udg_ChargePoint[1])
        • Else - Actions
          • Unit - Move ChargeCaster instantly to ChargePoint[0]
      • Custom script: call RemoveLocation (udg_ChargePoint[0])


Trigger:
  • Charge Unactivate
    • Events
      • Unit - A unit Stops casting an ability
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to #Charge
    • Actions
      • Set ChargeCaster = No unit
      • Set ChargeTarget = No unit


attached is a demo map.
 

Attachments

  • [Z]ChargeToTarget.w3x
    14.4 KB · Views: 75

Bananarama1

Member
Reaction score
3
Thanks a ton man! Really appreciate it!

Edit:

Making a spell called Shadow Step based off the charge one i started with.

Trigger:
  • Shadow Step
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set TempPnt = (Position of ChargeCaster)
      • Set SlidePoint = (ChargPoint offset by (5.00, 0.00))
      • Special Effect - Create a special effect at (Position of ChargeCaster) using Abilities\Spells\Orc\FeralSpirit\feralspiritdone.mdl
      • Wait 0.20 seconds
      • Special Effect - Destroy (Last created special effect)
      • Unit - Move ChargeCaster instantly to (Position of ChargeTarget)
      • Animation - Play ChargeCaster's walk animation
      • Special Effect - Create a special effect at (Position of ChargeCaster) using Abilities\Spells\Orc\FeralSpirit\feralspiritdone.mdl
      • Custom script: call RemoveLocation (udg_TempPnt)
      • Custom script: call RemoveLocation (udg_SlidePoint)
      • Custom script: call RemoveLocation (udg_ChargPoint)
      • If ((Level of Charge for ChargeCaster) Equal to 1) then do (Unit - Cause ChargeCaster to damage ChargeTarget, dealing 125.00 damage of attack type Spells and damage type Normal) else do (Do nothing)
      • If ((Level of Charge for ChargeCaster) Equal to 2) then do (Unit - Cause ChargeCaster to damage ChargeTarget, dealing 175.00 damage of attack type Spells and damage type Normal) else do (Do nothing)
      • If ((Level of Charge for ChargeCaster) Equal to 3) then do (Unit - Cause ChargeCaster to damage ChargeTarget, dealing 225.00 damage of attack type Spells and damage type Normal) else do (Do nothing)
      • Special Effect - Destroy (Last created special effect)
      • Trigger - Turn off (This trigger)


(It still says ChargeTarget etc because i havn't changed the names!)

The teleport, special effects etc are ok, but the ability causes a lot more damage than is said in the trigger. It is supposed to do 125 at level 1, but it does around 2000 for some reason, any idea of why? :)
 

Bananarama1

Member
Reaction score
3
Really sorry for double post, but i dont think it'l be noticed, bumpedy bump :thup:

Edit: Fixed it myself, no worries!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top