NiKaNoRoU_GR
New Member
- Reaction score
- 115
Try this:
CONDITIONS:
(entering unit) equal to wisp
CONDITIONS:
(entering unit) equal to wisp
NiKaNoRoU_GR said:Do this:
EVENTS:
unit enters region 001(gen)
CONDITIONS:
entering unit equal to wisp
ACtions:
Create 1 dreadlord in (another region)
Mauritz said:It dosnt work :banghead: My code look like this:
Melee Initialization
Events
Unit - A unit enters Region 001 <gen>
Unit - A unit enters Region 000 <gen>
Conditions
Dreadlord Equal to Wisp
Dark Rifleman Equal to Wisp
Actions
Unit - Make Dreadlord 0005 <gen> face (Target of Camera 002 <gen>) over 0.00 seconds
Unit - Change color of Dreadlord 0005 <gen> to (Color of (Picked player))
Unit - Kill (Entering unit)
what am i doing wrong? I dont understand a shit of this!
EDIT: Text copyed from Blizzard Help file (C) and check this out (klick on it) there is nice tutorial how to do hero picking like you want. It may seem hard at start beacause it uses "advanced" things like variables and arrys. Simplest hero picking could be:The Trigger Editor
This is the most advanced and powerful portion of the World Editor. The Trigger Editor allows you to take complete control of every aspect of the game. It is a simplified programming language designed to be accessible to novices, but powerful enough to satiate the desires of more advanced users. To open the Trigger Editor, use F4, or choose Trigger Editor from the Module menu.
A trigger is composed of three parts: events, conditions, and actions. A trigger's actions will activate if, when one of its events occurs, its conditions are met.
Events
Events will start the process that may lead to a trigger's firing. After a trigger's event has taken place, its conditions are evaluated, and finally its actions may occur. The default trigger in a map is "Melee Initialization." This trigger's default event is "Map Initialization." Basically this means that the instant the map finishes loading, its actions will occur: the trigger has no conditions that must be met. If you wanted to, you could change this event to "Time - Time Elapsed," then change the number of seconds to ten. The map would then run the "Melee initialization" trigger ten seconds after it had loaded.
Conditions
Conditions are special requirements that must be met for a trigger's actions to occur. A condition must be true for a trigger's actions to run. This way of thinking about conditions can be deceptive because you can have a condition like "False Equal to False"-- a condition which would always be true. The default trigger "Melee Initialization" contains no default conditions; let's add one. Hit Ctrl + D, then select "Game Speed Comparison." The dialog box will then have the blue text, "(Current game speed) Equal to Normal." If you leave the condition as it is and then run the map from the editor, the "Melee Initialization" trigger will run normally, assuaming you have not changed any other parts of the trigger from their default values. However, if you change "Normal" to "Fastest," the "Melee Initialization" trigger will not run from the editor. This is because the editor sets the game speed to "Normal" automatically when you run maps from it. The condition would be evaluated as "Normal speed equal to Fastest speed," a condition which is not true.
Some of the differences between conditions and events are that conditions are only evaluated if the event of the trigger that they fall under has occurred. Also, although a trigger can have multiple events, only one event need occur for a trigger's action to happen, whereas all conditions must be true simultaneously for the trigger's actions to occur.
The only things a trigger really needs are actions. (Well, in point of fact, this is not exactly true. However, a trigger with no actions has no effect on the game and, therefore, no real point in the script.) It is worth pointing out, though, that triggers do not need conditions or events in order for their actions to be carried out in the game. Triggers can be run from other triggers using the action "Trigger - Run (Ignoring Conditions)," which will run any trigger's actions, regardless of its conditions or events or lack thereof.
Actions
Actions are the results of a trigger. These can be anything from panning the camera to a specific unit, as in a cinematic, or having one unit attack another. Actions allow the designer to have complete control of what occurs in the game.
Hero selection
Events
Unit - A unit enters Region 000 <gen>
Conditions
(Unit-type of (Entering unit)) Equal to Wisp
Actions
Unit - Create 1 Dreadlord for (Owner of (Entering unit)) at (Center of (Playable map area)) facing Default building facing degrees
Camera - Pan camera for (Owner of (Entering unit)) to (Center of (Playable map area)) over 0.00 seconds
Unit - Remove (Entering unit) from the game