• 🏆 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!

[Trigger] Weird bug + question

Status
Not open for further replies.
Level 29
Joined
Jul 29, 2007
Messages
5,174
Do Integar[A] mess each other ? I have a few abilities that just continue to mix in each other without any reason (or can it be because they are all based on the Roar ability ?)

And another question.
  • Unit - Order My_Unit to Move To (TempLoc offset by 0 towards ((Facing of My_Unit + 1.00) degrees)
(TempLoc is where the unit is)

For some reason the unit moves does a about 260 degrees turn.
Didn't it tell him only +1 ? x.x

And yet another question,
How can I change the waters level when playing ? (I know this can be done, not sure if in GUI though).
 
Last edited:
Level 3
Joined
Nov 11, 2007
Messages
39
First question: So long as you dont have more then 1 base ability per unit your ok:

2 roars/unit = bad
1 roar + 1 thunderclap = good

Otherwise the Ids get messed up. I think this is your problem. I advise you to figure out the channel ability if you need a dummy ability. You can change its order string.

Question 2: I think what youve done there is order the unit to move 0 distance towards a point offset by the facing of your unit by 1 degree. So essentially since the distance = 0 the unti wont move. If you want him to face a direction use "make unit face point" not a move order.

Question 3: Good luck maybe WEU?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Ok finaly got somehow the channel to work.
Channel is pretty weird :eekani:

About the water - I don't think its in WEU, probably in JASS :cry:

[EDIT] what the hell ? I made a channel ability based on Thunder Clap and it does on my unit a Roar buff, in addition to NOT making the Mana Shield buff im telling it to do.

And is there a way to check leaks besides watching every code line ?
 
Last edited:
Level 21
Joined
Aug 21, 2005
Messages
3,699
The only way I know how to "raise" water in-game is by using the Icecrown raising water doodad, and changing its animation in-game...

I always make my triggers leakless when I'm making them, rather than having to look through each line 2 times. I've never fealt that it costed too much time to deleak a trigger, so...

Perhaps attach your map if you want any other help concerning channel.
 
Level 3
Joined
Nov 11, 2007
Messages
39
uh I dont really know how you managed to get a roar buff out of a channel...

Ok lets start from scratch, you want the spell when cast to give the buff to the casting unit?

Maybe the simplest one to use for that would be berzerk. This is a dummy buff right? not the actual mana shield?
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
Do Integar[A] mess each other ? I have a few abilities that just continue to mix in each other without any reason (or can it be because they are all based on the Roar ability ?)
If Integer A is used multiple times at one instant (ie through waits) then it will interfere - it's actually the global bj_forLoopAIndex.

And multiple non-channel non-spellbook active abilities on a unit will interfere.

For some reason the unit moves does a about 260 degrees turn.
Didn't it tell him only +1 ? x.x
0-distance movement goes crazy.

And yet another question,
How can I change the waters level when playing ? (I know this can be done, not sure if in GUI though).
There is no way to, but as Eleandor said there's a rising water model.

And channel may not add buffs.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Made also without 0 distance move.
  • Unit - Make My_Unit face ((Facing of My_Unit) + 359.00) over 8.00 seconds
Still does the same thing.
It waits like 0.1 sec and then just do all the 359 degrees in less then half a second.

About the channel, so whats the point of the Buff section ? :confused:

And another question.
Is there a way to make point variables move swiftly ?
For example how do I make a unit move while other units move in a circle around him (mostly seen in escapes such as Polar Escape).

And yet another question.
Is there a way to do a custom script like this ? tried it but didn't work
  • Custom script: call RemoveLocation( udg_Location[integar])

I set my locations based on a loop like this (lol first time I thought of doing this x.x)

  • For each (Integer A) from 1 to 36, do (Actions)
    • Loop - Actions
      • Set TempLoc_DeathCircle[(Integer(Real2))] = (TempLoc_DeathCircle[0] offset by 500.00 towards ((Facing of (Triggering unit)) + Real1) degrees)
      • Set Real1 = (Real1 + 10.00)
      • Set Real2 = (Real2 + 1.00)

And now is there a way to remove them the same way ? :)
Will really make making all this skills shorter lol.

[Edit] ok it seems it didn't even work from the start and didn't make any location.
Isn't there a way to use loops for this ?
 
Last edited:
Level 40
Joined
Dec 14, 2005
Messages
10,532
About the channel, so whats the point of the Buff section ?
It's a default section, all spells automatically have it.

