• 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.

Hero siege type campaign - possible?

Status
Not open for further replies.
Level 1
Joined
Jul 16, 2011
Messages
3
I want to let the player choose between heroes in the first map, and let them keep that hero for the rest of the campaign. However, I run into a problem here.
In order to progress to the second map, the players has to enter a rock circle with a hero. The hero is saved into a game cache and the second map gets loaded, but the game uses the last hero I placed on the map regardless of what the player has chosen.

Can anyone provide me with some code I could use (if this is possible at all)? Thanks in advance.
 
Level 11
Joined
Jul 7, 2010
Messages
709
Yes it is possible :D
  • Load Heroes
    • Events
    • Conditions
    • Actions
      • -------- Create The Game Cache --------
      • Game Cache - Create a game cache from DemoCampaign.w3v
      • -------- Load Each Hero --------
      • Trigger - Run Load Hero <gen> (checking conditions)
  • Load Hero
    • Events
    • Conditions
    • Actions
      • -------- Load Hero From Cache --------
      • Game Cache - Restore <Your Hero> from (Last created game cache) for AP1_Player at (Your Place) facing 350.00
      • Set Hero = (Last restored unit)
      • If (Hero Not equal to No unit) then do (Skip remaining actions) else do (Do nothing)
      • -------- Create Default Hero --------
      • Unit - Create 1 Hero for AP1_Player at (Your Place) facing 350.00 degrees
      • Set Hero = (Last created unit)
 
Level 1
Joined
Jul 16, 2011
Messages
3
I knew about that, yes. To make things less complicated, I will enclose the campaign so someone can spot the error I made (hopefully).
 

Attachments

  • surfandturf.w3n
    85.3 KB · Views: 28
Status
Not open for further replies.
Top