- Joined
- Oct 17, 2007
- Messages
- 22
I've been searching the forums and a lot of posts from people are about changing the attack range of a unit in-game. This is not something that can be done with a simple trigger or ability. You cannot do it using the acquisition range trigger, you cannot do it using upgrades (to a certain extent), and you cannot do it with searing arrows, cold arrows, etc., without having to manually click the button each time.
The way you can do it, however, is by replacing your in-game units with units that appear to be the same unit, except they wield a different weapon.
This may seem like a bit of work, but it really is not that much time compared to the time you should have already spent on terraining your map and other such details.
Step one.
The first thing you must do is create a unit. The unit I will create will be called "Marine".
The second thing you must do is create a second unit. This unit will be the mock unit for the item you are going to pick up with the unit "Marine". The item I want to pick up is a sniper rifle. The unit will thusly be called "Marine Marksman".
Certaintly, that was easy.
Step two.
Now, you must create the item you will be picking up. When creating this item, select a simple item that has only one effect, such as the first item listed, Claws of attack (+15). I will name my item "Sniper Rifle".
Step three.
Now comes the fun part, using triggers. It's all done in GUI, so do not worry, it truly is easy. For your first trigger (I will explain what they do after I list them), place this for you Event, Conditions, and Actions:
The second trigger is as follows:
The Final Step.
Go in game and place the item you chose on the ground. Place the unit you want, like my "Marine" unit, next to the item. Test the map, pick-up the item, and like magic, the unit changes. Drop the item, and he turns back.
The way you can do it, however, is by replacing your in-game units with units that appear to be the same unit, except they wield a different weapon.
This may seem like a bit of work, but it really is not that much time compared to the time you should have already spent on terraining your map and other such details.
Step one.
The first thing you must do is create a unit. The unit I will create will be called "Marine".
The second thing you must do is create a second unit. This unit will be the mock unit for the item you are going to pick up with the unit "Marine". The item I want to pick up is a sniper rifle. The unit will thusly be called "Marine Marksman".
Certaintly, that was easy.
Step two.
Now, you must create the item you will be picking up. When creating this item, select a simple item that has only one effect, such as the first item listed, Claws of attack (+15). I will name my item "Sniper Rifle".
Step three.
Now comes the fun part, using triggers. It's all done in GUI, so do not worry, it truly is easy. For your first trigger (I will explain what they do after I list them), place this for you Event, Conditions, and Actions:
-
Sniper Rifle Pickup
-
Events
- Unit - A unit owned by Player 1 (Red) Acquires an item
-
Conditions
- (Unit-type of (Hero manipulating item)) Not equal to Marine Marksman
- (Item-type of (Item being manipulated)) Equal to Sniper Rifle
-
Actions
- Wait 0.01 game-time seconds
- Unit - Replace (Hero manipulating item) with a Marine Marksman using The old unit's relative life and mana
- Selection - Select (Last replaced unit) for Player 1 (Red)
-
Events
The second trigger is as follows:
-
Sniper Rifle Drop
-
Events
- Unit - A unit owned by Player 1 (Red) Loses an item
-
Conditions
- (Unit-type of (Hero manipulating item)) Not equal to Marine
- (Item-type of (Item being manipulated)) Equal to Sniper Rifle
-
Actions
- Wait 0.01 game-time seconds
- Unit - Replace (Hero manipulating item) with a Marine using The old unit's relative life and mana
- Selection - Select (Last replaced unit) for Player 1 (Red)
-
Events
The Final Step.
Go in game and place the item you chose on the ground. Place the unit you want, like my "Marine" unit, next to the item. Test the map, pick-up the item, and like magic, the unit changes. Drop the item, and he turns back.
Last edited: