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

Editor Bug

Status
Not open for further replies.
Level 3
Joined
Nov 18, 2015
Messages
41
Using JNGP 2.0, haven't had any issues until all of a sudden I was attempting to fix a weird problem I was having and it started happening.

Essentially, I can't enable any triggers. I can save and compile maps just fine, but if I go to disable a trigger, and then re-enable it, it won't allow me to enable anything. I figured maybe it was just my map so I started a brand new one and tried disabling and re-enabling the standard included "Melee Initialization" trigger, and oddly enough it starting throwing me the same compile errors.

9beb8f065ceb4d009881cb9258bf7d7b.png


The error I was trying to fix was that a point variable for some odd reason would reset itself. I tried deleting the variable to find ALL occurrences of it, to ensure I wasn't changing it or removing it in a custom script somewhere, but I found no other place where the variable was edited.

This is the trigger where the variable is set.

  • HS Select
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Hero Select
    • Actions
      • Set tempP = (Owner of (Casting unit))
      • Player Group - Add tempP to tempPGroup
      • Set tempInt = (Player number of tempP)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of hs_targetHero[tempInt]) Equal to Azura
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Name of tempP) Not equal to kkFire
            • Then - Actions
              • Game - Display to tempPGroup for 3.50 seconds the text: This hero is reserv...
              • Player Group - Pick every player in tempPGroup and do (Player Group - Remove (Picked player) from tempPGroup)
              • Skip remaining actions
            • Else - Actions
        • Else - Actions
      • Set hr_reviveLoc[tempInt] = (Random point in hr rev1 <gen>)
      • Set tempLoc = hr_reviveLoc[tempInt]
      • Unit - Create 1 (Unit-type of hs_targetHero[tempInt]) for tempP at tempLoc facing 270.00 degrees
      • Set p_hero[tempInt] = (Last created unit)
      • Selection - Select p_hero[tempInt] for tempP
      • Cinematic - Clear the screen of text messages for tempPGroup
      • Game - Display to tempPGroup for 12.00 seconds the text: You've chosen your ...
      • Camera - Pan camera for tempP to tempLoc over 0.00 seconds
      • Special Effect - Create a special effect attached to the origin of p_hero[tempInt] using Abilities\Spells\Other\Awaken\Awaken.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Remove (Casting unit) from the game
      • For each (Integer tempInt) from 1 to 8, do (Actions)
        • Loop - Actions
          • Unit - Deny shared vision of hs_hero[(tempInt - 1)] to tempP
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • tempP Not equal to (Player(tempInt))
            • Then - Actions
              • Player - Make tempP treat (Player(tempInt)) as an Ally with shared vision
            • Else - Actions
      • Unit - Deny shared vision of Azura 0009 <gen> to tempP
      • Custom script: call RemoveLocation(udg_tempLoc)
      • Player Group - Remove tempP from tempPGroup
This is where I figured out that the point returns null.

  • HR Revive
    • Events
    • Conditions
    • Actions
      • Set hr_timer = (Expiring timer)
      • Custom script: set udg_hr_handleId = GetHandleId(udg_hr_timer)
      • Game - Display to (Player group(tempP)) for 6.00 seconds the text: (String(hr_handleId))
      • Set hr_hero = (Load 0 of hr_handleId in hr_hashtable)
      • Game - Display to (Player group(tempP)) for 6.00 seconds the text: (Proper name of hr_hero)
      • Set tempP = (Owner of hr_hero)
      • Game - Display to (Player group(tempP)) for 6.00 seconds the text: (Name of tempP)
      • Set tempInt = (Player number of tempP)
      • Game - Display to (Player group(tempP)) for 6.00 seconds the text: (String(tempInt))
      • Camera - Pan camera for tempP to hr_reviveLoc[tempInt] over 0.00 seconds
      • Set tempLoc = hr_reviveLoc[tempInt]
      • Game - Display to (Player group(tempP)) for 6.00 seconds the text: ((String((X of tempLoc))) + (, + (String((Y of tempLoc)))))
      • Hero - Instantly revive hr_hero at tempLoc, Hide revival graphics
      • Camera - Pan camera for tempP to tempLoc over 0.00 seconds
      • Selection - Select hr_hero for tempP
      • Countdown Timer - Destroy (Load 1 of hr_handleId in hr_hashtable)
      • Custom script: call RemoveLocation(udg_tempLoc)
      • Custom script: call DestroyTimer(udg_hr_timer)
      • Hashtable - Clear all child hashtables of child hr_handleId in hr_hashtable
WC3ScrnShot_122016_093433_01.jpg
 
Level 3
Joined
Nov 18, 2015
Messages
41
I don't have the following checked off:
[ ] Enable TESH
[ ] Enable Colorizer
[ ] Don't let WE disable triggers
[ ] Always allow trigger enable
[ ] Mute Editor sounds

Yes I understand I can re-enable the "Always allow trigger enable" but I'm not entirely sure that would be a good fix for the problem.
I should be able to enable the triggers by default, especially considering I've tested it with the default triggers that are created for melee maps, and it still shows me the error, correct?

Also this doesn't help with the weird issue I'm having where one of my variables is reset to null. They may not be connected issues at all, but it does seem somewhat strange.

I can't figure out why my location variable would null itself and I see no place where I would have nulled it.

EDIT: I didn't like the changes in JNGP 2.0 regardless so I reverted back to JNGP5d and the script error I've been getting has been fixed but I'm still having the issue with the variable being nulled. I'll post a topic in the trigger help section.
 
Last edited:
Status
Not open for further replies.
Top