• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Unsolved: Load Game Cache unit from a Variable?

Status
Not open for further replies.
Level 20
Joined
Jan 6, 2008
Messages
2,627
Hi, i got these triggers, the PLAYER_CONTROLLER is the selected thing my selection system creates, the problem is, it wont load.
  • Ok
    • Events
      • Dialog - A dialog button is clicked for Dialog
    • Conditions
      • (Clicked dialog button) Equal to Dialog_BTN[2]
    • Actions
      • -------- Male --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Name2 <gen> is on) Equal to True
        • Then - Actions
          • -------- If condition shall be Name_String equal to True --------
          • -------- Imperial --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of Unit) Equal to Imperial
            • Then - Actions
              • Unit - Create 1 Imperial for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER = (Last created unit)
              • Unit - Create 1 Imperial for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER2 = (Last created unit)
              • Camera - Pan camera for Player 1 (Red) to (Position of PLAYER_CONTROLLER) over 1.00 seconds
              • Selection - Select PLAYER_CONTROLLER for Player 1 (Red)
            • Else - Actions
          • -------- Khajiit --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of Unit) Equal to Khajiit
            • Then - Actions
              • Unit - Create 1 Khajiit for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER = (Last created unit)
              • Unit - Create 1 Khajiit for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER2 = (Last created unit)
              • Camera - Pan camera for Player 1 (Red) to (Position of PLAYER_CONTROLLER) over 1.00 seconds
              • Selection - Select PLAYER_CONTROLLER for Player 1 (Red)
            • Else - Actions
          • -------- Orc --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of Unit) Equal to Orc
            • Then - Actions
              • Unit - Create 1 Orc for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER = (Last created unit)
              • Unit - Create 1 Orc for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER2 = (Last created unit)
              • Camera - Pan camera for Player 1 (Red) to (Position of PLAYER_CONTROLLER) over 1.00 seconds
              • Selection - Select PLAYER_CONTROLLER for Player 1 (Red)
            • Else - Actions
          • -------- Dark Elf --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of Unit) Equal to Dark Elf
            • Then - Actions
              • Unit - Create 1 Dark Elf for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER = (Last created unit)
              • Unit - Create 1 Dark Elf for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER2 = (Last created unit)
              • Camera - Pan camera for Player 1 (Red) to (Position of PLAYER_CONTROLLER) over 1.00 seconds
              • Selection - Select PLAYER_CONTROLLER for Player 1 (Red)
            • Else - Actions
          • -------- Redguard --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of Unit) Equal to Redguard
            • Then - Actions
              • Unit - Create 1 Redguard for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER = (Last created unit)
              • Unit - Create 1 Redguard for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER2 = (Last created unit)
              • Camera - Pan camera for Player 1 (Red) to (Position of PLAYER_CONTROLLER) over 1.00 seconds
              • Selection - Select PLAYER_CONTROLLER for Player 1 (Red)
            • Else - Actions
        • Else - Actions
      • -------- Female --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Name2 <gen> is on) Equal to True
        • Then - Actions
          • -------- If condition shall be Name_String equal to True --------
          • -------- Imperial --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of Unit) Equal to Imperial
            • Then - Actions
              • Unit - Create 1 Imperial for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER = (Last created unit)
              • Unit - Create 1 Imperial for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER2 = (Last created unit)
              • Camera - Pan camera for Player 1 (Red) to (Position of PLAYER_CONTROLLER) over 1.00 seconds
              • Selection - Select PLAYER_CONTROLLER for Player 1 (Red)
            • Else - Actions
          • -------- Khajiit --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of Unit) Equal to Khajiit
            • Then - Actions
              • Unit - Create 1 Khajiit for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER = (Last created unit)
              • Unit - Create 1 Khajiit for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER2 = (Last created unit)
              • Camera - Pan camera for Player 1 (Red) to (Position of PLAYER_CONTROLLER) over 1.00 seconds
              • Selection - Select PLAYER_CONTROLLER for Player 1 (Red)
            • Else - Actions
          • -------- Orc --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of Unit) Equal to Orc
            • Then - Actions
              • Unit - Create 1 Orc for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER = (Last created unit)
              • Unit - Create 1 Orc for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER2 = (Last created unit)
              • Camera - Pan camera for Player 1 (Red) to (Position of PLAYER_CONTROLLER) over 1.00 seconds
              • Selection - Select PLAYER_CONTROLLER for Player 1 (Red)
            • Else - Actions
          • -------- Dark Elf --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of Unit) Equal to Dark Elf
            • Then - Actions
              • Unit - Create 1 Dark Elf for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER = (Last created unit)
              • Unit - Create 1 Dark Elf for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER2 = (Last created unit)
              • Camera - Pan camera for Player 1 (Red) to (Position of PLAYER_CONTROLLER) over 1.00 seconds
              • Selection - Select PLAYER_CONTROLLER for Player 1 (Red)
            • Else - Actions
          • -------- Redguard --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of Unit) Equal to Redguard
            • Then - Actions
              • Unit - Create 1 Redguard for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER = (Last created unit)
              • Unit - Create 1 Redguard for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
              • Set PLAYER_CONTROLLER2 = (Last created unit)
              • Camera - Pan camera for Player 1 (Red) to (Position of PLAYER_CONTROLLER) over 1.00 seconds
              • Selection - Select PLAYER_CONTROLLER for Player 1 (Red)
            • Else - Actions
        • Else - Actions
      • Selection - Add PLAYER_CONTROLLER to selection
      • Game Cache - Create a game cache from Selection System.w3x
      • Game Cache - Save Game_Cache
      • Game Cache - Store PLAYER_CONTROLLER as Custom_Name of Category in Game_Cache
      • Game Cache - Store PLAYER_CONTROLLER2 as Custom_Name of Category in Game_Cache
      • Game - Set campaign to Human Campaign
      • Game - Set the next level to Maps\Oblivion Map.w3x
      • Game - Victory Player 1 (Red) (Skip dialogs, Skip scores)



  • Ini
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Game Cache - Restore PLAYER_CONTROLLER of Category from Game_Cache for Player 1 (Red) at (Center of (Playable map area)) facing (Position of (Triggering unit))
      • Game Cache - Restore PLAYER_CONTROLLER2 of Category from Game_Cache for Player 1 (Red) at (Center of (Playable map area)) facing (Position of (Triggering unit))
      • Game Cache - Store PLAYER_CONTROLLER as Custom_Name of Category in Game_Cache
