• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Transmutation

Status
Not open for further replies.
Level 10
Joined
Apr 22, 2010
Messages
421
This isnt an very good title, but its like this.

Im created an unit based off the Ancient of Wonders, and i wan tthat unit to basicly kinda change gold to lumber, and vice-versa. I know i cold just make an item that it sells, but i want it to be like this:
Click on Transmute button.---->Wait some time-----> I gain <?> Resources.

I was thinking of using a system of triggers, so that the building trains an dummy unit name "Transmute Gold" which cost gold, and use a system of triggers to make it die on spawn and give me <?> lumber.

I treid to do that, but i blanked out on how.:sad:

Also, this building is only abvaiable for one race.
 
Last edited:
  • Like
Reactions: Rui
Level 11
Joined
Jun 20, 2009
Messages
880
Or this

  • Buy Lumber
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to Convert 50 Gold Into 50 Lumber
    • Actions
      • Player - Add 50 to (Owner of (Triggering unit)) Current lumber
 
Level 3
Joined
Apr 29, 2009
Messages
42
Trigger 1
  • Events
    • Unit start the effects of an ability
  • Conditions
    • Ability equal to <Transmute>
  • Actions
  • Set variable <casting_unit> = <triggering/casting unit>
    • if/then/else multi
      • Conditions
        • Owner of <casting_unit> current gold greater then or equal to XX
      • Actions then
        • Timer - start timer <timer_transmute> as a one-shot timer that expires in XX seconds
        • Game - Set owner of <casting_unit> current gold to (gold of (owner of <casting unit> - XX))
      • Actions else
Trigger 2
  • Events
    • Timer <timer_transmute> expires
  • Conditions
  • Actions
    • Game - Set owner of <casting_unit> current lumber to (lumber of (owner of <casting unit> + XX))
NOTE: <casting_unit> is a variable that is set in the first trigger.
 
Level 10
Joined
Apr 22, 2010
Messages
421
@All of the above

Noe, its supposed to kinda be seen as the building doing the researches(usin arcane sactum model) because its training a unit.

Mabey make a ablity that causes that unit to self-destruct(doesnt do anything) and a trigger that give the resource when that ability is used?

Also, this building is only available for 1 race
 
Level 22
Joined
Jan 10, 2005
Messages
3,426
I see.
Then, like you said, you'll need a dummy unit, and a trigger like this:

Events
Unit - A unit enters (Playable map area)

Conditions
(Unit-type of (Entering unit)) Equal to Dummy Unit

Actions
Unit - Remove (Entering unit) from the game
Player - Add X to Player X Current lumber
 
Level 3
Joined
Apr 29, 2009
Messages
42
Trigger 1
  • Events
    • Unit - A unit Finishes training a unit
  • Conditions
    • (Unit Type of (Trained Unit) Equal to <UNIT>
  • Actions
    • Unit - Kill (Trained Unit)
Trigger 2
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Dying unit) Equal to <UNIT>
  • Actions
    • Player add XX to (Owner of (Dying unit)) current lumber

Like this?
And then make your building being able to train a unit and rename the unit just like it looks like it's researching or something.
And remove the model of the unit or give it locust ability or something.


EDIT: Ramza's solution is easier I guess only using 1 trigger.
 
Level 7
Joined
Dec 26, 2006
Messages
303
well I know it's solved already... IMO why can't you just use MikeyDN's 2nd trigger alone??

just make a unit without model, a locust ability, with 1 HP and -10 HP regen
it'll be killed by itself caused of it's -10 HP regen, and when that unit-type died it add gold/lumber

it think it's much more simple that way :/
 
Status
Not open for further replies.
Top