Unit Gives Uniy Gold Gives Player Gold

I

IKilledKEnny

Guest
I want to make a Trigger that does this;

Once unit A mined 10 gold, it goes to unit B and gives it the gold and then run back to mine another 10 gold. Once unit B got 150 gold (or before if player decided to move it) it moves to unit C. Once it reached unit C the player gets the number of gold that was on unit B.

Now there are lots of units that are the same unit type of unit A,B and C and I don't want to make 1000000 Triggers, how could I do it?
 
I

IndianSummer

Guest
"Once it reached unit C the player gets the number of gold that was on PLAYER B."

:confused: I think it's supposed to be "unit"
This problem is weird...but could be some original gameplay :p
I'll try it now and post IF i get a solution :)
 
I

IKilledKEnny

Guest
Yup, you are right it should be unit, thanks. :D +rep for anyone that got a solution for this, serious problem indeed...
 

Demonfaze

8 yrs. Hell, it's been a long time.
Reaction score
72
Use the custom value of the miner to keep track of how much gold he has mined.

Then use triggers to check the custom value of the miners & perform the desired actions. I can't give you a more specific answer because, to be honest, I'm confused by your description of your situation (unit A, B, and C).
 
I

IndianSummer

Guest
Woah O.0 this could be complicated !
I made 3 new worker units, A, B and C.

A
- is a standard miner

B
- Has the castle ability to get gold

C
- Does nothing, except being the target for the "Get150Gold"-Ability of unit B

I made a trigger so every time unit B uses the ability to get 10 gold, the trigger removes 10 gold from the player. Then I wanted to set varibles so if the ability got used 15 times, unit B gets the ability to "cast" the "Get150Gold" spell on unit C. After the gold transfer, the ability is removed until unit B used the get 10 gold ability 15 times.

Problem : I'm too n00b with variables to set 'em like that ! :banghead:

PS: Do I get +rep if my idea is right and someone does it for me ? :D
 
I

IKilledKEnny

Guest
Ok I'll try to explain the Trigger better.

There are 3 unit types:
A. Miner - The unit which mines gold from the gold mine.
B. Resources Wagon - The unit which carries gold on it.
C. Town Hall - A unit that recieves the gold.

Now each player can build those units whenever he wants. Let's say there are 10 players. Each one got 50 Miners, 20 Resources Wagons and 5 Town Halls. Whenever a Miner goes to Resources Wagon, the resources wagon has value which is the sum of all the gold that is brought to it. When it moves and reaches a Town hall then the player controlling the Resources Wagon gets gold eqaul to the Resources Wagon's value.

How do I do that in the minimal number of Triggers?

Hope it's clear now.
 
I

IndianSummer

Guest
Now each player can build those units whenever he wants. Let's say there are 10 players. Each one got 50 Miners, 20 Resources Wagons and 5 Town Halls.

Hmm...10 players...

10 x 50 = 500 Miners
10 x 20 = 40 Resources Wagons
10 x 5 = 50 Town Halls...

So this sums up to 590 units on the map...
.
.
.
ARE YOU CRAZY ?!?!? :D :nuts:
 
I

IKilledKEnny

Guest
Thought about that aswell :) . Problem is I don't know how to add the gold that the unit has to the variable, and I do not know how to set that variable. I would appreciate a Trigger that is made from A to Z, does everything. :)

(Gave you REP :p Summer)
 
I

IKilledKEnny

Guest
Hmm...10 players...

10 x 50 = 500 Miners
10 x 20 = 40 Resources Wagons
10 x 5 = 50 Town Halls...

So this sums up to 590 units on the map...
.
.
.
ARE YOU CRAZY ?!?!? :D :nuts:

I said for example :) Each player can build as much units as he wishes.
 
I

IKilledKEnny

Guest
EDIT: I want to check if a unit is carring gold, how would I do that?
 
I

IKilledKEnny

Guest
Bump.


