Item error event

NeosDany

Member
Reaction score
1
I am making a trigger that works this way : you launch a skill ( dissipate ) and in 200 AoE it takes all the items scattered around and they go in your hero. All my heros are in an integer array, all works fine, I cast the spell and the items go to the hero, but when I cast the same spell in the place where the items were, I get the items again, but the items are not there anymore, why I am still getting the items?
 

NeosDany

Member
Reaction score
1
Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Ability being cast) Equal to Agarrar Objetos
    • Then - Actions
      • Set Temp_Point = (Target point of ability being cast)
      • Item - Pick every item in (Region centered at Temp_Point with size (300.00, 300.00)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 1 <gen> contains (Casting unit)) Equal to True
            • Then - Actions
              • Hero - Give (Picked item) to Heroes[1]
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 2 <gen> contains (Casting unit)) Equal to True
            • Then - Actions
              • Hero - Give (Picked item) to Heroes[2]
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 3 <gen> contains (Casting unit)) Equal to True
            • Then - Actions
              • Hero - Give (Picked item) to Heroes[3]
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 4 <gen> contains (Casting unit)) Equal to True
            • Then - Actions
              • Hero - Give (Picked item) to Heroes[4]
            • Else - Actions
      • Custom script: call RemoveLocation (udg_Temp_Point)
    • Else - Actions
 

-OverpoweR-

Member
Reaction score
13
NeosDany said:
Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Ability being cast) Equal to Agarrar Objetos
    • Then - Actions
      • Set Temp_Point = (Target point of ability being cast)
      • Item - Pick every item in (Region centered at Temp_Point with size (300.00, 300.00)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 1 <gen> contains (Casting unit)) Equal to True
            • Then - Actions
              • Hero - Give (Picked item) to Heroes[1]
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 2 <gen> contains (Casting unit)) Equal to True
            • Then - Actions
              • Hero - Give (Picked item) to Heroes[2]
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 3 <gen> contains (Casting unit)) Equal to True
            • Then - Actions
              • Hero - Give (Picked item) to Heroes[3]
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 4 <gen> contains (Casting unit)) Equal to True
            • Then - Actions
              • Hero - Give (Picked item) to Heroes[4]
            • Else - Actions
      • Custom script: call RemoveLocation (udg_Temp_Point)
    • Else - Actions

please use wc3 tags on the triggers, [wc3.] in the beginning and [/wc3.] in the end ( without the . )
 

NeosDany

Member
Reaction score
1
But why the items didnt dissapear from the game, if I have already got them, do they become invisible or something?
 

NeosDany

Member
Reaction score
1
I have made this new trigger, the items are given to the hero, but if you use the skill in the place where the hero is, you get the items like if they were there hidden, any idea ?

Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Ability being cast) Equal to Agarrar Objetos
    • Then - Actions
      • Set Temp_Point = (Target point of ability being cast)
      • Item - Pick every item in (Region centered at Temp_Point with size (300.00, 300.00)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 1 <gen> contains (Casting unit)) Equal to True
            • Then - Actions
              • Set Temp_Point2 = (Position of Heroes[1])
              • Item - Move (Picked item) to Temp_Point2
              • Hero - Give (Picked item) to Heroes[1]
              • Custom script: call RemoveLocation (udg_Temp_Point2)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 2 <gen> contains (Casting unit)) Equal to True
            • Then - Actions
              • Set Temp_Point2 = (Position of Heroes[2])
              • Item - Move (Picked item) to Temp_Point2
              • Hero - Give (Picked item) to Heroes[2]
              • Custom script: call RemoveLocation (udg_Temp_Point2)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 3 <gen> contains (Casting unit)) Equal to True
            • Then - Actions
              • Set Temp_Point2 = (Position of Heroes[3])
              • Item - Move (Picked item) to Temp_Point2
              • Hero - Give (Picked item) to Heroes[3]
              • Custom script: call RemoveLocation (udg_Temp_Point2)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Player 4 <gen> contains (Casting unit)) Equal to True
            • Then - Actions
              • Set Temp_Point2 = (Position of Heroes[4])
              • Item - Move (Picked item) to Temp_Point2
              • Hero - Give (Picked item) to Heroes[4]
              • Custom script: call RemoveLocation (udg_Temp_Point2)
            • Else - Actions
      • Custom script: call RemoveLocation (udg_Temp_Point)
    • Else - Actions
 

-OverpoweR-

Member
Reaction score
13
nope sorry :( cant figure it out, hopefully someone else will help you out soon,just be patient a little
 

B0ndo

New Member
Reaction score
4
Try seperating the trigger into 4 triggers (1 for each player) I think it has something to do with the Temp_Point. That it's not removed properly. That's my guess.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
Could you post the map, or a sample of it? It's hard to tell what's going wrong when we have no idea what references to what.
 

NeosDany

Member
Reaction score
1
Found that this stupid error only happens when the collected items are power ups.
Do power up items leave some kind of invisible item of themselves?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top