Units use skill at the same time?

ZZY

New Member
Reaction score
1
How can i make so 2 units can use the same point variable at the same time? when i cast a skill and then i have another unit cast it, unit a stops at what ever point in casting he is at and unit b starts!:banghead:
 

Tru_Power22

You can change this now in User CP.
Reaction score
144
Use an array based on the number of units.

Every time a unit casts a spell check to see if an array is empty, and if it is use that point as the temp point. I would be able to support like 8000+ casts at a time.
 

ZZY

New Member
Reaction score
1
Use an array based on the number of units.

Every time a unit casts a spell check to see if an array is empty, and if it is use that point as the temp point. I would be able to support like 8000+ casts at a time.

hmm sounds good, so to do this just make the poit an array 144?
 

Tru_Power22

You can change this now in User CP.
Reaction score
144
Yeah, but then when an ability is used that uses the point, check to see if the position of the array that your using is empty, if it is overwrite it, if not assign a new point in a new array position.
 

ZZY

New Member
Reaction score
1
Use an array based on the number of units.

Every time a unit casts a spell check to see if an array is empty, and if it is use that point as the temp point. I would be able to support like 8000+ casts at a time.

Yeah, but then when an ability is used that uses the point, check to see if the position of the array that your using is empty, if it is overwrite it, if not assign a new point in a new array position.

ok so how/were would i add that in this trigger?
Trigger:
  • Spirit Dagger
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Spirit Dagger
    • Actions
      • Unit - Pause (Triggering unit)
      • For each (Integer B) from 1 to 4, do (Actions)
        • Loop - Actions
          • Set TempPoint = ((Position of (Casting unit)) offset by 256.00 towards ((Real((Integer B))) x 90.00) degrees)
          • Unit - Create 1 Flying Dagger for (Owner of (Casting unit)) at TempPoint facing 90.00 degrees
          • Unit - Add a 2.00 second Water Elemental expiration timer to (Last created unit)
          • Custom script: call RemoveLocation( udg_TempPoint )
      • Wait 2.20 seconds
      • Unit - Unpause (Triggering unit)

EDIT: BOSTON is the best!!
 

LightChaosma

New Member
Reaction score
60
this should work without arrays

you dont have waits inside your loop, and triggering unit is a local variable... so this should work just fine when it is cast multiple times at once
 

ZZY

New Member
Reaction score
1
this should work without arrays

you dont have waits inside your loop, and triggering unit is a local variable... so this should work just fine when it is cast multiple times at once

opps sorry wrong skill :D

Trigger:
  • ViciousMirror
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Vicious Mirror
    • Actions
      • Set ViciousCaster = (Casting unit)
      • Unit - Pause ViciousCaster
      • Unit - Hide ViciousCaster
      • Set TempPoint = (Position of ViciousCaster)
      • Unit - Create 1 (Unit-type of ViciousCaster) for (Owner of ViciousCaster) at TempPoint facing 270.00 degrees
      • Set ViciousCasterDummy = (Last created unit)
      • Unit - Pause ViciousCasterDummy
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Custom script: call UnitAddAbility(bj_lastCreatedUnit,'Aloc')
      • Set ViciousPoint = (Position of (Casting unit))
      • Special Effect - Create a special effect at ViciousPoint using GrandAura.mdx
      • Set ViciousSpecialEffect = (Last created special effect)
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy (Vicious Mirror) for (Owner of (Casting unit)) at ViciousPoint facing (45.00 x (Real((Integer A)))) degrees
          • Animation - Change (Last created unit)'s vertex coloring to (40.00%, 40.00%, 40.00%) with 30.00% transparency
          • Set DummyUnit[(Integer A)] = (Last created unit)
          • Set DummyPoint[(Integer A)] = (ViciousPoint offset by 250.00 towards (180.00 + (45.00 x (Real((Integer A))))) degrees)
          • Set ViciousAngle[(Integer A)] = (Angle from DummyPoint[(Integer A)] to ViciousPoint)
      • Set ViciousDistance = (Distance between ViciousPoint and DummyPoint[1])
      • Set ViciousInteger = 0
      • Trigger - Run ViciousMovementMoveOutside <gen> (ignoring conditions)
 
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