Juice_F, assume that the player1 is a computer, and also assume the START LOCATION is where the spawn point is. In custom maps, using dummy units is effective substitution of simple regions Events Unit - Paladin 0001 <gen> Is selected Conditions ((Triggering player) is an ally of Player 1 (Red)) Equal to True Actions Trigger - Turn off (This trigger) Unit - Move Paladin 0001 <gen> instantly to (Player 1 (Red) start location) Unit - Change ownership of Paladin 0001 <gen> to (Triggering player) and Change color Special Effect - Create a special effect at (Player 1 (Red) start location) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl Special Effect - Destroy (Last created special effect) -------- Visibility stuff --------
Also, Juice_F, if you right-click on the top line of a trigger and select "Copy as Text" you can just paste it here wholesale. In the future, you'd be well-served by putting it in [code] tags.
Also, having a Wait of any kind in your trigger gives it the opportunity to overwrite information like (Triggering Player) and any other globals after the wait, which could screw it up. Alternatives are to set all the globals to locals and jass the trigger, set globals to global arrays indexed by player number, or eliminate the wait.
I tryed Eusiras trigger but it didn't work, still the same problem, the unit is created for the previus owner. For some reason it seems to think that the triggering player is the previous owner.
468 posts Cndaaa. Errr. AnCaDa. ugh. Canada. HAHA! joined
#23
OK if this is done by icons, then i cant help,but if its done by modles, simply make a wisp for eahc player, and give it a spell called pick hero Lets say the hero is a paladin.... EVENTS -Unit begins casting a spell CONDITIONS -Targeted unit equal to [Paladin] -Ability being cast equal to [Pick Hero] ACTIONS -Create 1 [Paladin] for Owner of Casting unit at center of [Region 000] --Visual Stuff-- -Wait 0.10 -Disable this Trigger
I solved the problem!!! Here is what I came up with...
Untitled Trigger 003 Events Unit - Huntress 0042 <gen> Is selected
Conditions
Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Huntress 0042 <gen> is selected by Player 1 (Red)) Equal to True Then - Actions Unit - Create 1 Huntress for Player 1 (Red) at (Center of HeroSelected <gen>) facing Default building facing degrees Unit - Remove Huntress 0042 <gen> from the game Special Effect - Create a special effect at (Position of Huntress 0042 <gen>) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl Wait 1.00 seconds Camera - Pan camera for Player 1 (Red) to (Center of HeroSelected <gen>) over 0.00 seconds Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Black mask across HeroChooseHill <gen> Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Fog of war across HeroChooseHill <gen> Else - Actions Do nothing
Then i just did the same action 2 more times and it works fine. But Thx to all of you who tried to help me