The real problem is how to check if a unit just mined gold from a gold mine beore it reaches the Wagon, how would I do that??
 
M

Mythic Fr0st

Guest
hmm

Interesting...

Ok, Easy, I think I know what you want

Now, let me clear this up...

Can the players, "Move" there workers? or are they automatic? E.G

Worker 1 gets 10 gold, and moves to Worker 2, when Worker 2 gets 150 gold, Worker 2 moves to Worker 3

At any time, can the players "Move" their units?

I can do this if he cant
 

Tinesthia

New Member
Reaction score
3
Question: What is the techinique that Unit A is getting gold. Would help a lot to know? Just mining like a peasent? Or standing outside? Or is that one of the things we're trying to figure out also?
 
M

Mythic Fr0st

Guest
hmm

To trigger the event

I used

- A unit comes within (x) of gold mine

x being 1-10 lol
 

Tinesthia

New Member
Reaction score
3
Problem Solved... That is, if I understood you 100% correctly. Check the map attached.

Town Hall - Can build Wagon and Miner

Wagon - Has following abillities
Take Gold (Gets gold from any target miner owned by the same player)
Give Gold (Gives gold to the Town Hall, so that the player can use it)
Check Gold (Displays the amount of old the Wagon is Holding)

Miner - Has following abillities
Mine Gold (Hooks on a gold mine (sort of) and mines 10 gold every 10 seconds)
Check Gold
Stop Mining (Speaks for itself..)

Edit: I got to playing around with the map, and started having fun. So I updated it (Fixed tooltip and added Stop Mining abillity for Miner, Fixed Floating Text.)
 

Attachments

  • GoldCarrier1.1.w3x
    19.9 KB · Views: 174
I

IKilledKEnny

Guest
Sorry I was out, school.... :(

Checking your map Tinesthia, thanks :)



To trigger the event

I used

- A unit comes within (x) of gold mine

x being 1-10 lol

Sorry didn't understand :banghead:
 
I

IKilledKEnny

Guest
2 Questions!

1. Can I set unit's max health, or is it undoable? How?

2. I want to make this Trigger & condition. A unit from GoldUnitGroup becomes in a distance that is equal to 256 from a Resources Wagon.

I did this:

Code:
Untitled Trigger 002
    Events
        Unit - A unit comes within 256.00 of No unit
    Conditions
        [B](Rally-Point of (Triggering unit) as a unit) Equal to (Random unit from (Units of type Resources Wagon))[/B]
        (Triggering unit) Equal to (Random unit from GoldUnitGroup)
    Actions

I'm almost 100% that's the bolded condition is messed up. How would I do it?

Thanks.
 
S

Sunny_D

Guest
1.) dont know a way to get that triggered. of course you add for example dummy-abilities that increase the health max.

2.) im almost sure as well its messed up ^^ a boolean comparison (unit is in unit-group) would fit best here.
and remove the second condition (random unit from group) ;)

btw, you know that your event contains (no unit), yes? hm.. maybe its anyway better to make a periodic event that gets all units within range every x seconds....
 
K

Kerberos

Guest
I'm not sure what your bolded condition is supposed to do, but to make sure the unit is in GoldUnitGroup, I'd suggest a boolean of category Unit - Unit is in unit group. So you'll get this.

Code:
Conditions
    ((Triggering unit) is in GoldUnitGroup) equal to True
 
I

IKilledKEnny

Guest
1.) dont know a way to get that triggered. of course you add for example dummy-abilities that increase the health max.

2.) im almost sure as well its messed up ^^ a boolean comparison (unit is in unit-group) would fit best here.
and remove the second condition (random unit from group) ;)

btw, you know that your event contains (no unit), yes? hm.. maybe its anyway better to make a periodic event that gets all units within range every x seconds....


Hmmm... If you have time could you post both Triggers? Sorry for GREAT noobness :)

P.S. Dorgot to say my problem :) I don't know how to define the unit which the Triggering unit became 256 distance from him...
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top