• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

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,407
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