Planting Spell

Status
Not open for further replies.

Troubled_Farmer

T

Troubled_Farmer

I have already requested this in the Introduction place, but I'll go into more detail here. I want an ability where if I target a spot, it "plants" a plant, then the plant will grow with trigger I add later on. But I can only target a certain terrain type, which I chose to be Village Crops, because it is a "planting" spell for a farmer.
 
Will upload spell in one sec.

  • Plant
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Plant
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain type at (Target point of ability being cast)) Equal to Village - Crops
        • Then - Actions
          • Unit - Create 1 Plant for (Owner of (Triggering unit)) at (Target point of ability being cast) facing Default building facing degrees
        • Else - Actions
          • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) + 50.00)
          • Unit - Remove Plant from (Triggering unit)
          • Unit - Add Plant to (Triggering unit)
          • Game - Display to (Player group((Owner of (Triggering unit)))) the text: You can't plant the...

Hope that this helps. Map is attached as well. To make better you could have many if/then/else or multiple triggers creating different kinds of plants depending on terrain. Set refunded mana to the mana cost of spell.

This is the attached map. Demonstrates trigger,
View attachment 29853

Edit: Could add temp points then null them.
 
Last edited:
  • Plant
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Plant
  • Actions
    • Set tempunit = (Casting Unit)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Terrain type at (Target point of ability being cast)) Equal to Village - Crops
      • Then - Actions
        • Set temppoint1 = (target point of ability being cast)
        • Unit - Create 1 Plant for (Owner of (tempunit)) at temppoint1 facing Default building facing degrees
        • Custom script: call RemoveLocation (udg_temppoint1)
      • Else - Actions
        • Unit - Set mana of tempunit to ((Mana of tempunit) + 50.00)
        • Unit - Remove Plant from tempunit
        • Unit - Add Plant to tempunit
        • Game - Display to (Player group((Owner of (tempunit)))) the text: You can't plant the...
Here we go ;)
 
THANK YOU GUYS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

:grin::grin::grin::grin::grin::grin::grin::grin::grin::xxd::xxd::xxd::xxd::xxd::xxd::xxd::xxd::xxd::xxd::xxd::xxd::xxd::xxd::xxd:

I LOVE YOU GUYS ! NOW I CAN FINISH MY GAME!
 
Status
Not open for further replies.
Back
Top