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

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 24
Joined
Aug 1, 2013
Messages
4,657
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.
 
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