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

Sand Cloud

Status
Not open for further replies.
Level 17
Joined
Mar 21, 2011
Messages
1,597
Hi guys!
I wanna do a custom spell, "Sand Cloud"!
Well i tried to do it but i failed and i dont know why.
Description: Creates a Sand Cloud in the target area. If the Caster is inside the cloud, hes getting "invisible"(100%transparency). BUT if a unit of an enemy player goes into the cloud too, he can see the caster (but only this player).
I gave the sand cloud dummy an aura to check if the caster is inside. I also used Bribes unit indexer

  • Sand Cloud 1
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) equal to Sand Cloud
    • Actions
      • Set SandCloud_Point = (Target point of ability being cast)
      • Unit - Create 1 Sand Cloud for (Triggering player) at SandCloud_Point facing blabla degrees
      • Set SandCloud_Dummy = (Last created unit)
      • Set SandCloud_Index = (Custom value of SandCloud_Dummy)
      • Set SandCloud_Unit[SandCloud_Index] = (Triggering unit)
      • Set SandCloud_Range = 300.00
      • Unit Group - Add SandCloud_Dummy to SandCloud_Group
  • Sand Cloud 2
    • Events
      • Time - Every 0.1 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in SandCloud_Group and do (Actions)
        • Loop - Actions
          • Set SandCloud_Dummy = (Picked unit)
          • Set SandCloud_Index = (Custom value of SandCloud_Dummy)
          • Set SandCloud_Point = (Position of SandCloud_Dummy)
          • Player Group - Pick every player in (All players matching (((Matching player) is an enemy of (Owner of SandCloud_Dummy)) equal to True)) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • 'IF'-Conditions
                  • ((Number of units in (Units within SandCloud_Range of SandCloud_Point matching ((Owner of (Matching unit)) equal to (Picked player)))) equal to 0) and ((SandCloud_Unit[SandCloud_Index] has buff Sand Aura ) equal to True)
                • 'THEN'-Actions
                  • Spiel - Display to (All players) the text: Test: Yes
                  • Set SandCloud_Player = (Picked player)
                  • Set SandCloud_Transparency = 100.00
                  • Custom script: if GetLocalPlayer() == udg_SandCloud_Player then
                  • Set SandCloud_Transparency = 0.00
                  • Custom script: endif
                  • Animation - Change SandCloud_Unit[SandCloud_Index]'s vertex coloring to (100.00%, 100.00%, 100.00%) with SandCloud_Transparency% transparency
                • 'ELSE'-Actions
                  • Spiel - Display to (All players) the text: Test: No
                  • Set SandCloud_Player = (Picked player)
                  • Set SandCloud_Transparency = 0.00
                  • Custom script: if GetLocalPlayer() == udg_SandCloud_Player then
                  • Set SandCloud_Transparency = 100.00
                  • Custom script: endif
                  • Animation - Change SandCloud_Unit[SandCloud_Index]'s vertex coloring to (100.00%, 100.00%, 100.00%) with SandCloud_Transparency% transparency
i know that i didnt remove any leaks, what i want to know is why the trigger doenst work :(
the enemy caster will get invisible in the cloud, but if i enter the cloud hes still invisible.
another thing, if im the ONLY enemy player of the caster, it works
 
Status
Not open for further replies.
Top