• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Couple Questions

Status
Not open for further replies.
Level 9
Joined
Aug 1, 2008
Messages
453
1. in my map i have it so if a unit is in a region it gets 2g per seconds. to do this i set player a variable, and i have another region at the end that when they enter that i want it to remove the variable from them. (so there not set the variable).


2. My second question is how do i make it so 50% of the time a unit attacks it has a chance to cast flame strike?? (please included a map example) please and thank you ^^
 
Level 13
Joined
Sep 14, 2008
Messages
1,408
1. You set the owner of the unit and add the gold to him right?

Try to do it with a player group. Create a player group variable and every time a unit enters that area add the owner to that unit group.

then you say every 1 sec: pick every player in playergroup and add gold...

When the unit enters the other area just remove the player from the playergroup.

2. That can be only solved by triggers:

Create a dummy unit (no model, locust ability, no attack) and give it the flame strike (it must not have mana cost)

Create a trigger:
Event: Unit is attacked
Condition: attacking unit = yourUnit
Event: Create 1 dummy at position of attacking unit
Add timer to unit ( so that it dies after ~0.05 sec)
make last created unit cast human - flame strike to point....
 
Level 17
Joined
Jun 12, 2007
Messages
1,261
1. To keep it simple.
  • Lolz
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Your Region lololol)) and do (Actions)
        • Loop - Actions
          • Player - Add 2 to (Owner of (Picked unit)) Current gold
This will add more gold if there are more units, you can just simply edit that trigger though.

2. To lazy to help you now, perhaps later.
 
Status
Not open for further replies.
Top