Multiple Questions.

-Brainiac-

New Member
Reaction score
7
Hey I got a few problems to fix and then I can bring out my map but first the questions...

(Maybe some simple questions but I'm not that good at Map making (yet))

Q1. Creating a Timer like this:
Trigger:
  • Event
    • Unit - A unit Dies
    • Conditions
    • Actions
    • Countdown Timer - Start Dead_Timer as a One-shot timer that will expire in 20.00 seconds
    • Countdown Timer - Create a timer window for (Last started timer) with title ((Name of (Triggering unit)) + wil revive in<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />
    • Custom script: call Destroy*(udg_Death_Timer)


Q2. My text doesn't fit in the timer window... How do I make the horizontal wide of the timerwindow bigger?

Q3. How do you make the money of a player decrease when his hero dies? like; "Hero dies, then the player loses (Hero level)x(35) gold"?

Q4. Somehow I can't get the camera working... I got this:

Trigger:
  • Hero Reviving
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A Hero) Equal to True
          • ((Triggering unit) belongs to an ally of Player 1 (Red)) Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: (A hero from the Northern Forces died, and will come back to life in 20 seconds: + (Proper name of (Triggering unit)))
          • Countdown Timer - Start Dead_Timer as a One-shot timer that will expire in 20.00 seconds
          • Countdown Timer - Create a timer window for (Last started timer) with title ((Name of (Triggering unit)) + will revive in<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />
          • Wait 20.00 game-time seconds
          • Set TempPoint = (Center of Heroes North &lt;gen&gt;)
          • Hero - Instantly revive (Triggering unit) at TempPoint, Hide revival graphics
          • Camera - Pan camera for (Owner of (Triggering unit)) to TempPoint over 0.00 seconds
          • Custom script: call RemoveLocation(udg_TempPoint)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A Hero) Equal to True
          • ((Triggering unit) belongs to an ally of Player 5 (Yellow)) Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: (A hero from the Southern Forces died, and will come back to life in 20 seconds: + (Proper name of (Triggering unit)))
          • Countdown Timer - Start Dead_Timer as a One-shot timer that will expire in 20.00 seconds
          • Countdown Timer - Create a timer window for (Last started timer) with title ((Name of (Triggering unit)) + will revive in<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />
          • Wait 20.00 game-time seconds
          • Set TempPoint = (Center of Heroes South &lt;gen&gt;)
          • Hero - Instantly revive (Triggering unit) at TempPoint, Hide revival graphics
          • Camera - Pan camera for (Owner of (Triggering unit)) to TempPoint over 0.00 seconds
          • Custom script: call RemoveLocation(udg_TempPoint)
        • Else - Actions


Note: this includes my countdown timer as you see...

Q5. I got two triggers so set the Fog of War for a certain region on and off.. but once I put it off, and want to set it to on again it automaticcaly turns back off... I have to following:

Trigger:
  • Turn Fog of War Off
    • Events
      • Player - Player 1 (Red) types a chat message containing -fowoff as An exact match
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Fog of War has been...
      • Set Players_North = (All allies of Player 1 (Red))
      • Set Players_South = (All allies of Player 5 (Yellow))
      • Player Group - Pick every player in Players_North and do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across FOW NORTH &lt;gen&gt;
      • Player Group - Pick every player in Players_South and do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across FOW SOUTH &lt;gen&gt;
      • Custom script: call DestroyForce(udg_Players_South)
      • Custom script: call DestroyForce(udg_Players_North)

Trigger:
  • Turn Fog of War On
    • Events
      • Player - Player 1 (Red) types a chat message containing -fowon as An exact match
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Fog of War has been...
      • Trigger - Turn off Turn Fog of War Off &lt;gen&gt;
      • Set Players_North = (All allies of Player 1 (Red))
      • Set Players_South = (All allies of Player 5 (Yellow))
      • Player Group - Pick every player in Players_North and do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Fog of war across FOW NORTH &lt;gen&gt;
      • Player Group - Pick every player in Players_South and do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Fog of war across FOW SOUTH &lt;gen&gt;
      • Custom script: call DestroyForce(udg_Players_South)
      • Custom script: call DestroyForce(udg_Players_North)


Q6. If anything in my triggers is wrong please correct me! :D

*: What is supposed to be here?

Thanks in Advance, Regards Brain:D
 

reyghost

New Member
Reaction score
14
I can answer only to Q3 :eek: and not sure if its correct

Trigger:
  • trigger
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is a Hero) Equal to True
    • Actions
      • Set player = (Owner of (Triggering unit))
      • Player - Set player Current gold to ((player Current gold) - ((Hero level of (Triggering unit)) x 35))


Not sure if its valid for all players in the game (is that called MPI?) not sure if "triggering unit" is and if that player var will work.
 

-Brainiac-

New Member
Reaction score
7
Thanks, I'll try if it works! Will tell you in 10 mins how it went :D

EDIT:

this is what I did:
Trigger:
  • Loss trough Death
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set Player = (Owner of (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering unit) is A Hero) Equal to True
        • Then - Actions
          • Player Group - Pick every player in (All players) and do (Actions)
            • Loop - Actions
              • Player - Set Player Current gold to ((Player Current gold) - ((Hero level of (Triggering unit)) x 35))
        • Else - Actions


Just need to test it... hold on ^^

Does work but, i'm doubting myself if it will take the gold from all players or just the particallury one?... Think all players :p maybe reyghost's trigger was better...

+rep for you ^^
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Yeah, use reyghost's one instead ;)

1. Well, I'm not really sure what the question is here, but here's how i'd do the revive stuff (Which basically is questions 1 and 4 ;))

Trigger:
  • Start Timer
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Temp_Hero[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
      • Countdown Timer - Start Death_Timer[(Player number of (Owner of (Triggering unit)))] as a One-shot timer that will expire in 20.00 seconds
      • Countdown Timer - Create a timer window for Death_Timer[(Player number of (Owner of (Triggering unit)))] with title Your Hero will revi...
      • Countdown Timer - Hide (Last created timer window)
      • Countdown Timer - Show (Last created timer window) for (Owner of (Triggering unit))
      • Set Death_Window[(Player number of (Owner of (Triggering unit)))] = (Last created timer window)


Trigger:
  • Destroy Timer
    • Events
      • Time - Death_Timer[1] expires
      • Time - Death_Timer[2] expires
      • Time - Death_Timer[3] expires
      • Time - Death_Timer[4] expires
      • Time - Death_Timer[5] expires
      • Time - Death_Timer[6] expires
      • Time - Death_Timer[7] expires
      • Time - Death_Timer[8] expires
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Remaining time for Death_Timer[(Integer A)]) Less than or equal to 0.00
              • (Temp_Hero[(Integer A)] is alive) Not equal to True
            • Then - Actions
              • Countdown Timer - Pause Death_Timer[(Integer A)]
              • Countdown Timer - Destroy Death_Window[(Integer A)]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Temp_Hero[(Integer A)] belongs to an ally of Player 1 (Red)) Equal to True
                • Then - Actions
                  • Set TempPoint = (Center of Region 1 &lt;gen&gt;)
                  • Hero - Instantly revive Temp_Hero[(Integer A)] at TempPoint, Hide revival graphics
                  • Camera - Pan camera for (Owner of Temp_Hero[(Integer A)]) to TempPoint over 0.00 seconds
                  • Custom script: call RemoveLocation(udg_TempPoint)
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Temp_Hero[(Integer A)] belongs to an ally of Player 5 (Yellow)) Equal to True
                • Then - Actions
                  • Set TempPoint = (Center of Region 2 &lt;gen&gt;)
                  • Hero - Instantly revive Temp_Hero[(Integer A)] at TempPoint, Hide revival graphics
                  • Camera - Pan camera for (Owner of Temp_Hero[(Integer A)]) to TempPoint over 0.00 seconds
                  • Custom script: call RemoveLocation(udg_TempPoint)
                • Else - Actions
            • Else - Actions


