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

[Trigger] custom script for a location

Status
Not open for further replies.
Level 4
Joined
Apr 30, 2007
Messages
62
hello i wanted to know the custom script for this funktion:

the start i have:
call ReviveHeroLoc(OURHERO, GetRectCenter(gg_rct_REV), true)

rev = a variable with 10 arrays (for all 10 players) so i want to have it like this but i dont know the custom cript code for it:

call ReviveHeroLoc(OURHERO, GetRectCenter(gg_rct_REV(GetOwningPlayer(OURHERO)), true)

EDIT: tried this call ReviveHeroLoc(OURHERO, GetRectCenter(gg_rct_AREV), true)
local integer i=GetPlayerId(GetOwningPlayer(OURHERO))
Had error in the first code ...

THX
 
Level 4
Joined
Apr 30, 2007
Messages
62
but its gui with custom script :p

PS: i allready got some help but it dont work either here is my trigger pls someone help >.<

  • revive
    • Ereignisse
      • Einheit - A unit Stirbt
    • Bedingungen
      • ((Triggering unit) is Ein Held) Gleich True
    • Aktionen
      • Custom script: local timerdialog WINDOW
      • Custom script: local integer HEROWAIT
      • Custom script: local timer OURTIMER
      • Custom script: local unit OURHERO
      • Custom script: local integer i=GetConvertedPlayerId(GetOwningPlayer(OURHERO))
      • Set A_TOT[(Player number of (Owner of (Triggering unit)))] = 1
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • AREVIVE[(Player number of (Owner of (Triggering unit)))] Gleich 1
        • 'THEN'-Aktionen
          • Gebiet - Center AREV[(Player number of (Owner of (Triggering unit)))] on (Center of Save Point 0 <gen>)
        • 'ELSE'-Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • AREVIVE[(Player number of (Owner of (Triggering unit)))] Gleich 2
        • 'THEN'-Aktionen
          • Gebiet - Center AREV[(Player number of (Owner of (Triggering unit)))] on (Center of Save Point 1 <gen>)
        • 'ELSE'-Aktionen
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Bedingungen
          • AREVIVE[(Player number of (Owner of (Triggering unit)))] Gleich 3
        • 'THEN'-Aktionen
          • Gebiet - Center AREV[(Player number of (Owner of (Triggering unit)))] on (Center of Save Point 2 <gen>)
        • 'ELSE'-Aktionen
      • Custom script: set OURHERO = GetDyingUnit()
      • Custom script: set HEROWAIT = ( GetHeroLevel(OURHERO) )
      • Custom script: set OURTIMER = CreateTimer()
      • Custom script: call StartTimerBJ( OURTIMER, false, ( I2R(HEROWAIT) ))
      • Custom script: call CreateTimerDialogBJ ( OURTIMER, GetPlayerName(GetOwningPlayer(OURHERO)) )
      • Custom script: set WINDOW = GetLastCreatedTimerDialogBJ()
      • Custom script: call TimerDialogDisplayForPlayerBJ( true, WINDOW, GetOwningPlayer(OURHERO) )
      • Custom script: call PolledWait( HEROWAIT )
      • Custom script: call ReviveHeroLoc(OURHERO, GetRectCenter(udg_AREV[i]), true)
      • Custom script: call PanCameraToTimedLocForPlayer( GetOwningPlayer(OURHERO), GetUnitLoc(OURHERO), 0.60 )
      • Custom script: call DestroyTimerDialog(WINDOW)
      • Set A_TOT[(Player number of (Owner of (Triggering unit)))] = 0
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Custom script: local unit OURHERO
Custom script: local integer i=GetConvertedPlayerId(GetOwningPlayer(OURHERO))

OURHERO is uninitialised, which means you can't set i = GetConvertedPlayerId(GetOwningPlayer(null))

Also a big mistake is that Player(0) in jass in Player(1) in GUI.
If you set AREV[a player] in GUI, you need to use
udg_AREV[a player + 1].
 
Status
Not open for further replies.
Top