• 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] How do I instantly move a unit 300 yards infront of the caster?

Status
Not open for further replies.
Level 9
Joined
Dec 4, 2007
Messages
562
Read the title :D.
Well I'm making a spell that I have never seen before....it is kinda weird, because I thought somebody whoud have got this awsome idea before me :p.

So it is called "Telekenetic Grip" and it holds a target unit like 300 yards infront of the caster and damage it every second. And the caster can move and walk around like that but still the unit will be 300 yards infront of him, in the direction that the caster is facing.

If somebody coud help me I whoud be in dept.....or something like that. :D

This is what I got so faar, but this will only like teleport the unit so it is next to the caster. not 300 yards forward of him.

  • Telekenetic Grip
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Telekenetic Grip
    • Actions
      • Set TelekeneticGriped = (Target unit of ability being cast)
      • Set TelekeneticGriper = (Triggering unit)
      • Unit - Pause TelekeneticGriped
      • Unit - Add Storm Crow Form to TelekeneticGriped
      • Unit - Make TelekeneticGriped Invulnerable
      • Animation - Change TelekeneticGriped flying height to 150.00 at 350.00
      • Trigger - Turn on Telekenetic Grip Hold <gen>
      • Wait ((2.00 x (Real((Level of Telekenetic Grip for TelekeneticGriper)))) + 3.00) seconds
      • Unit - Remove Storm Crow Form from TelekeneticGriped
      • Unit - Make TelekeneticGriped Vulnerable
      • Animation - Change TelekeneticGriped flying height to (Default flying height of TelekeneticGriped) at 1.00
      • Unit - Unpause TelekeneticGriped
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I didn't test it, but maybe you can do this:

Inside the first trigger, add this action:
  • Actions
    • Set Integer = 0
