• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

multiple change ownership problem

Status
Not open for further replies.
Level 2
Joined
Jun 29, 2004
Messages
19
Some time ago i asked you to tell me how to change owner of unit which life got below XX. It worked, but only when there is only one trigger like that... When i made separate triggers for castle/ town hall and something else, THEY DOESNT WORK !!

and one more... Why the hell it always says that i need to build town hall or i will be shown to all players... My buildings (own made) are Town Halls... Just like normal one... Why do the game doesnt see them ??

<Sry for mistakes>
 
Level 13
Joined
May 5, 2004
Messages
1,330
Mesiash said:
...Why the hell it always says that i need to build town hall or i will be shown to all players... My buildings (own made) are Town Halls... Just like normal one... Why do the game doesnt see them ??

Did you remove the melee-triggers? It's a function for melee-games that a player that has no town hall is shown to other players, so he doesn't simply hide some of his last units and nerves the other players.

To the other question: I'll see what I can do. Would be helpful if you post your current triggers here.
 
Level 2
Joined
Jun 29, 2004
Messages
19
Castle
Events
Unit - A unit Is attacked
Conditions
(Unit-type of (Attacked unit)) Equal to Castle
(Life of (Attacked unit)) Less than 800
Actions
Unit - Change ownership of (Attacked unit) to (Owner of (Attacking unit)) and Change color

Same are for Town Hall and (dunno name) Mansion ??

I wonder if my self-created units based on castles are still castles now... Maybe thats the problem...
 
Level 13
Joined
May 5, 2004
Messages
1,330
öhm, yeah, probably :wink:

Remember, a new unit is a new unit!

simply create another trigger for the (dunno name, too :wink: ) mansion and one for the town hall.

Example

Castle
Events
Unit - A unit Is attacked
Conditions
(Unit-type of (Attacked unit)) Equal to Town Hall
(Life of (Attacked unit)) Less than 800
Actions
Unit - Change ownership of (Attacked unit) to (Owner of (Attacking unit)) and Change color
 
Level 2
Joined
Jun 29, 2004
Messages
19
Maybe someone can think of easier way to do it, coz i made more than 24 new units, and i would like to make some trigger which will refer to all of one kind...

Maybe i should change some units' stats, etc. ??
 
Level 13
Joined
May 5, 2004
Messages
1,330
One question: Should all buildings be ownerchangeable? Then the trigger would be easy. Else you HAVE to refer to the specific buildings (like I said, possible in one trigger with If/Then/Else or in 24 triggers -> 24 Units)

Edit: Won't need if/then/else, "or"-conditions are enough

The two trigger solution I thought of won't work cause WE/WEU doesn't have the function I thought of.

Here an example of the one-trigger-solution for 4 buildings:

OwnerChangeWithOrFct
Events
Unit - A unit Is attacked
Conditions
Or - Any (Conditions) are true
Conditions
  • And - All (Conditions) are true
    Conditions
    [list:e7c92d6b67](Life of (Attacked unit)) Less than 500.00
    (Unit-type of (Attacked unit)) Equal to Barracks
And - All (Conditions) are true
Conditions
  • (Life of (Attacked unit)) Less than 800.00
    (Unit-type of (Attacked unit)) Equal to Castle
And - All (Conditions) are true
Conditions
  • (Life of (Attacked unit)) Less than 600.00
    (Unit-type of (Attacked unit)) Equal to Keep
And - All (Conditions) are true
Conditions
  • (Life of (Attacked unit)) Less than 125.00
    (Unit-type of (Attacked unit)) Equal to Farm
[/list:u:e7c92d6b67]
Actions
Unit - Change ownership of (Attacked unit) to (Owner of (Attacking unit)) and Change color
 
Level 2
Joined
Jun 29, 2004
Messages
19
Your idea is good, however it refers to normal Castles, Barracks, Etc.. So i think i will have to make 24 similar triggers :evil:

I turned off melee in my map, and i still have to build "Town Hall" in 2 minutes to not get my towns shawn to all players... why the hell ? :D

One more prob. shawn when i tested this trigger... Why the hell guard towers with given burrow ability (all abilities of normal burrow) can get peons hidden in and game crashes when i click on it ?? :?
 
Status
Not open for further replies.
Top