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

[Spell] Summon Golem Bugging if used by multiple people

Status
Not open for further replies.
Level 1
Joined
Nov 17, 2015
Messages
3
The Summon Golem spell is bugging if multiple people cast the spell, one person gets all of the golems, the rest get none. Im attaching the map, if someone could either Fix the spell or change it and have it work the same way its intended. it would be appreciated. If you could also explain what changes you did to the spell. (im new to the warcraft 3 editor).
 

Attachments

  • Battle in Magicforest [1.2].w3x
    3.6 MB · Views: 44
Level 13
Joined
Mar 24, 2013
Messages
1,105
Looks like in the loop you do not deindex the player or the point. You need to set SG_Player[CurrentIndex] = SG_Player[MaxIndex] same for point. Also be sure to destroy the point first.
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
Well most of the content of this map is not on the level of what I would characterize as someone "new" to the wc3 editor...but that I guess is another issue all together.

When wanting help with a problem you will much more readily receive the help needed if you post the triggers in question. As most people will not download the map and then sift through it to find the problem in question.

I believe from what I can tell that you're missing the three lines between the asterisks (*) in the attached trigger.

  • Summon Golem
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Summon Golem
    • Actions
      • Set SG_Index = (SG_Index + 1)
      • Set SG_TempPoint[SG_Index] = (Target point of ability being cast)
      • Set SG_count_tmp[SG_Index] = 0
      • Set SG_Player[SG_Index] = (Owner of (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SG_Index Equal to 1
        • Then - Actions
          • Trigger - Turn on Summon Golem loop <gen>
        • Else - Actions
  • Summon Golem loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer SG_loopInteger) from 1 to SG_Index, do (Actions)
        • Loop - Actions
          • Set SG_count_tmp[SG_loopInteger] = (SG_count_tmp[SG_loopInteger] + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SG_count_tmp[SG_loopInteger] Greater than or equal to 43
            • Then - Actions
              • Set SG_rand = (Random integer number between 1 and 20)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SG_rand Less than or equal to 6
                • Then - Actions
                  • Unit - Create 1 Rock Golem for SG_Player[SG_loopInteger] at SG_TempPoint[SG_loopInteger] facing Default building facing degrees
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SG_rand Less than or equal to 12
                  • SG_rand Greater than 6
                • Then - Actions
                  • Unit - Create 1 Fire Golem for SG_Player[SG_loopInteger] at SG_TempPoint[SG_loopInteger] facing Default building facing degrees
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SG_rand Less than or equal to 18
                  • SG_rand Greater than 12
                • Then - Actions
                  • Unit - Create 1 Crystal Golem for SG_Player[SG_loopInteger] at SG_TempPoint[SG_loopInteger] facing Default building facing degrees
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • SG_rand Greater than 18
                • Then - Actions
                  • Unit - Create 1 Shadow Golem for SG_Player[SG_loopInteger] at SG_TempPoint[SG_loopInteger] facing Default building facing degrees
                • Else - Actions
              • Animation - Play (Last created unit)'s birth animation
              • Unit - Add a 20.00 second Generic expiration timer to (Last created unit)
              • **************
              • Custom script: call RemoveLocation(udg_SG_TempPoint[udg_SG_loopInteger])
              • Set SG_Player[SG_loopInteger] = SG_Player[SG_Index]
              • Set SG_TempPoint[SG_loopInteger] = SG_TempPoint[SG_Index]
                • **************
                • Set SG_count_tmp[SG_loopInteger] = SG_count_tmp[SG_Index]
                • Set SG_Index = (SG_Index - 1)
                • Set SG_loopInteger = (SG_loopInteger - 1)
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • SG_Index Equal to 0
                  • Then - Actions
                    • Trigger - Turn off (This trigger)
                  • Else - Actions
            • Else - Actions
 
Status
Not open for further replies.
Top