Wednesday, April 18, 2012

Trigger for Multiplying A Item/Unit?

Hi, I am new to these forums, and also new to world editor on Warcraft 3. I am good with most things of World Editor in my short time of using it, but, the thing I cant get a hold of is triggers. In order to make my map, which is similar to all those farmer games out there, I need a trigger that makes the item: Corn Stalk; Wheat Stalk; multiply every once in a while, while it must be on the crop terrain. Also, I need units to be multiplied. But...I have no idea how to do that, so which is why I am asking the pros.

If you help me, I will be sure to list you on the people who helped with the map.

Thanks is advance to all you friendly faces out there!

(Oh, by the way, you can either list out what the trigger should look like, or you could walk me through step by step. Whatever works for you.)|||Crop Terrain? Please explain..




Quote:




I need a trigger that makes the item: Corn Stalk; Wheat Stalk; multiply every once in a while, while it must be on the crop terrain





Quote:




Corn Wheat

Events

Time - Every 30.00 seconds of game time

Conditions

Actions

For each (Integer A) from 1 to 5, do (Actions)

Loop - Actions

Item - Create Cheese at (Center of Select Region <gen>)

-------- For Each 1 to 5 .. Means that it will loop this action 5 time.. So there will spawn 5 item of type "Cheese", in your selected Region --------

-------- To spawn other Items. just add a trigger that will spawn another type of item.. --------

-------- Like This --------

Item - Create Blood Key at (Center of Select Region <gen>)

-------- Now it will create 5 "Cheese" and 5 "Blood Keys".. In the selected Region --------





Quote:




Also, I need units to be multiplied.




I think you mean a an Ability that create a Clone of your unit who uses the Ability..

1. First you need to create a Dummy Ability.

2. To create a dummy Ability, create a custom ability using "War Stomp", and delete all the Functions in the ability..

3. Now, when the ability dont have any Function, lets give it one using Triggers..

The Trigger should look like this:


Quote:




Multiply Ability

Events

Unit - A unit Begins casting an ability

Conditions

(Ability being cast) Equal to Multiply Unit

Actions

Unit - Create 1 (Unit-type of (Casting unit)) for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by (Random real number between 0.00 and 100.00) towards (Random real number between 0.00 and 100.00) degrees) facing Default building facing degrees

-------- And if you only want the unit to be Temporarily, Then add this Trigger: --------

Unit - Add a 20.00 second Generic expiration timer to (Last created unit)

-------- Then the unit will Die in 20 Seconds.. --------




I have tested it.. And it Works..|||Okay I will look it into that!

And by crop terrain I mean the terrain tile in the vilage section.|||Then just create a region in the village and make the trigger to create the item in that Region.


Quote:




Corn Wheat

Events

Time - Every 30.00 seconds of game time

Conditions

Actions

For each (Integer A) from 1 to 5, do (Actions)

Loop - Actions

Item - Create Cheese at (Random point in Village <gen>)

-------- For Each 1 to 5 .. Means that it will loop this action 5 time.. So there will spawn 5 item of type "Cheese", in your selected Region --------

-------- To spawn other Items. just add a trigger that will spawn another type of item.. --------

-------- Like This --------

Item - Create Blood Key at (Random point in Village <gen>)

-------- Now it will create 5 "Cheese" and 5 "Blood Keys".. In the selected Region --------

No comments:

Post a Comment