And, for question 2... There really isn't a way, of my knowledge at least ;)

If you really need it, then you can use a multiboard, but I won't suggest it...
I'd simply suggest you to change the text :p

5. For this to work, you'll simply have to set the created visibliti modifiers to a variable, and destroy them before creating another one, like:
Trigger:
  • Visibility Remove
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Black mask across Region 1 &lt;gen&gt;
          • Set Visibility[(Player number of (Picked player))] = (Last created visibility modifier)


Trigger:
  • Visibility Add
    • Events
      • Unit - A unit enters Region 1 &lt;gen&gt;
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Visibility - Destroy Visibility[(Player number of (Picked player))]
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Visibility across Region 1 &lt;gen&gt;
          • Set Visibility[(Player number of (Picked player))] = (Last created visibility modifier)


Note: Just an example, but you get what I mean, I hope :p
 

reyghost

New Member
Reaction score
14
My trigger will near 90% work for 1 guy diying,but not sure if 2 heroes dying near at the same time will make it work wrong.Not sure how fast it is to set that var, retrieve the gold,set the var again for the other player and retrieve the gold for this new player.
Anyone can confirm?,Komaqtion?
 

Komaqtion

You can change this now in User CP.
Reaction score
469
It's MUI, if that's what you're asking ;)

A trigger with no wait is (As good as) always MUI, so don't worry ;)
 

-Brainiac-

New Member
Reaction score
7
Trigger:
  • (Remaining time for Death_Timer[(Integer A)]) Less than or equal to 0.00

What condition type is this? :confused:
 

-Brainiac-

