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

[JASS] Locate Z position?

Status
Not open for further replies.
Level 15
Joined
Jan 27, 2007
Messages
948
Well I'm making a fishing system, which grabs the position of where you cast the "shockwave" skill.
The problem is that it always returns 806.400, ALWAYS.

I first used
JASS:
set udg_z = (GetLocationZ(GetSpellTargetLoc())

But with no succes I tried creating a dummy item and using

JASS:
set udg_z = (GetLocationZ(GetItemLoc(udg_tempitem))

Any help? Thanks in advance!!
 
Level 15
Joined
Jan 27, 2007
Messages
948
for some reason I can't even make it work now... It worked a few hours ago though...

  • check
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
    • Actions
      • Set temppoint = (Target point of ability being cast)
      • Item - Create dummy at temppoint
      • Set tempitem = (Last created item)
      • Game - Display to (All players) the text: (String(z))
      • Custom script: set udg_z = (GetLocationZ(GetItemLoc(udg_tempitem))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • z Less than or equal to 800.00
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 2) Equal to 1
            • Then - Actions
              • Hero - Create fish and give it to fisherman 0000 <gen>
            • Else - Actions
              • Game - Display to (All players) the text: you didn't caught a...
        • Else - Actions
          • Game - Display to (All players) the text: you have to cast yo...
 

Attachments

  • testmap.w3x
    14.7 KB · Views: 35
Status
Not open for further replies.
Top