Any ideas for changing build structures from an unit?

R@i_no_Wyrm

New Member
Reaction score
43
I want to have a peasant. I have 3 of them. Same type, but three. Name them a, b and c.
All of them can build a town hall.

peasant "A" got item #1.
So, now he can build a tower.

peasant "B" got item #2.
So, now he can build a graveyard.

peasant "C" stands still. while his two friends can build different structures, he still can build a town hall.

Item dropped, the structures built back to normal.

Is this possible?
 

eXirrah

New Member
Reaction score
51
Make peasants for all the variations and use trigger like this

Code:
Events
    A unit acquires an item
conditions
    unit point value equals to VAR1
events
    If all conditions are true do actions
        if
            Item type of manipulated item equals to <item>
        then
            replace triggering unit with <unit coresponding to the item>
        else
            do nothing
    ......more replaces....

VAR1 - set the point value of these units to some distinctive value or you can add these units to a unit group and set the condition to unit in unit group
 

Romek

Super Moderator
Reaction score
963
Either berserker, Or maybe make the 'build structure' an ability [or spellbook if you want more than one building], and when the unit casts the [no target] ability, Give it a tiny [building] item, and force it to use it.
 

R@i_no_Wyrm

New Member
Reaction score
43
another thing : i want it to be natural, yeah. I mean, the peasant must work on it using the repair ability. can't I change the 'structures built'?
 

eXirrah

New Member
Reaction score
51
Try Player - Set training\construction availability of unit. Add all the building that you want a unit to build and then make them unavailable. After the unit acquires an item make the building the item allows you to build available

EDIT: There is another way to do that. Create custom units and set them as requirements for the building that the peasant is not supposed to be able to build at the beginning. After the worked acquires an item that allows a building to be build just create the required unit somewhere on the map and the building is now buildable. Of course you might want the units that are required to has no model, collision, shadow and sight range so it would be impossible for someone to notice them.
 

R@i_no_Wyrm

New Member
Reaction score
43
You don't get the point. each different peasant can build different structure. But they are in 1 same type.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> Is this possible?

Sort of.
However, it doesn't really work if you want more than one of those items at a time on the same unit...
 

BlargIAmDead

New Member
Reaction score
25
Is there a way to change the "Build Tiny Farm" ability of the "Tiny Farm" item in the Object Editor, so that it can build unlimited numbers of farms instead of being used up after one? (Or if you don't like Farms, the "Build Tiny Barracks", "Build Tiny Altar", etc.)
 

R@i_no_Wyrm

New Member
Reaction score
43
Ace, I don't really get it.
One peasant only can carry 1 type of hammer.
Can it be done w/o replaces? coz using replaces will cause bad things... like weird jumps...
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> Can it be done w/o replaces?

No.
And there's also some potential for features if a Hero acquires one such item...

Though, if any given worker can only have at most one such item,
you may want to have a look at the attached map.
That may or may not be what you're looking for, but it's about as far as it goes...
 

Attachments

  • ItemWorkers_Demo_AceHart.w3x
    14 KB · Views: 68

R@i_no_Wyrm

New Member
Reaction score
43
cool one ace, but a new problem spawns... I need more than 11 buildings.
Finally found a new way, thx every1.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top