New Member
Reaction score
7
Ok ^^ Thanks, but why couldn't I just destroy my timer window in this trigger:

Trigger:
  • * Hero Reviving
    • o Events
      • + Unit - A unit Dies
    • o Conditions
    • o Actions
      • + If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • # If - Conditions
          • * ((Triggering unit) is A Hero) Equal to True
          • * ((Triggering unit) belongs to an ally of Player 1 (Red)) Equal to True
        • # Then - Actions
          • * Game - Display to (All players) the text: (A hero from the Northern Forces died, and will come back to life in 20 seconds: + (Proper name of (Triggering unit)))
          • * Countdown Timer - Start Dead_Timer as a One-shot timer that will expire in 20.00 seconds
          • * Countdown Timer - Create a timer window for (Last started timer) with title ((Name of (Triggering unit)) + will revive in<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />
          • * Wait 20.00 game-time seconds
          • * Set TempPoint = (Center of Heroes North &lt;gen&gt;)
          • * Hero - Instantly revive (Triggering unit) at TempPoint, Hide revival graphics
          • * Camera - Pan camera for (Owner of (Triggering unit)) to TempPoint over 0.00 seconds
          • * Custom script: call RemoveLocation(udg_TempPoint)
        • # Else - Actions
      • + If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • # If - Conditions
          • * ((Triggering unit) is A Hero) Equal to True
          • * ((Triggering unit) belongs to an ally of Player 5 (Yellow)) Equal to True
        • # Then - Actions
          • * Game - Display to (All players) the text: (A hero from the Southern Forces died, and will come back to life in 20 seconds: + (Proper name of (Triggering unit)))
          • * Countdown Timer - Start Dead_Timer as a One-shot timer that will expire in 20.00 seconds
          • * Countdown Timer - Create a timer window for (Last started timer) with title ((Name of (Triggering unit)) + will revive in<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" />
          • * Wait 20.00 game-time seconds
          • * Set TempPoint = (Center of Heroes South &lt;gen&gt;)
          • * Hero - Instantly revive (Triggering unit) at TempPoint, Hide revival graphics
          • * Camera - Pan camera for (Owner of (Triggering unit)) to TempPoint over 0.00 seconds
          • * Custom script: call RemoveLocation(udg_TempPoint)
        • # Else - Actions


Little weird... :p but anyway. if I did something like call destorylastcreated timerwindow ?

saves me work xd
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, both because "Last created timer window" will be overwritten when another hero dies, and also because it's not good to use waits :p
 

-Brainiac-

New Member
Reaction score
7
Note: Just an example, but you get what I mean, I hope


But I want it as a command so the players could pick wethever they want to have a visable, or not visable map to play on....?



EDIT:

LOOOOOOOOOOOOOOOOOOOOOOOL WE BUGGED! LOST EVERYTHING :(
 

Komaqtion

You can change this now in User CP.
Reaction score
469
But I want it as a command so the players could pick wethever they want to have a visable, or not visable map to play on....?

Well, then use this:
Trigger:
  • Visibility Command On
    • Events
      • Player - Player 1 (Red) types a chat message containing -fogon as An exact match
    • Conditions
    • Actions
      • Visibility - Destroy Visibility[(Player number of (Picked player))]
      • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Fog of war across Region 1 &lt;gen&gt;
      • Set Visibility[(Player number of (Picked player))] = (Last created visibility modifier)


LOOOOOOOOOOOOOOOOOOOOOOOL WE BUGGED! LOST EVERYTHING :(

Huh ?!?! :S
 

-Brainiac-

New Member
Reaction score
7
Ok ill try, but my map is quite delayed because I lost 3 hours of work yesterday... Not really in the mood to do it all over again :S...

And, yes I have extremly bad luck this week, I'm sick... Lost my voice, got a headache etc...

So might take a few more days...

Regards
 

-Brainiac-

New Member
Reaction score
7
:(

Well, good luck :thup:

Thanks!! :D

Already redid the fow and my reviving.. think I won't do more today :p

Regards

Trigger:
  • Turn Fog of War Off
    • Events
      • Player - Player 1 (Red) types a chat message containing -fowoff as An exact match
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Fog of War has been...
      • Set Players_North = (All allies of Player 1 (Red))
      • Set Players_South = (All allies of Player 5 (Yellow))
      • Player Group - Pick every player in Players_North and do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Fog of war across FOW NORTH &lt;gen&gt;
      • Player Group - Pick every player in Players_South and do (Actions)
        • Loop - Actions
          • Visibility - Create an initially Enabled visibility modifier for (Picked player) emitting Fog of war across FOW SOUTH &lt;gen&gt;
      • Set Visibility[(Player number of (Picked player))] = (Last created visibility modifier)
      • Custom script: call DestroyForce(udg_Players_South)
      • Custom script: call DestroyForce(udg_Players_North)


Hope this is right though... :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top