The problem is, that i said before, PLAYER_CONTROLLER wont show up.
 
  • Game Cache - Restore PLAYER_CONTROLLER of Category from Game_Cache for Player 1 (Red) at (Center of (Playable map area)) facing (Position of (Triggering unit))
Facing position of triggering unit? What unit? Restore it facing angle instead, e.g. 90 angle.
  • Game Cache - Store PLAYER_CONTROLLER as Custom_Name of Category in Game_Cache
You restore it in the last trigger and then you store it again? What for?
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
Lol..i think you don´t need all that


  • Conditions
    • Or - Any (Conditions) are true
      • Conditions
        • (Unit-type of (Triggering unit)) Equal to <Your Unit Type>
        • (Unit-type of (Triggering unit)) Equal to <Your Unit Type>
        • (Unit-type of (Triggering unit)) Equal to <Your Unit Type>
  • Actions
    • Set FIXLAGS = (Center of (Playable map area))
    • Unit - Create 1 (Unit-type of (Triggering unit)) for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
    • Custom script: call RemoveLocation(udg_FIXLAGS)
i hope you know how to do your trigger now......


i think something is missing in (Unit-type of Unit) Equal to Imperial an others

(Unit-type of <what unit?>)
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
i think you should do your selection system a lot more easier,like in Diablo 2 or hell gate London......


in hell gate london

if you have 6 heros.....

firstly you see hero 1

than if you press left arrow - hero 6,...

than if you press right arrow - hero 1,again press - hero 5,again press -hero 4....


if you would do it like in diablo

firstly you see all 6 heroes

and when you select one of them

he shows closer to you



i´m not sure but i think your system takes 0.9 mb witch could be all map memory...
and i think there is one more thing,can your system be able to all players at the same time?,if not it may take 3 min to start the game...
 
Status
Not open for further replies.
Top