• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Question about Removing leak

Status
Not open for further replies.
Level 2
Joined
Sep 1, 2011
Messages
12
So I have this trigger. I want to remove the Rainbow_Point, but how?
I know I have to use something similar to
call RemoveLocation (udg_Rainbow_Point).
But the problem is it's an array and I don't know how to remove that with [Player number of...ect].
Yes, it's a German version. xD

  • Rainbow
    • Ereignisse
      • Spiel - GDD_Event becomes Gleich 0.00
    • Bedingungen
      • (GDD_DamageSource has an item of type Rainbow Sword) Gleich True
    • Aktionen
      • Set Rainbow_Point[(Player number of (Owner of GDD_DamageSource))] = (Position of GDD_DamageSource)
      • Set RandomNumber[(Player number of (Owner of GDD_DamageSource))] = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • RandomNumber[(Player number of (Owner of GDD_DamageSource))] Kleiner gleich 5
        • 'THEN'-Aktionen
          • Einheit - Create 1 Dummy_1 for (Owner of GDD_DamageSource) at Rainbow_Point[(Player number of (Owner of GDD_DamageSource))] facing (Position of GDD_DamageSource)
          • Einheit - Order (Last created unit) to Menschen-Priester - 'Inneres Feuer' GDD_DamageSource
          • Einheit - Add a 0.05 second Standard expiration timer to (Last created unit)
        • 'ELSE'-Aktionen
 
  • Rainbow
    • Ereignisse
      • Spiel - GDD_Event becomes Gleich 0.00
    • Bedingungen
      • (GDD_DamageSource has an item of type Rainbow Sword) Gleich True
    • Aktionen
      • Set i = (Player number of (Owner of GDD_DamageSource))
      • Set Rainbow_Point[i] = (Position of GDD_DamageSource)
      • Set RandomNumber[i] = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • RandomNumber[i] Kleiner gleich 5
        • 'THEN'-Aktionen
          • Einheit - Create 1 Dummy_1 for (Owner of GDD_DamageSource) at Rainbow_Point[i] facing (Position of GDD_DamageSource)
          • Einheit - Order (Last created unit) to Menschen-Priester - 'Inneres Feuer' GDD_DamageSource
          • Einheit - Add a 0.05 second Standard expiration timer to (Last created unit)
        • 'ELSE'-Aktionen
      • Custom script: call RemoveLocaiton(udg_Rainbow_Point[udg_i])
Where 'i' is custom integer variable created via GUI variable editor.
If hive supports German editor, Why doesn't it support Polish one? ;/
 
Last edited:
Level 9
Joined
Jul 10, 2011
Messages
562
the best way to do this is to preset the [player number ....] thingi in a variable an then do this :

call RemoveLocation (udg_Rainbow_Point[udg_TempInterger])

where TempInteger is the preset player number thing.

i hope i helped you. :thumbs_up:

EDIT:Damn Spinnaker was faster -.-
 
Level 8
Joined
Jan 8, 2010
Messages
493
i don't know JASS, so sometimes when using custom scripts that requires something like the JASS-version of Owner Of Triggering Unit, Triggering Player, etc. i create a trigger, copy whatever action shows such (like Set A = Triggering Player), then convert the created trigger to Custom Text. then i just look for the JASS-version of whatever you're looking for. they're usually almost the same (Triggering Player => GetTriggerPlayer)
X3
 
Level 8
Joined
Jan 8, 2010
Messages
493
GDD_DamageSource doesn't leak. what Pharaoh_ said is the position of GDD_DamageSource. you used Units - Create Unit Facing Point (well wait, what is it on German?) which uses two locations, 1) position of the created unit and 2) position of the unit that the created unit will be facing. Position Of GDD_DamageSource will refer to the number 2 leak.

and it looks MPI for a player with only 1 instance of the unit. but just like Pharaoh said, you can just use Rainbow_Point without the array since it's an instant spell anyway. (Spinnaker also told me much the same thing)
 
Level 2
Joined
Sep 1, 2011
Messages
12
Thanks for the explanation xD

And don't bother yourself to think "What would that be in German?" or something like that.
Just write it in english. I think i will understand most of it. If not, i will ask.

For future Trigger I will try to do everything in english. So translate german parts to english.
I totally forgot about the german parts in these trigger.

My problem is solved, but how do I change it to [Solved]? oO
 
Status
Not open for further replies.
Top