Two Requests

SpaceBar

New Member
Reaction score
16
SOVED

Hi guys,

I'm currently making a new vampirism map (thy shall not be named) and i need two requests:

1. A -show command, similar to the one in Vampirism Fire, showing the amount of gold fed by each player and the amount of leaks by the Vampires (Players 11 and 12).

(Second Request Solved.) I originally used this code http://www.thehelper.net/forums/showthread.php?t=129373&highlight=autoharvest

However, it didn't work, until i checked the trigger again in my map and for some reason i removed
Trigger:
  • (Level of Harvest (Gold and Lumber) for (Trained unit)) Greater than or equal to 1
and now it works.

If anyone can help, that would be great. (+rep :))

~Regards Space

@Happy

I have serveral different harvesters, just didn't add them.
 

Happy

Well-Known Member
Reaction score
71
why you are using an or condition in the second trigger??? o_O there's only 1 condition in the or.....
 

Happy

Well-Known Member
Reaction score
71
the amount of gold is not really difficult.

Trigger:
  • first trigger
    • Events
    • Unit - A unit Dies
    • Conditions
    • Actions
      • if/then/else(multiple)
        • if-conditions
          • unit-type of triggering unit is equal to (a unit/building the human can make)
        • then-actions
          • set killing_unit(player number of owner of triggering) = killing_unit(player number of owner of triggering) + (whatever amount of gold the unit adds)
        • else-actions

make this if/then/else for every unit can be trained/built by the humans.

Trigger:
  • 2. trigger
    • events
    • player 1 (red) types text massage -show
    • player 2 (blue) types text massage -show
    • and so on...
    • conditions
    • actions
    • for each integer A from 1 to 10 do actions
    • game - show to all player the text <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" />layer name (integer A) + has fed the vampires with + (substring(killing_unit(integer A))) + gold.

the text you can change to whatever you want.^^

and what you mean with leaks of the vamps??

greetz happy
 

Lord Regno

Active Member
Reaction score
19
Hello spacebar :p I have the trigger :p from Titan winter, then you tabing show it will show for Dwarfs feed/leak because I maked a simpler trigger leak are then they falling as vamp and leak :p

EDIT: Moved color code to here

Player color: string variable:
Trigger:
  • Player Color
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Set PlayerColor[1] = |c00ff0000
      • Set PlayerColor[2] = |c000000ff
      • Set PlayerColor[3] = |c0000ffff
      • Set PlayerColor[4] = |c00800080
      • Set PlayerColor[5] = |c00ffff00
      • Set PlayerColor[6] = |c00ff8000
      • Set PlayerColor[7] = |c0000ff00
      • Set PlayerColor[8] = |c00ff80ff
      • Set PlayerColor[9] = |c00808080
      • Set PlayerColor[10] = |c000db0ff
      • Set PlayerColor[11] = |c00027553
      • Set PlayerColor[12] = |c00613030



