• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Two trigger questions.

Status
Not open for further replies.
Level 2
Joined
Feb 10, 2010
Messages
13
Annnnnnnnnd more trigger questions from me.



First one I have is, is it possible to make a trigger to switch teams?
For example, being Player 1(Red), who is human. Would it be possible to enter a text such as -Blue to switch to Player 2(Blue), who would hypothetically be orc, and control them instead?

Second one is probably easier. How would I go about makeing a trigger that allowed me to cast a spell that grows trees?

Thanks for the help.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
For example, being Player 1(Red), who is human. Would it be possible to enter a text such as -Blue to switch to Player 2(Blue), who would hypothetically be orc, and control them instead?

Well it depends what you mean by that. You can change a player's color and virtually "swap" them amongst themselves, but if you're trying to do a complete transfer from one player to another then it is not. For example, say Player 2 (Blue) is Night Elf; Player 1 (Red) is Orc. Both of these players will have separate, individual UI textures for their different races, and this cannot be changed in-game with triggers.

It depends to what extent you are trying to change the players. Can you give me an example of what you're trying to use this for?

Second one is probably easier. How would I go about makeing a trigger that allowed me to cast a spell that grows trees?

Well you would use the event, "Unit starts the effect of an ability" to register a set of actions that creates destructables. Or perhaps you're talking about reviving existing trees? If so then this question has been answered before, though I don't know how easy it would be to find with Search.

If you're trying to revive trees then you'll have to use the action "Resurrect Destructable", or something to that nature. The GUI is fairly easy to follow... have you attempted anything or are you not sure where to start?
 
Level 2
Joined
Feb 10, 2010
Messages
13
Well damn. Guess its not possible then. What you were describing that is not possible is exactly what I wanted to do :D

As for the trees, about as far as I have gotten is "Unit starts the effect of an ability"
And I would rather it be just creating them, not resurrecting them. But if that is not possible, I'll go hunt down the one for resurrecting them.
 

Deleted member 177737

D

Deleted member 177737

Just set the forces in the map
EX: Force 1
Player 1
Player 2
Force 2
Player 3
Player 4

then make a trigger that's something like~

Event: Player 1 types "-Force 2"
Action: Ally player 1 and 3, Ally player 1 and 4, enemy player 1 and 2

Just copy and paste something like that for all the players. It should ally and make people enemy's properly if you set it up right.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
First one I have is, is it possible to make a trigger to switch teams?
For example, being Player 1(Red), who is human. Would it be possible to enter a text such as -Blue to switch to Player 2(Blue), who would hypothetically be orc, and control them instead?
Semi possible, although everything from allies, to units and even player colour can be changed via triggers, to become an exact presence of blue it is not possible to change the players race mid game. The end result is a player to everyone else looks as good as starting at blue but as the player the race may be incorrect (wrong notification messages / wrong interface skin for an orc if he was a human when the game started).

Start by swapping units. Then move up to changing player colours. Then finish with changing alliences.

Second one is probably easier. How would I go about makeing a trigger that allowed me to cast a spell that grows trees?
This is possible but like the above, not 100% accurate. The trigger is your normal trigger enhance spell setup (event / condition) but it spawns destructables randomly near the target point of the ability being cast.

The trees can be harvested and everything but there are 2 minor problems. Firstly the trees do not show up on the minimap cause there is no update process for that. Secondly if the trees are created under units it can result in them becomming trapped or in worst case a fatal error of the game.

The second problem will require you to simply check if units are nearby thetarget area and ifso abort the spell with an error.
 
Level 2
Joined
Feb 10, 2010
Messages
13
Alright. After doing a bit more research into it, I think I have found a more possible route.

Lets say, I create a few units for each race under Player 1 and change the team color for each one. For example, Human (Red) Orc (Blue) Undead (Green) NE (Yellow), but they are all still under Player 1. Would it be possible for me to make a trigger that would allow me to type -Blue and only control the Orc units, makeing everything else hostile? And to be able to do that back and forth so I could control whichever color that I wanted by typing in a command.

And after reading Dr. Super Good's post, I guess I will just stick with reviving trees. It seems far easier and less open to error :D
 
Status
Not open for further replies.
Top