Warcraft III resources & community, 2003–2006 · archived

Triggers error ???

3 posts
#1

Triggers error ???

Hey, straight to the point.

I am making a Hero map and in the beginning the camera will lock on 'Tavern of Agility' then when it sells a unit I want the sold unit to be moved to a players region (witch I used set=...) and the camera should pan to the sold units moved location. Now, this trigger worked when I was trying on Player 1 (RED) but now when Ive copied the whole trigger it wont work, This is how it looks like...

http://img351.imageshack.us/img351/9471/triggereditor9re.th.jpg

So if you can help me get the sold unit to be moved and camera to then that would be great :)
(If you need more pictures on how the set= is and such just tell me)

Thanks in advance !
#2
i don't now, how it is possible that it worked all fine before...

but you asked for a solution, here it comes:

Event::
A unit sells a unit
Condition::
Or (starts here)
type of(selling unit) = tavern of agility
type of(selling unit) = tavern of strength
type of(selling unit) = tavern of intelligence
//i mean the unittype of these, not the specific building
//(Or ends here)
(Owner of Sold Unit) slot status = playing
(Owner of Sold Unit) controller = user
actions::
move (sold unit) to Center of (PlayerHeroRegion[Playernumber of (Owner of sold unit)])
reset cam for (owner of sold unit) ...
pan cam for (owner of sold unit) to center of (PlayerHeroRegion[Playernumber of (Owner of sold unit)])
kill buying unit


Thats the first trigger
the second one you need is

action::
map init
condition:
action::
for integer A = 1 to 12 do //use your max (human) players instead of '12'
if
conditions:
Player(IntegerA) controllter = user
Player(IntegerA) slot status = playing
actions:
Limit heroes for Player(IntegerA) to 1
Lock cam for Player(IntegerA) to <your tavern> using ...
if (ends here)
for (ends here)


i hop eyyou understood what i wrote, if not just ask ^^ i will (try to) explain it to you.

- Raszul
#3
Raszul thanks for the help !

I looked at what you wrote and tryed out but I think that the second trigger was a bit much so I tryed some other things.

And now it works, I moved the 'camera - lock' for each player to an own trigger + added some unit-type conditions in each players Triggers.

(I can upload some more pictures on how I did if you want :) )

So thanks for the help !