Trigger:
  • Show command (in this it&#039;s show to how match gold income humans/vamp get every minit!)
    • Events
      • Player - Player 1 (Red) to Player 12 types a chat message containing -show as An exact match
    • Conditions
    • Actions
      • Cinematic - Clear the screen of text messages for (Player group((Triggering player)))
      • Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: Feed|cff99ffff/|r|c...
      • For each (Integer B) from 1 to 10, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Player((Integer B))) slot status) Equal to Is playing
                  • ((Player((Integer B))) slot status) Equal to Has left the game
            • Then - Actions
              • Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: ((PlayerColor[(Integer B)] + (Name of (Player((Integer B))))) + (((|cffffffff + ((String(Feed[(Integer B)])) + g|cff99ffff/|r|cffFFCC66)) + (String(Gold_Drop[(Integer B)]))) + g))
            • Else - Actions
              • Do nothing
      • For each (Integer B) from 11 to 12, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Player((Integer B))) slot status) Equal to Is playing
                  • ((Player((Integer B))) slot status) Equal to Has left the game
            • Then - Actions
              • Game - Display to (Player group((Triggering player))) for 10.00 seconds the text: ((PlayerColor[(Integer B)] + (Name of (Player((Integer B))))) + (|cff99ffff has leaked|r|cffFFCC66 + ((String(Gold_Drop[(Integer B)])) + |cffffffffgold|r)))
            • Else - Actions
              • Do nothing
    • The total minit goldincome (feel free to give credits if you use this, because it was not simple to make it and its was taken a while to make it):
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Triggering player) is in Dwarf) Equal to True
        • Then - Actions
          • Set Total_Goldmines = ((Number of units in (Units owned by (Triggering player) of type Gold Mine)) + (((Number of units in (Units owned by (Triggering player) of type Better Gold Mine)) x 2) + (((Number of units in (Units owned by (Triggering player) of type Big Gold Mine)) x 4) +
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Gold_Bonus Greater than or equal to 1
            • Then - Actions
              • Game - Display to (Player group((Triggering player))) for 30.00 seconds the text: (|cff99FFFFYour total minute gold income are |cffFFCC66 + ((String((Total_Goldmines x (Gold_Bonus + 1)))) + |r|cff99ffff.))
            • Else - Actions
              • Game - Display to (Player group((Triggering player))) for 30.00 seconds the text: (|cff99FFFFYour total minute gold income are |cffFFCC66 + ((String(Total_Goldmines)) + |r|cff99ffff.))
        • Else - Actions
          • Game - Display to (Player group((Triggering player))) for 30.00 seconds the text: (|cff99FFFFYour total minute gold income are |cffFFCC66 + ((String(Urn)) + |r|cff99ffff.))


Feed trigger:
Trigger:
  • Human Feed
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Killing unit)) Equal to Ice Man
              • (Unit-type of (Killing unit)) Equal to Minion
        • Then - Actions
          • Set Feed[(Player number of (Owner of (Dying unit)))] = (Feed[(Player number of (Owner of (Dying unit)))] + (Point-value of (Dying unit)))
        • Else - Actions
          • Do nothing


EDIT: In feed trigger don't forgot to set point value to the gold bonus!

Then I make 2 triggers that are simple:

Trigger:
  • Gold Drop (if titan/vamp kill its has a drop chance)
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Unit-type of (Killing unit)) Equal to Minion) or ((Unit-type of (Killing unit)) Equal to Ice Man)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 10
        • Then - Actions
          • Item - Create Gold coin 1G at (Position of (Triggering unit))
          • Item - Change ownership of (Last created item) to (Owner of (Killing unit)) and Retain color
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Equal to 10
            • Then - Actions
              • Item - Create Gold coin 3G at (Position of (Triggering unit))
              • Item - Change ownership of (Last created item) to (Owner of (Killing unit)) and Retain color
            • Else - Actions
              • Do nothing


Now to the leak trigger:

Trigger:
  • Gold leak
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Hero manipulating item)) Equal to Dwarf Slayer
          • (Unit-type of (Hero manipulating item)) Equal to Dwarf Lord
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Item being manipulated)) Equal to Gold coin 1G
        • Then - Actions
          • Set Gold_Drop[(Player number of (Owner of (Item being manipulated)))] = (Gold_Drop[(Player number of (Owner of (Item being manipulated)))] + 1)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item-type of (Item being manipulated)) Equal to Gold coin 3G
            • Then - Actions
              • Set Gold_Drop[(Player number of (Owner of (Item being manipulated)))] = (Gold_Drop[(Player number of (Owner of (Item being manipulated)))] + 3)
            • Else - Actions
              • Do nothing


EDIT: Forgot the trigger leak then vamps are falling, whatever I take more then necessary now:

Trigger:
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Dying unit)) Equal to Ice Man
    • Then - Actions
      • Item - Create Ice Heart at (Position of (Dying unit))
      • Player - Add 4 to (Owner of (Killing unit)) Current gold
      • Set Gold_Drop[(Player number of (Owner of (Dying unit)))] = (Gold_Drop[(Player number of (Owner of (Dying unit)))] + 4)
    • Else - Actions
      • Item - Create Minion Ice Heart at (Position of (Dying unit))
      • Player - Add 2 to (Owner of (Killing unit)) Current gold
      • Set Gold_Drop[(Player number of (Owner of (Dying unit)))] = (Gold_Drop[(Player number of (Owner of (Dying unit)))] + 2)
 

SpaceBar

New Member
Reaction score
16
Cheers mate, all works. Only a few problems, which i can fix up, again thanks a bunch :thup:
 

Lord Regno

Active Member
Reaction score
19
Hm, now I wonder what's are the problems, its are some varibels in it but I think you now what's the variabels am, but are it something that are making the trigger bug in titan winter? Hm I can see set number of Goldmines variable are two times... well I chanced it and forgot to remove it fixed here to!
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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