cause when I call it all the Forces I create later dont seem to work. How do I know... well first of all only the first DisplayText works while all others fail (do nothing) as like the call DestroyForce deletes the REAl force and not my Force Variable. How do i fix this so once another trigger is run this works again
...why? Oh you mean only to use this antileak on PlayerGroup(Triggering player) But wont it make the same mistake like with All Players.
I mean if it deletes it wont it delete the Triggering Player's force too (I want to use it later too...)
not nice... ill leave this leak in the map ... its safer. My map is too big to allow myself to make a mistake like that, i wont be able to find it. Thanx for the info
(All players) does not leak, so it is not "leaving a leak in your map". There are two main types of object to consider:
1. An object that exists perpetually; (All Players) is one of these. So is (Playable map area). Also, converting player to force (if you know the index of the player, that is) is another perpetually-existing object that should not be removed.
2. A dynamic object that gets created and destroyed throughout the game. (Enemies of (Triggering player)) is one of these. So is (Entire map). Converting player to force if you don't know the index of the player will cause a new force to be created and leaked.
I'm having soem troubles with a few of the triggers I made in my new map. They look like this:
Ereignisse:
Zeit - Every 1 second of game time
Bedingungen:
Aktionen:
set TempBlauRunner = (units owned by player 2 (blue) matching (((Unit-type of (matching unit)) gleich Runner) and ((custom value of (matching unit)) gleich 0)))
If (All conditions are true) then do (then actions) else do (else actions)
If: custom value of unit gleich 0
Then do: Pick every unit in TempBlauRunner and order (picked unit) to...
So the trigger itself works well, but it seems to cause leaks cause when I start the map it run perfectly but after a while it starts lagging and the longer I play the worse it gets. I turned off the trigger to see if it's this trigger which is causing the leaks and the map ran perfectly.
Can you please help me? What did I do wrong?
I used this trigger several times with different orders (for different situations in the game):
- Einheit - Order (Picked unit) to Rechtsklick (Random item in Spielfeld <gen> matching ((Item-type of (Matching item)) Gleich Bombe))
- Einheit - Order (Picked unit) to Angreifen (Random unit from (Units owned by Spieler 1 (Rot) matching ((Item-type of (Item carried by (Matching unit) in slot 1)) Gleich Bombe)))
- Einheit - Order (Picked unit) to Folgen (Random unit from (Units owned by Spieler 2 (Blau) matching ((Item-type of (Item carried by (Matching unit) in slot 1)) Gleich Bombe)))
- Einheit - Order (Picked unit) to Bewegen nach TempPunktAngriff
- Einheit - Order (Picked unit) to Angreifen/Bewegen nach TempPunktAngriff
Sorry for all the german words in between, that's how my WE displays the triggers... if you need me to translate just tell me
I removed the "TempPunktAngriff" variable within the "Pick every unit..." action to avoid leaks, so this is what one of them looks like right now:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Bedingungen
BombeBesitzer Gleich 2
'THEN'-Aktionen
Set TempBlauBall = (Units owned by Spieler 2 (Blau) matching (((Unit-type of (Matching unit)) Gleich Runner (Blau)) and ((Custom value of (Matching unit)) Gleich 2)))
Einheitengruppe - Pick every unit in TempBlauBall and do (Actions)
Schleifen - Aktionen
Set TempPunktAngriff = (Center of Endgebiet Orc <gen>)
Einheit - Order (Picked unit) to Bewegen nach TempPunktAngriff
Custom script: call RemoveLocation(udg_TempPunktAngriff)
Custom script: call DestroyGroup(udg_TempBlauBall)
'ELSE'-Aktionen
(Random unit from (Units owned by Spieler 1 (Rot) matching ((Item-type of (Item carried by (Matching unit) in slot 1)) Gleich Bombe)))
Leaks a unit group.
So does this:
Einheit - Order (Picked unit) to Folgen (Random unit from (Units owned by Spieler 2 (Blau) matching ((Item-type of (Item carried by (Matching unit) in slot 1)) Gleich Bombe)))
Thanks alot! :thup: You're right, I didn't think of it as a unit group because the item "bombe" only exists once in this map. :banghead:
So what about this one:
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
'IF'-Bedingungen
BombeBesitzer Gleich 0
'THEN'-Aktionen
Set TempBlauRunner = (Units owned by Spieler 2 (Blau) matching (((Unit-type of (Matching unit)) Gleich Runner (Blau)) and ((Custom value of (Matching unit)) Gleich 0)))
Einheitengruppe - Pick every unit in TempBlauRunner and do (Actions)
Schleifen - Aktionen
Einheit - Order (Picked unit) to Rechtsklick (Random item in Spielfeld <gen> matching ((Item-type of (Matching item)) Gleich Bombe))
Custom script: call DestroyGroup(udg_TempBlauRunner)
'ELSE'-Aktionen
Is there such thing as an item group? And what's the custom script to remove it?
I'm on a page about incorrect corrections, and spent the better part of like two hours trying to get someone to understand that -5^2 = -25, not 25, and then that post had comments get reposted because that group is self sustaining, and that person was in turn trying to explain what I just explained to them. And I'm taking that as a victory
I will be AFK for a couple of days you guys hold down the fort while I am gone. I will be checking in on my phone but that will severly limit me. Be back saturday!
I just got to watch the video because even though I was there I was trying to work out tech problems with the chat since I was the social media guy so I was distracted but check it out guys the video is super fucking great!