And another question.
Is there a way to make point variables move swiftly ?
For example how do I make a unit move while other units move in a circle around him (mostly seen in escapes such as Polar Escape).
Use a timer rather than waits, waits minimum at .27 seconds for .01 and .1 seconds for .00 (approximate)

And yet another question.
Is there a way to do a custom script like this ? tried it but didn't work
Put it in a loop - the value of Integer A in JASS is bj_forLoopAIndex.

ok it seems it didn't even work from the start and didn't make any location.
Isn't there a way to use loops for this ?
You want to use (Integer A) in the index, not Integer(Real2). (And you can delete Real2)
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Ok it works now, thanks.

Is there a way to make a loop which is depended on another loop but NOT inside it ? because a loop inside a loop works too slow.

And will creating X units and ordering "last created unit" to move to random place make them all go to diffrent places or will order em' all to move to the same place ?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • For each (Integer A) from 1 to 36, do (Actions)
    • Loop - Actions
      • Set TempLoc_DeathCircle[(Integer A)] = (TempLoc_DeathCircle[0] offset by 500.00 towards ((Facing of (Triggering unit)) + Real2) degrees)
      • Set Real2 = (Real2 + 10.00)
      • Special Effect - Create a special effect at TempLoc_DeathCircle[(Integer A)] using Abilities\Spells\Human\MarkOfChaos\MarkOfChaosTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • For each (Integer B) from 1 to 5, do (Actions)
        • Loop - Actions
          • Set TempLoc_DeathCircle[Integar] = (TempLoc_DeathCircle[(Integer A)] offset by 100.00 towards (Random real number between 0.00 and 359.00) degrees)
          • Unit - Create 1 Dummy Fire Orb for Player 1 (Red) at TempLoc_DeathCircle[(Integer A)] facing Default building facing degrees
          • Unit - Order (Last created unit) to Move To TempLoc_DeathCircle[Integar]
          • Animation - Change (Last created unit) flying height to 100.00 at 150.00
          • Wait 0.01 seconds
          • Animation - Change (Last created unit) flying height to 0.00 at 200.00
          • Set Integar = (Integar + 1)
This is how I "updated it" but it works really slowly.
You know of a way to make it faster ? Probably you would automaticly say "use dummys" lol... but first is there a way with triggers ?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Oh only now understood why you kept on saying bj_forLoopAIndex lol...

[Edit] ok now I made it this way
  • Fire Circle
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Death Circle
    • Actions
      • Unit - Pause (Triggering unit)
      • Set TempLoc_DeathCircle[0] = (Position of (Triggering unit))
      • For each (Integer A) from 1 to 36, do (Actions)
        • Loop - Actions
          • Set TempLoc_DeathCircle[(Integer A)] = (TempLoc_DeathCircle[0] offset by 400.00 towards ((Facing of (Triggering unit)) + ((Real((Integer A))) x 10.00)) degrees)
          • Unit - Create 1 Dummy for Player 1 (Red) at TempLoc_DeathCircle[0] facing Default building facing degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Order (Last created unit) to Human Blood Mage - Flame Strike TempLoc_DeathCircle[(Integer A)]
          • Wait 0.20 seconds
          • Custom script: call RemoveLocation( udg_TempLoc_DeathCircle[bj_forLoopAIndex] )
      • Unit - Unpause (Triggering unit)
For some reason the degree and the amount of the flame strikes seem random.
instead of getting +10 each time it just go somewhere random at about ((facing of unit-100)-(facing of unit+100)) and it makes like 3-8 flame strikes each time a diffrent number... WeIrD ? x.X
 
Last edited:
Level 29
Joined
Jul 29, 2007
Messages
5,174
The unit have no moddel so "I think" it doesn't need to turn ?
On the "multi shockwave" (don't know if you saw it) trigger it worked fine.
I tried at the start 1 second timer but they didn't even manage to cast so I changed to 2 and now after I changed some stuff it makes exacly 1/4 of a circle instead of a full circle...

And I need harray (or 2 diffrent points... whats the diffrence?) for units location and the other locations so there will be no leaks.

[Edit] If you mean about the [Integar A] I understand what you are saying, just didn't change it from the start (At first I made the trigger to make ALL locations and only then cast spells, and then remove em' all...).
 
Status
Not open for further replies.
Top