Ability to convert unit to gold

Status
Not open for further replies.
Level 3
Joined
Oct 8, 2024
Messages
22
Hello everyone!
I come to ask for help for a skill I was thinking about for a specific unit.
The skill is about selecting a target and transforming it into a pile of gold.
When you kill the gold pile, it gives you 250 gold.
Does anyone know how to do it? I don't know how to use triggers and I would appreciate the support.
 

Attachments

  • Adefwgrg.PNG
    Adefwgrg.PNG
    216.8 KB · Views: 53
I assume you don't want to use the Transmute spell although the end result would be the same (without the killing thing part)

You can do that with 2 simple triggers

  • Transform
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (Your ability)
    • Actions
      • Unit - Replace (Target unit of ability being cast) with a Gold Pile using The new unit's max life and mana // I suppose the gold pile is an unit
  • Gold
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Gold Pile
    • Actions
      • Player - Add 250 to (Owner of (Killing unit)).Current gold
 
I assume you don't want to use the Transmute spell although the end result would be the same (without the killing thing part)

You can do that with 2 simple triggers

  • Transform
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (Your ability)
    • Actions
      • Unit - Replace (Target unit of ability being cast) with a Gold Pile using The new unit's max life and mana // I suppose the gold pile is an unit
  • Gold
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Gold Pile
    • Actions
      • Player - Add 250 to (Owner of (Killing unit)).Current gold
In fact, I did try to use it xd
First change transmute so that instead of giving me a sheep, the resulting entity is a pile of gold (model) that is immobile.
I named the entity as "Hostile Creep", so I thought that killing it would give me the gold that Hostile Creeps usually drop.
However, when I killed them they did not give me gold, but instead the dead body of the unit appeared without transforming and that's it.

And thanks for helping me friend.
Although now, I'm wondering how to make "Pillage" a passive skill that steals only gold and not wood.
If you know I would appreciate it very much.
 
The thing with pillage is that the resources gained depend on the building cost (among other complicated stuff), but unless the target building only costs gold to build, you'll need to find another way. You can create a fake pillage ability that does nothing and then trigger it like this

  • Pillage
    • Events
      • Unit - A unit Takes damage
    • Conditions
      • (Damage From Normal Attack) Equal to True // this is a boolean condition
      • ((Triggering unit) is A structure) Equal to True // this too
      • (Level of (Your custom pillage ability) for (Damage source)) Equal to 1 // this is an integer
    • Actions
      • Player - Add 10 to (Owner of (Damage source)).Current gold
e.g. whenever an unit that has the ability damages a structure, the player gets 10 gold
 
El problema con el saqueo es que los recursos obtenidos dependen del costo del edificio (entre otras cosas complicadas), pero a menos que el edificio objetivo solo cueste oro para construir, tendrás que encontrar otra forma. Puedes crear una habilidad de saqueo falsa que no haga nada y luego activarla de esta manera

[DESENCADENAR]
Pillaje
Eventos
Unidad - Una unidad recibe daño.
Condiciones
(Daño de ataque normal) Igual a verdadero // esta es una condición booleana
((La unidad de activación) es una estructura) Igual a Verdadero // esto también
(Nivel de (Tu habilidad de saqueo personalizado) para (Fuente de daño)) Igual a 1 // este es un número entero
Comportamiento
Jugador: agrega 10 a (Propietario de (Fuente de daño)).Oro actual
[/DESENCADENAR]
Thanks, I'll try it now!
But one question
For "Transformation to Gold" as a skill, should I use the sorceress's transform, but making it do nothing?
 
There are quite a few spells you can use as fake for your custom abilities, the most popular one is probably Channel because it does nothing and you can customize it to be an instant spell, a single target, an AOE, etc. It's very powerful

You can try with Polymorph if you wish, but I'd use a simple spell that has a few effects as possible
 
There are quite a few spells you can use as fake for your custom abilities, the most popular one is probably Channel because it does nothing and you can customize it to be an instant spell, a single target, an AOE, etc. It's very powerful

You can try with Polymorph if you wish, but I'd use a simple spell that has a few effects as possible
I can't find the "Damage from normal attack"
And when I attack the game stops
 
Status
Not open for further replies.
Back
Top