• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Town Portal Trigger Buggy

Status
Not open for further replies.
Level 8
Joined
Jan 8, 2013
Messages
348
i made an won town portal for my map(nsaw) so units wont get stuck in trees near towers or something like that. but for some reason it only works few times or never. and i cant find the problem. can someone help me? :eek:

  • init
    • Ereignisse
      • Map initialization
    • Bedingungen
    • Aktionen
      • Sichtbarkeit - Disable fog of war
      • Sichtbarkeit - Disable black mask
      • Set Port_Regions[1] = (Center of Gebiet 000 <gen>)
      • Set Port_Tower[1] = Rathaus 0000 <gen>
      • Set Port_Regions[2] = (Center of Gebiet 000 Kopieren <gen>)
      • Set Port_Tower[2] = Rathaus 0001 <gen>
      • Set Port_Regions[3] = (Center of Gebiet 000 Kopieren 2 <gen>)
      • Set Port_Tower[3] = Rathaus 0002 <gen>
      • Set Port_Regions[4] = (Center of Gebiet 000 Kopieren 3 <gen>)
      • Set Port_Tower[4] = Rathaus 0003 <gen>
      • Set Port_Regions[5] = (Center of Gebiet 000 Kopieren 4 <gen>)
      • Set Port_Tower[5] = Rathaus 0004 <gen>
      • Set Port_Regions[6] = (Center of Gebiet 000 Kopieren 5 <gen>)
      • Set Port_Tower[6] = Rathaus 0005 <gen>
      • Set Port_Regions[7] = (Center of Gebiet 000 Kopieren 6 <gen>)
      • Set Port_Tower[7] = Rathaus 0006 <gen>
      • Set Max_points = 7
  • Port Cast
    • Ereignisse
      • Einheit - A unit Beginnt, eine Fähigkeit zu wirken
    • Bedingungen
      • (Ability being cast) Gleich Homecoming Stone
    • Aktionen
      • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
      • Set Port_Caster[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Set Port_Duration[(Player number of (Owner of (Triggering unit)))] = 3.00
      • Set Port_Canceled[(Player number of (Owner of (Triggering unit)))] = False
      • Set Port_Regions_3[(Player number of (Owner of (Triggering unit)))] = (Position of Port_Caster[(Player number of (Owner of (Triggering unit)))])
      • Set Port_Regions_5[(Player number of (Owner of (Triggering unit)))] = (Target point of ability being cast)
      • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Target unit of ability being cast) Gleich Keine Einheit
        • 'THEN'-Aktionen
          • Set Port_Unitgroup_2 = (Units within 1000.00 of Port_Regions_5[(Player number of (Owner of (Triggering unit)))] matching (((Matching unit) is Ein Gebäude) Gleich True))
          • Einheitengruppe - Pick every unit in (Random 1 units from Port_Unitgroup_2) and do (Actions)
            • Schleifen - Aktionen
              • Set Port_Target[(Player number of (Owner of (Triggering unit)))] = (Picked unit)
              • Spiel - Display to (All players) the text: Minimap Cast
              • Animation - Change Port_Target[(Player number of (Owner of (Triggering unit)))]'s vertex coloring to (0.00%, 0.00%, 0.00%) with 0.00% transparency
          • Custom script: call DestroyGroup(udg_Port_Unitgroup_2)
        • 'ELSE'-Aktionen
          • Set Port_Target[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
          • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
          • Spiel - Display to (All players) the text: Target Cast
          • Animation - Change Port_Target[(Player number of (Owner of (Triggering unit)))]'s vertex coloring to (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
      • For each (Integer A) from 1 to Max_points, do (Actions)
        • Schleifen - Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • Port_Target[(Player number of (Owner of (Triggering unit)))] Gleich Port_Tower[(Integer A)]
            • 'THEN'-Aktionen
              • Set Port_Regions_2[(Player number of (Owner of (Triggering unit)))] = Port_Regions[(Integer A)]
              • Set Port_Regions_4[(Player number of (Owner of (Triggering unit)))] = (Position of Port_Tower[(Integer A)])
              • Spiel - Display to (All players) the text: Target = Tower
              • Spezialeffekt - Create a special effect at Port_Regions_2[(Player number of (Owner of (Triggering unit)))] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
              • Spezialeffekt - Destroy (Last created special effect)
            • 'ELSE'-Aktionen
      • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
      • Einheit - Create 1 Teleport for (Owner of Port_Caster[(Player number of (Owner of (Triggering unit)))]) at Port_Regions_4[(Player number of (Owner of (Triggering unit)))] facing Vorgabe für Gebäude-Ausrichtung degrees
      • Set Port_Dummy[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
      • Einheit - Create 1 Teleport for (Owner of Port_Caster[(Player number of (Owner of (Triggering unit)))]) at Port_Regions_3[(Player number of (Owner of (Triggering unit)))] facing Vorgabe für Gebäude-Ausrichtung degrees
      • Set Port_Dummy_2[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
      • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
      • Einheitengruppe - Add (Triggering unit) to Port_Unitgroup
      • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
      • Custom script: call RemoveLocation(udg_Port_Regions_3[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call RemoveLocation(udg_Port_Regions_4[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • Custom script: call RemoveLocation(udg_Port_Regions_5[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
      • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
      • Auslöser - Turn on Port Cast Loop <gen>
  • Port Cast Loop
    • Ereignisse
      • Zeit - Every 0.03 seconds of game time
    • Bedingungen
    • Aktionen
      • Einheitengruppe - Pick every unit in Port_Unitgroup and do (Actions)
        • Schleifen - Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • 'IF'-Bedingungen
              • Port_Canceled[(Player number of (Owner of (Picked unit)))] Gleich False
            • 'THEN'-Aktionen
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • 'IF'-Bedingungen
                  • Port_Duration[(Player number of (Owner of (Picked unit)))] Größer als 0.00
                • 'THEN'-Aktionen
                  • Set Port_Duration[(Player number of (Owner of (Picked unit)))] = (Port_Duration[(Player number of (Owner of (Picked unit)))] - 0.03)
                • 'ELSE'-Aktionen
                  • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
                  • Spezialeffekt - Create a special effect at Port_Regions_2[(Player number of (Owner of (Picked unit)))] using MassTeleportCaster.mdx
                  • Spezialeffekt - Destroy (Last created special effect)
                  • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
                  • Einheit - Move Port_Caster[(Player number of (Owner of (Picked unit)))] instantly to Port_Regions_2[(Player number of (Owner of (Picked unit)))]
                  • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
                  • Einheit - Add a 0.01 second Standard expiration timer to Port_Dummy_2[(Player number of (Owner of (Picked unit)))]
                  • Einheit - Add a 0.01 second Standard expiration timer to Port_Dummy[(Player number of (Owner of (Picked unit)))]
                  • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
                  • Einheitengruppe - Remove Port_Caster[(Player number of (Owner of (Picked unit)))] from Port_Unitgroup
                  • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
                  • Custom script: call RemoveLocation(udg_Port_Regions_2[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
                  • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
                  • Animation - Change Port_Target[(Player number of (Owner of (Triggering unit)))]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
                  • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
                  • Spiel - Display to (All players) the text: Move
            • 'ELSE'-Aktionen
              • Spiel - Display to (All players) the text: Duration off
              • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
              • Einheit - Add a 0.01 second Standard expiration timer to Port_Dummy[(Player number of (Owner of (Picked unit)))]
              • Einheit - Add a 0.01 second Standard expiration timer to Port_Dummy_2[(Player number of (Owner of (Picked unit)))]
              • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
              • Custom script: call RemoveLocation(udg_Port_Regions_2[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
              • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • (Number of units in Port_Unitgroup) Gleich 0
        • 'THEN'-Aktionen
          • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
          • Auslöser - Turn off (This trigger)
          • Spiel - Display to (All players) the text: Turn Off This Trigg...
          • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
        • 'ELSE'-Aktionen
  • Port Cancel
    • Ereignisse
      • Einheit - A unit Hört auf, eine Fähigkeit zu wirken
    • Bedingungen
      • (Ability being cast) Gleich Homecoming Stone
    • Aktionen
      • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
      • Set Port_Canceled[(Player number of (Owner of (Triggering unit)))] = True
      • -------- =+=+=+=+=+=+=+=+=+=+=+=+ --------
 

Deleted member 219079

D

Deleted member 219079

Can You post map? Empty map foes well
 

Deleted member 219079

D

Deleted member 219079

Can you use vJass in your map?
 

Deleted member 219079

D

Deleted member 219079

Here I fixed it and made it MUI
 

Attachments

  • port.w3x
    59.3 KB · Views: 51
Level 8
Joined
Jan 8, 2013
Messages
348
thanks ^^

edit: but this have bjs, and bjs leaks or not?

JASS:
     call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_CAST)
 

Deleted member 219079

D

Deleted member 219079

Go see yourself :p in the function list of jngp

TriggerRegisterAnyUnitEventBJ leaves no abstract locals, so it's safe
 
Level 8
Joined
Jan 8, 2013
Messages
348
okay :D then thank you very much :))
perhaps you can help me with anotehr thing. can i write u a pm?
 

Deleted member 219079

D

Deleted member 219079

Go ahead. If it's a system/spell request, you can post it in my spell request thread as well.
 
Status
Not open for further replies.
Top