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