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

How to add a grace period?

Status
Not open for further replies.
Level 7
Joined
Mar 9, 2016
Messages
226
I have an alliance system in my map, which is "-ally / -unally" by colors. However, i'd like everyone to start off allied and automatically unally after 10 minutes. They can decide to forge alliances after the grace period has ended. Which would mean that they can't use the "-ally" or "-unally" commands while the grace period lasts.
 
Level 12
Joined
May 22, 2015
Messages
1,051
I imagine there are two triggers for the "-ally" and "-unally" commands. There is a little checkbox somewhere on the trigger editor where you can turn them off or disable them (I forget what they look like because they don't work with JASS so I never use them any more).

Anyway, I think one of them is called "Initially On". Uncheck that one (should grey out the trigger on the side bar). Then, in your trigger where the grace period ends, you can turn those triggers on again.

  • Grace Period
  • Events
    • Time - Time elapsed equal to 600.00 seconds
  • Conditions
  • Actions
    • ---- make everyone unally each other ----
    • Trigger - Turn on <ally command trigger>
    • Trigger - Turn on <unally command trigger>
 
Level 7
Joined
Mar 9, 2016
Messages
226
I imagine there are two triggers for the "-ally" and "-unally" commands. There is a little checkbox somewhere on the trigger editor where you can turn them off or disable them (I forget what they look like because they don't work with JASS so I never use them any more).

Anyway, I think one of them is called "Initially On". Uncheck that one (should grey out the trigger on the side bar). Then, in your trigger where the grace period ends, you can turn those triggers on again.

  • Grace Period
  • Events
    • Time - Time elapsed equal to 600.00 seconds
  • Conditions
  • Actions
    • ---- make everyone unally each other ----
    • Trigger - Turn on <ally command trigger>
    • Trigger - Turn on <unally command trigger>
Ah, its that simple. Thanks.
 
Level 7
Joined
Mar 9, 2016
Messages
226
Remember that a map with only allies is unable to be played in multiplayer, giving the error that you cannot start a map with only one team.

So, you should probably not make them allied initially, but instead make them allied via triggers on map init instead.
That's fine, there are enemy forces. Thanks though.
 
Status
Not open for further replies.
Top