• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Proper Use of Offset Point

Status
Not open for further replies.
Level 4
Joined
Dec 30, 2006
Messages
84
I wanna know how would look trigger for this:

Units cast spell based on Shockwave (line DMG)...

Now I want to spawn 3 Dummy Units on its path so that each Dummy will cast Thunder Clap, Warstomp or whatever (didn't decide yet, anyway that doesn't matter that is the easy part.
Casting Unit is moved to the position of target point of ability being cast after the spell is executed.

But before caster is moved, dummy units should cast their part of the deal :wink:

Since Shockwave distance is 600 I want spawn Dummys on this locations:

150, 350 and 500 based on distance of 600, between caster and target point.

If anyone understands what I wrote above, please write down the distance trigger thing :D

Thanks:wink: :wink: :wink:
 
Level 10
Joined
Nov 10, 2004
Messages
351
  • Actions
    • Set TempLoc1 = (Position of (Triggering unit))
    • Set TempLoc2 = (Target point of ability being cast)
    • Set TempLoc3 = (TempLoc1 offset by 150.00 towards (Angle from TempLoc1 to TempLoc2) degrees)
    • Unit - Create 1 dummy for (Owner of (Triggering unit)) at TempLoc3 facing Default building facing degrees
    • Custom script: call RemoveLocation(udg_TempLoc3)
    • Set TempLoc3 = (TempLoc1 offset by 350.00 towards (Angle from TempLoc1 to TempLoc2) degrees)
    • Unit - Create 1 dummy for (Owner of (Triggering unit)) at TempLoc3 facing Default building facing degrees
    • Custom script: call RemoveLocation(udg_TempLoc3)
    • Set TempLoc3 = (TempLoc1 offset by 500.00 towards (Angle from TempLoc1 to TempLoc2) degrees)
    • Unit - Create 1 dummy for (Owner of (Triggering unit)) at TempLoc3 facing Default building facing degrees
    • Custom script: call RemoveLocation(udg_TempLoc3)
    • Custom script: call RemoveLocation(udg_TempLoc2)
    • Custom script: call RemoveLocation(udg_TempLoc1)
Is this what you are looking for?
 
Last edited by a moderator:
Level 4
Joined
Dec 30, 2006
Messages
84
Hmm yeah something like that, but don't have fu*** time right now, must pack things and get on the train for home... Will try that when I arrive home..
:thumbs_up:

THX Diablo. That Works :wink: :wink: :wink:

But when I use 10 units with that ability and then I cast that spell... Game start lagging... I don't have a lot special effects...

I think that Special Effect- Destroy Last created Special Effect is not enough..

What would be custom script to destroy special effect??

Then maybe 10x3 Dummy units create lag... How to remove Dummy unit from the game, after unit already cast a spell??

TY
 
Last edited by a moderator:
Level 4
Joined
Dec 30, 2006
Messages
84
Ammm before I forget to tell that now I am running WC3 on my old wooden PC

PII 400 MHz 128 MB of RAM, GeForce 2 MX200.....

  • Lighting Edge
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lighting Edge
    • Actions
      • Set TempLoc1 = (Position of (Triggering unit))
      • Set TempLoc2 = (Target point of ability being cast)
      • Set TempLoc3 = (TempLoc1 offset by 150.00 towards (Angle from TempLoc1 to TempLoc2) degrees)
      • Unit - Create 1 DUMMY for (Owner of (Triggering unit)) at TempLoc3 facing Default building facing (270.0) degrees
      • Custom script: call RemoveLocation(udg_TempLoc3)
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Advanced - Do (Unit - Add LE TC to (Last created unit)) and (Unit - Set level of LE TC for (Last created unit) to (Level of Lighting Edge for (Triggering unit)))
      • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
      • Set TempLoc3 = (TempLoc1 offset by 350.00 towards (Angle from TempLoc1 to TempLoc2) degrees)
      • Unit - Create 1 DUMMY for (Owner of (Triggering unit)) at TempLoc3 facing Default building facing (270.0) degrees
      • Custom script: call RemoveLocation(udg_TempLoc3)
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Advanced - Do (Unit - Add LE TC to (Last created unit)) and (Unit - Set level of LE TC for (Last created unit) to (Level of Lighting Edge for (Triggering unit)))
      • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
      • Set TempLoc3 = (TempLoc1 offset by 500.00 towards (Angle from TempLoc1 to TempLoc2) degrees)
      • Unit - Create 1 DUMMY for (Owner of (Triggering unit)) at TempLoc3 facing Default building facing (270.0) degrees
      • Custom script: call RemoveLocation(udg_TempLoc3)
      • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
      • Advanced - Do (Unit - Add LE TC to (Last created unit)) and (Unit - Set level of LE TC for (Last created unit) to (Level of Lighting Edge for (Triggering unit)))
      • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
      • Custom script: call RemoveLocation(udg_TempLoc3)
      • Custom script: call RemoveLocation(udg_TempLoc2)
      • Custom script: call RemoveLocation(udg_TempLoc1)
      • Lightning - Create a lightning effect Forked Lightning (Position of (Triggering unit)) (Target point of ability being cast)
      • Wait 0.01 seconds
      • Lightning - Destroy (Last created lightning effect)
      • Destructible - Pick every destructible within 250.00 of (Target point of ability being cast) and do (Destructible - Kill (Matching destructible))
      • Unit - Move (Triggering unit) instantly to (Target point of ability being cast)
      • Unit - Order (Triggering unit) to Attack (Targeted unit)
The WEU add-on Advanced Trigger- Do Action and Do action will be replaced with classic trigger...

If anyone see something wrong, write down pls :wink:
 
Last edited by a moderator:
Level 10
Joined
Nov 10, 2004
Messages
351
You've got a couple of location leaks, but else it seems fine to me.
And yes maybe the crappy PC can be the cause^^
Your trigger should look like this instead:
  • Set TempLoc1 = (Position of (Triggering unit))
  • Set TempLoc2 = (Target point of ability being cast)
  • Set TempLoc3 = (TempLoc1 offset by 150.00 towards (Angle from TempLoc1 to TempLoc2) degrees)
  • Unit - Create 1 DUMMY for (Owner of (Triggering unit)) at TempLoc3 facing Default building facing (270.0) degrees
  • Custom script: call RemoveLocation(udg_TempLoc3)
  • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
  • Advanced - Do (Unit - Add LE TC to (Last created unit)) and (Unit - Set level of LE TC for (Last created unit) to (Level of Lighting Edge for (Triggering unit)))
  • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
  • Set TempLoc3 = (TempLoc1 offset by 350.00 towards (Angle from TempLoc1 to TempLoc2) degrees)
  • Unit - Create 1 DUMMY for (Owner of (Triggering unit)) at TempLoc3 facing Default building facing (270.0) degrees
  • Custom script: call RemoveLocation(udg_TempLoc3)
  • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
  • Advanced - Do (Unit - Add LE TC to (Last created unit)) and (Unit - Set level of LE TC for (Last created unit) to (Level of Lighting Edge for (Triggering unit)))
  • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
  • Set TempLoc3 = (TempLoc1 offset by 500.00 towards (Angle from TempLoc1 to TempLoc2) degrees)
  • Unit - Create 1 DUMMY for (Owner of (Triggering unit)) at TempLoc3 facing Default building facing (270.0) degrees
  • Custom script: call RemoveLocation(udg_TempLoc3)
  • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
  • Advanced - Do (Unit - Add LE TC to (Last created unit)) and (Unit - Set level of LE TC for (Last created unit) to (Level of Lighting Edge for (Triggering unit)))
  • Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
  • Custom script: call RemoveLocation(udg_TempLoc3)
  • Lightning - Create a lightning effect Forked Lightning (TempLoc1) (TempLoc2)
  • Wait 0.01 seconds
  • Lightning - Destroy (Last created lightning effect)
  • Destructible - Pick every destructible within 250.00 of (TempLoc2) and do (Destructible - Kill (Matching destructible))
  • Unit - Move (Triggering unit) instantly to (Temploc2)
  • Unit - Order (Triggering unit) to Attack (Target Unit of ability being cast) // should not be targeted unit.
  • Custom script: call RemoveLocation(udg_TempLoc1)
  • Custom script: call RemoveLocation(udg_TempLoc2)
Also, the wait is very inaccurate and will wait something like 0.17 seconds instead.
 
Level 4
Joined
Dec 30, 2006
Messages
84
OK. THX Diablo:infl_thumbs_up:

Wait-0.01 sec... Is the only becuase that the Forked Lighting effect is executed.

If anyone knows the solution for that..write it down :wink: Hmm Maybe if I put something between Create Lighting and Destroy Lighting, something like Do nothing :wink:

Maybe will work :wink:
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,204
no, the wait is longer in multiplayer than in single player.

I did an experiment ages ago, I covered the map with rocks using 1 row every 0.1 seconds and it made it in the 60 second wait I gave yet in multiplayer it did not make it, and the reason was the 0.1 seconds is longer in multiplayer than is single player, and many people agree with me. Polled wait is a fixed time, but it does not wait for lag which is sad. . .
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,204
What is TSA, it is being used a lot yet no one has said what it is. . .

Well anyway, polled wait is a LOT better acrucy wise then normal wait which I have seen 0.1 (0.01 if you wish) take as long as 0.5-0.75 seconds in multiplayer at fastest game speed. Polled wait is what was used in DBZ tribute ultra 9.8 and it synced perfectly with timers and things. Only trouble with polled wait is that it can bug occasionly and constantly return a delay of 0.1 seconds even if you set it to 360 seconds which can run playing sessions.

Even still timers are the best, nothing beats them. . .
 
Status
Not open for further replies.
Top