Then the Telekenetic Grip hold trigger:
  • Events
    • Time - Every 0.07 seconds of game time
  • Conditions
  • Actions
    • Set Integer = (Integer + 1)
    • Set Point1 = (Position of TelekeneticGripper)
    • Set Point2 = Point1 offset by 300.00 towards (Facing of TelekeneticGripper) degrees)
    • Custom script: call SetUnitX(udg_TelekineticGripped,(GetLocationX(udg_Point1))
    • Custom script: call SetUnitY(udg_TelekineticGripped,(GetLocationY(udg_Point1))
    • Custom script: call RemoveLocation(udg_Point1)
    • Custom script: call RemoveLocation(udg_Point2
    • Unit - Move TelekeneticGriped instantly to ((Position of TelekeneticGripper) offset by 300.00 towards (Facing of TelekeneticGripper) degrees)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Integer Equal to 10
      • Then - Actions
        • Unit - Cause TelekeneticGripper to damage TelekeneticGriped, dealing X damage of attack type Spells and damage type Normal
        • Set Integer = 0
        • Special Effect - Create a special effect (not necessary of course)
        • Special Effect - Destroy (Last created special effect) (not necessary either)
      • Else - Actions
 
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
That's gonna be really choppy (0.1 second interval is pretty long for a slide)
and it will leak like a son of a bitch, but it's getting there :p

Ohh, right... I wasn't paying attention for leaks :p

Well, 0.01 is too fast and causes lagg and I normally use 0.05-0.08, but 0.1 isn't that much slower :p
Even though the World Editor timing isn't correct...
 
Level 8
Joined
Mar 12, 2008
Messages
437
  • Events
    • Time - Every 0.10 seconds of game time
  • Conditions
  • Actions
    • Set Integer = (Integer + 1)
    • Set Point1 = (Position of TelekeneticGripper)
    • Set Point2 = Point1 offset by 300.00 towards (Facing of TelekeneticGripper) degrees)
    • Custom script: call SetUnitX(udg_TelekineticGripped,(GetLocationX(udg_Point2)))
    • Custom script: call SetUnitY(udg_TelekineticGripped,(GetLocationY(udg_Point2)))
    • Custom script: call RemoveLocation(udg_Point1)
    • Custom script: call RemoveLocation(udg_Point2)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Integer Equal to 10
      • Then - Actions
        • Unit - Cause TelekeneticGripper to damage TelekeneticGriped, dealing X damage of attack type Spells and damage type Normal
        • Set Integer = 0
        • Special Effect - Create a special effect (not necessary of course)
        • Special Effect - Destroy (Last created special effect) (not necessary either)
      • Else - Actions

Small fixes; removing leaks and making sure that TelekineticGripped's orders aren't interrupted when being gripped.
 
Level 7
Joined
Oct 14, 2008
Messages
340
Actually, the best interval (maybe not best but most used) is 0.035, you'd have to do 0.03 or 0.04 in GUI, this will create a smooth effect and won't be choppy. With a 0.1 second interval you can easily see each time the unit is being moved.. very ugly.
 
Level 11
Joined
Apr 6, 2008
Messages
760
he didnt ask for a slide he ask how to move the unit 300 range infront of the caster....

  • Set p = ((Position of (Triggering unit)) offset by 300.00 towards (Facing of (Triggering unit)) degrees)
  • Unit - Move (Triggering unit) instantly to p
or u can use angel between the 2 locations

  • Set p = ((Position of (Triggering unit)) offset by 300.00 towards (Angle from Point1 to Point2 degrees)
leaky but u understand :)
 
Level 7
Joined
Oct 14, 2008
Messages
340
actually Ciebron, he wanted the unit to STAY 300 in front of the caster, allowing the caster to walk around freely with the target being thrown around hopelessly.
 
Level 4
Joined
Feb 2, 2009
Messages
71
actually Ciebron, he wanted the unit to STAY 300 in front of the caster, allowing the caster to walk around freely with the target being thrown around hopelessly.

Isn't that exactly what it's going to do if you do like Sabelion is describing?
If the target is constantly moved to 300 in front of the caster, the target will fly in a 600 diameter half circle around the caster if he's turning 180 degrees.

Do you mean he needs some kind of smoothing effect so it's not moving too fast?
 
Level 19
Joined
Sep 4, 2007
Messages
2,826
You're going to need a timer for this kind of stuff to be able to make 0.01 second interval. Here you go. It's only to show you somewhat how it should be. Test it to see how things are connected. You are very likely going to have to change some stuff.

I'm getting too old for this stuff...
 

Attachments

  • Shadowfury 1.00.w3x
    18.3 KB · Views: 71
Level 4
Joined
Feb 2, 2009
Messages
71
You're going to need a timer for this kind of stuff to be able to make 0.01 second interval. Here you go. It's only to show you somewhat how it should be. Test it to see how things are connected. You are very likely going to have to change some stuff.

I'm getting too old for this stuff...

Are you sure about this? Isn't that event using a global timer?
I thought it is only the "Wait/TriggerSleepAction()" that is limited to 0.27 sec intervals...
 
Level 11
Joined
May 31, 2008
Messages
698
Events

Time - Every 0.07 seconds of game time

Conditions
Actions

Set Integer = (Integer + 1)
Set Point1 = (Position of TelekeneticGripper)
Set Point2 = Point1 offset by 300.00 towards (Facing of TelekeneticGripper) degrees)
Custom script: call SetUnitX(udg_TelekineticGripped,(GetLocationX(udg_Point1))
Custom script: call SetUnitY(udg_TelekineticGripped,(GetLocationY(udg_Point1))
Custom script: call RemoveLocation(udg_Point1)
Custom script: call RemoveLocation(udg_Point2
Unit - Move TelekeneticGriped instantly to ((Position of TelekeneticGripper) offset by 300.00 towards (Facing of TelekeneticGripper) degrees)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)

If - Conditions

Integer Equal to 10

Then - Actions

Unit - Cause TelekeneticGripper to damage TelekeneticGriped, dealing X damage of attack type Spells and damage type Normal
Set Integer = 0
Special Effect - Create a special effect (not necessary of course)
Special Effect - Destroy (Last created special effect) (not necessary either)

Else - Actions


That is only good if there is 1 unit in the map that can cast this ability, otherwise telikinetic gripper will be set to the next casting unit, thus moving all targets of this ability to 300 in front of that unit.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
So it is called "Telekenetic Grip" and it holds a target unit like 300 yards infront of the caster and damage it every second. And the caster can move and walk around like that but still the unit will be 300 yards infront of him, in the direction that the caster is facing.

Impossiable to do. As no one knows the conversion for WC3 map units to yards. Please state the distance eithor in WC3 map units or else enlighten us about the conversion ratio of yards to WC3 map units.

Anyway, just use a timer and trigonometry.
 
Level 9
Joined
Dec 4, 2007
Messages
562
Umm thanks you everybody :D realy good job. And I wanted the unit to teleport 300 yards infront of the caster like every 0.1 second yes :p

Impossiable to do. As no one knows the conversion for WC3 map units to yards. Please state the distance eithor in WC3 map units or else enlighten us about the conversion ratio of yards to WC3 map units.

Anyway, just use a timer and trigonometry.

lol hehe I just ment like 300 Warcraft 3 lenghts.
 
Status
Not open for further replies.
Top