• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Points with offset...

Status
Not open for further replies.
Level 14
Joined
Aug 8, 2010
Messages
1,022
Hi! I want to ask something... how i can understand where will be created a unit by point with offset, because i am tired of just launching and turning off war3 and every time change the values... i want the points to be like the picture i've uploaded.
 
Last edited:
Level 33
Joined
Mar 27, 2008
Messages
8,035
That, is the usage of "Looping"
Test map attached, enjoy :)

EDIT:
In my test map, forgot to clean CasterLoc's leak :)
Just add:
  • Custom script: call RemoveLocation(udg_CasterLoc)
And it would look like this:
  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Thunder Clap
    • Actions
      • Set CasterLoc = (Position of (Triggering unit))
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set GroundBreakLoc = (CasterLoc offset by 300.00 towards ((Real((Integer A))) x 45.00) degrees)
          • Special Effect - Create a special effect at GroundBreakLoc using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_GroundBreakLoc)
      • Custom script: call RemoveLocation(udg_CasterLoc)
 

Attachments

  • Simple Looping System.w3x
    12.8 KB · Views: 64
Level 11
Joined
Jun 20, 2009
Messages
880
300 Towards means that you have to move 300 WC3 units forward.
If you dont understand the WC3 units, just make a unit with 300 attack range. It's the same distance.

And the degrees, in this case it's 45, means the direction. 0 degrees is straigth to the right.
See the attachment.
 

Attachments

  • Degrees.jpg
    Degrees.jpg
    8.1 KB · Views: 149
Level 33
Joined
Mar 27, 2008
Messages
8,035
Looping is a process which the system interprets in repetitively
For example, in my test map, it says Loop from 1 to 8, right ?
So, the degrees formula is:
1 * 45 = 45 degrees (the angle of 1st SFX)
2 * 45 = 90 degrees (the angle of 2nd SFX)
3 * 45 = 135 degrees (the angle of 3rd SFX)
and so on...

BE WARNED:
If you're leaking positions/units/etc by doing this method, you're gonna leak, A LOT
Be sure to clean all the leaks, be VERY careful of what you're doing
Take my test map for example, you're gonna leak 8 times + 1 normal leak (CasterLoc) if you're not cleaning it
Casting it 10 times will have 90 leaks, already :)
Be CAREFUL !
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
Can you tell me what is wrong here :
  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fart
      • (Unit-type of (Casting unit)) Equal to Abomination
    • Actions
      • Set CastLoc = (Position of (Casting unit))
      • Unit - Create 1 Fart for Player 1 (Red) at CastLoc facing Default building facing degrees
      • Wait 0.50 seconds
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Set FartPointS = (CastLoc offset by 150.00 towards ((Real((Integer A))) x 45.00) degrees)
          • Unit - Create 1 Fart for Player 1 (Red) at CastLoc facing Default building facing degrees
          • Unit - Order (Last created unit) to Move To FartPointS
I want 8 clouds to be created and the slowly move away (i made the walk slow from the object editor). Why id don't work?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
1. DON'T EVER, try to use Wait action + Loop, it could bugged/malfunction
2. Why do you want the small 0.50 seconds ? It's a small value after all, remove it would be nice
3. What is the problems that you've encountered ?

EDIT:
See what I did in this test map
 

Attachments

  • Simple Looping System.w3x
    13.2 KB · Views: 66
Level 14
Joined
Aug 8, 2010
Messages
1,022
Sorry... i just saw it and get prepared for dance training... Now i opened it and i see, but i have some questions : 1st - why does the dummy unit needs the ability locust, 2nd - what means 'Can't raise, does decay' and the whole 'Combat - Death type' ?, 3rd - what means 'Stats - Sight Radius (day)' and 'Stats - Sight Radius (night)'? and 4th - does my dummy unit really needs to have EXACTLY the same stats (including shadow, armor, movement, icon...)[ i see that you have posted that it need to be exactly the same... but i don't understand why...] Can you please tell me? :)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I mean the stats "changed to pink", you need to follow that
Let me answer your questions:

1st. Because, other unit (enemies) can't kill this unit, making this spell interrupted if killed.
Also, this will make sure other player/player him/her self can't select/choose that unit. It must be weird right, to select a floating green cloud, and we can order it to move here and there, right? Therefore, adding Locust (invulnerable + can't select) ability to a dummy unit is a MUST.

2nd. 2 parts, "Raise / Decay"
Raise
- If you make it raise, if any unit within that area has Resurrection OR Raise Dead ability turned on/activate, this will raise back the dead dummy units (will look weird right if suddenly you'll see a floating green clouds came back to live after disappear from sight for about 5 seconds

- If you make it decay, it will take a longer time to actually "disappear" completely from the map, basically, this will make the green clouds to die faster, and gets removed from the game easier/cleaner.

3rd. Stats - Radius
A dummy unit should/should not have sight/vision, it's your own decision, after all. Like a shockwave dummy unit, you may give that dummy unit a sight radius to properly see which units that have been damaged for it passes. If you have a single-target cast ability, I think that dummy unit doesn't need to have Sight Radius as it can prevent you from seeing other things, that the caster unit normally can see

4th. Only same for the pink color text in Object Editor.

If you have more questions, please ask :)
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
Ok, i understand but still with the locust... the dummy haves it - yes, but when you order it to cast locust - i don't see a trigger that orders it to cast? I mean how do you turn the locust units into the clouds? I just don't know how to ask you what i want understand! :D just i am so confused with this locust.. :D

Edit : i forgot to see what magic is the locust - i mean i thought it was locust swarm, only locust i don't saw.. :D
 
Last edited:
Status
Not open for further replies.
Top