• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Someone help me with trigger im going to make.

Status
Not open for further replies.
Level 7
Joined
Jul 11, 2008
Messages
104
If anyone can help me make this trigger...

This is what I want:

A hero/unit casts a spell at a building.
The spell has a 10 second channeling time, so I want a timer to appear that goes down to 10 seconds and then gets removed.
After 10 seconds, I want the building to be given control to the person who casted the spell. If he has control of the building, him and his teammates gain +1 wood per second.

That is all. +rep if you help >.>
 
  • Spell
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to X
  • Actions
    • Set Target1 = (Target unit of ability being cast)
    • Set Caster1 = (Triggering unit)
    • Set Owner1 = (Owner of (Caster1))
    • Floating Text - Create a floating text that reads 10 above (Caster1) with Z Offset 0.00, using font size 13.00, color (100%, 100%, 100%), and 0% transparency
    • Set Text1 = (Last created Floating Text)
    • Floating Text - Show (Text1) for (PlayerGroup(Owner1))
    • Trigger - Turn on Trigger2 <gen>
  • Trigger2
  • Events
    • Time - Every 1.00 of game-time
  • Conditions
  • Actions
    • Set TextTimer = ((TextTimer) + 1)
    • Floating Text - Change text of (Text1) to (10 - (TextTimer)), using font size 13.00
    • If/ Then/ Else
      • If (Conditions)
        • (TextTimer) Equal to 10
      • Then (Actions)
        • Trigger - Turn off (This trigger)
        • Floating Text - Destroy (Text1)
        • Set TextTimer = 0
        • Unit - Change owner of (Target1) to (Owner1) and Change color
        • Set Target1 = No unit
        • Set Caster1 = No unit
  • Trigger3
  • Events
    • Unit - A unit stops channeling an ability
  • Conditions
    • (Ability being cast) Equal to X
  • Actions
    • If/ Then/ Else
      • If (Conditions)
        • Trigger3 <gen> is on Equal to True
      • Then (Actions)
        • Trigger - Turn off Trigger3 <gen>
        • Floating Text - Destroy Text1
        • Set TextTimer = 0
        • Set Caster1 = No unit
        • Set Target1 = No unit
 
Last edited:
Level 13
Joined
Mar 4, 2009
Messages
1,156
make "building stealer" invulnerable and with no attack,no model file - click shift + enter and type _ on his model file

  • YOU ABILITIY IS CASTED
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (Your ability)
    • Actions
      • Set POINT = (Position of (Target unit of ability being cast))
      • Unit - Create 1 "BUILDING STEALER" for (Owner of (Casting unit)) at POINT facing Default building facing degrees
      • Custom script: call RmoveLocation(udg_POINT)
      • Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
-You will probably not need (((Matching unit) is A structure) Equal to True))
  • BUILDING STEALER DIES
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to "BUILDING STEALER"
    • Actions
      • Set POINT = (Position of (Dying unit))
      • Set UNITGROUP = (Units within 0.01 of POINT matching (((Matching unit) is A structure) Equal to True))
      • Custom script: call RmoveLocation(udg_POINT)
      • Unit - Change ownership of (Random unit from UNITGROUP) to (Owner of (Dying unit)) and Change color
      • Custom script: call DestroyGroup(udg_UNITGROUP)
      • set PLAYER_INCOME (player number of owner of (Dying unit) to PLAYER_INCOME (player number of owner of (Dying unit) + 1
-You will need this trigger only if you are sure that structure could die and that another one could be built on the same place
  • BUILDING DIES
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A structure) Equal to True
    • Actions
      • Set POINT = (Position of (Dying unit))
      • Set UNITGROUP = (Units within 0.01 of FIXLAGS matching ((Unit-type of (Matching unit)) Equal "BUILDING STEALER"))
      • Custom script: call RmoveLocation(udg_POINT)
      • Unit - Remove (Random unit from UNITGROUP) from the game
      • Custom script: call DestroyGroup(udg_UNITGROUP)
ever 1 sec of game
for each integer from 1 to 12 do actions
add to player (integer A) PLAYER_INCOME(integer A) lumber
 
Level 13
Joined
Mar 4, 2009
Messages
1,156
Pharaoh, I did everything your trigger said, not working as intended, idk if I made a mistake, here's the map. If you could see whats wrong with the trigger, and fix it, that'd be great. http://www.mediafire.com/download.php?omnhuyngqzj
why don´t you do my trigger,you structure can walk maybe? :D
if it cant work my trigger would work great
its simple
when i Unit - Add a 10.00 second Generic expiration timer to (Last created unit)
he will die for 10 second and take ownership of building that is within 0.01 range of him witch mean the targeted building

and btw when you set model file as i said than the unit (building stealer) will be invisible and unable to be selected
 
Status
Not open for further replies.
Top