• 🏆 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!

Trigger Problem - Problema Detonador

Status
Not open for further replies.
Level 6
Joined
Oct 25, 2018
Messages
108
Hola. Estoy iniciando con esto de los disparadores por lo que no tengo mucho conocimiento. Resulta que quiero crear un disparo que cuando el héroe llegue a un Nivel 10, automáticamente cree un edificio en la parte superior del mapa . Logre hacerlo, pero, pasa que cuando el Heroe mata a un Creep muy fuerte o algun otro Heroe enemigo (es un RPG lo que estoy haciendo) a veces pasa del Nivel 9, al Nivel 11 (subiendo automaticamente dos niveles, por lo que se Salta el nivel 10 y el gatillo no funciona). Entonces considere la condición del desencadenante - Mayor o igual a 10 - porque supuse que si se saltaba niveles, aun así el desencadenador funcionaria. Pero pasa que ahora cada vez que el Héroe sube un nivel que sea mayor al 10 crea el edificio (Nivel 10, nivel 11, nivel 12 y asi). Y yo necesito solo 1. Alguien que me pueda guiar?

Hi. I'm starting with this from the triggers so I do not have much knowledge. It turns out I want to create a shot that when the hero reaches a Level 10, automatically create a building at the top of the map. I managed to do it, but, it happens that when the Hero kills a very strong Creep or some other enemy Hero (it's an RPG what I'm doing) it sometimes goes from Level 9, to Level 11 (automatically raising two levels, so Skip level 10 and the trigger does not work). Then consider the condition of the trigger - Greater than or equal to 10 - because I assumed that if you skipped levels, still the trigger would work. But it happens that now every time the Hero rises a level that is greater
than 10 creates the building (Level 10, level 11, level 12 and so on). And I need only 1. Someone who can guide me?

Lo siguiente que quisiera hacer es crear un Upgrade que al actualizarse modifique el tipo de movimiento de los Heroes de pies a anfibio (deseo puedan caminar por el agua luego de actualizar cierto upgrade) No se me ocurre como hacerlo-

The next thing I would like to do is create an Upgrade that, when updated, modifies the type of movement of the Heroes from feet to amphibian (I wish I could walk through the water after updating a certain upgrade) I can not think of how to do it-

Help me please.

upload_2018-11-1_12-45-5.png
 
Level 11
Joined
Nov 23, 2013
Messages
665
Hey,

At the beginning of your trigger, you just need to add the following action:
  • Trigger - Turn off (This trigger)
As for your second question, as far as I know, I don't think there is a trigger that could modify movement type. Off the top of my head, I think you might want to use some morph ability, such as Demon Hunter's ultimate, and morph your unit into another unit. That second unit is an exact copy of the first unit but with a different movement type.

By the way, you don't have to use several language, it's an English-only forum and everyone will be able to use English to help you :)
 
Last edited:
Level 6
Joined
Oct 25, 2018
Messages
108
Hey,

At the beginning of your trigger, you just need to add the following action:
  • Trigger - Turn off (This trigger)
As for your second question, as far as I know, I don't think there is a trigger that could modify movement type. Off the top of my head, I think you might want to use some morph ability, such as Demon Hunter's ultimate, and morph your unit into another unit. That second unit is an exact copy of the first unit but with a different movement type.

By the way, you don't have to use several language, it's an English-only forum and everyone will be able to use English to help you :)
Thank you. Try turning off the trigger but it turns out that when another hero other than me goes up to Level 10 and gets the building first, it leaves my Hero unusable (since the trigger was generated and it went out, my hero when leveling up after the others no longer opts to the specific building, since the trigger no longer works - at the start of the game at least 6 Heroes split at the same time so if any of them goes up to level 10, first the building wins and the trigger disappears and I do not want that. I would like every hero to go up to that level to have his own building, but only 1) Because of walking on water, I thought about it, but since it is an RPG he believes more than 100 heroes, so to make them walk on water is too much difficult ... for the same reason I thought maybe it would be easier to generate some trigger that in general manages to walk any Hero type unit on water ... Thank you very much, I will take into account what you said, but I still can not solve the problem of the building reached the level 10 :c
 
Level 11
Joined
Nov 23, 2013
Messages
665
Regarding your first problem, I suppose you could use a condition that checks if the building has already been created for the hero's owner. Something like this:
  • (Number of units in (Units owned by (Owner of (Triggering unit)) of type <Building>)) Equal 0
That way, the trigger will fire only if no building has been created for the player whose hero just reached level 10+.

As for your second problem, yeah it's complicated to create dozens of abilities if you have too many heroes. I'm sorry, I'm totally clueless about this one.
 
Level 6
Joined
Oct 25, 2018
Messages
108
Regarding your first problem, I suppose you could use a condition that checks if the building has already been created for the hero's owner. Something like this:
  • (Number of units in (Units owned by (Owner of (Triggering unit)) of type <Building>)) Equal 0
That way, the trigger will fire only if no building has been created for the player whose hero just reached level 10+.

As for your second problem, yeah it's complicated to create dozens of abilities if you have too many heroes. I'm sorry, I'm totally clueless about this one.
I will try the trigger you indicated when I arrived at my house. Thank you!! I report results ... as for the second, if it is complicated to generate that skill for so many heroes ...
 
Level 6
Joined
Oct 25, 2018
Messages
108
upload_2018-11-1_17-42-40.png


Try the way you told me but it did not work out. Although I managed to correct it, creating this trigger. By creating an independent trigger for each player, I managed to solve the problem, now each player, when they reach Level 10, will have their exclusive building, and will not affect the other players when they obtain it, since each one has its trigger. For the rest I could not create any solution when walking on water, I'm still trying.
 
Level 39
Joined
Feb 27, 2007
Messages
5,013
Off the top of my head, I think you might want to use some morph ability, such as Demon Hunter's ultimate, and morph your unit into another unit. That second unit is an exact copy of the first unit but with a different movement type.
I would use this method for morphing into a duplicate unit type that has amphibious movement: Hero passive transformation You can use a similar method to morph it back at any time, the morph cannot be dispelled, and it won't show a duration on the hero UI like Metamorphosis will. I know of no other way to make water walking possible (flying movement too but that's not a solution you want).

You can do it with 1 trigger only, rather than 1 trigger per player, if you use a boolean variable array to check if that player has already leveled up to 10. There is no need to do the Trigger - Turn off any more since it will only run once per player (remove that line from the trigger). Like this:
  • Events
    • Unit - A unit gains a level
  • Conditions
    • (Hero level of (Triggering Unit)) greater than or equal to 10
    • PlayerHasShop[(Player number of (Owner of (Triggering Unit)))] equal to false
  • Actions
    • Set PlayerHasShop[(Player number of (Owner of (Triggering Unit)))] = true
    • -------- do your actions here --------
 
Status
Not open for further replies.
Top