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

[Solved] Finish channeling an ability

Status
Not open for further replies.
Level 7
Joined
Nov 13, 2006
Messages
243
Hello!

I have 2 fishing triggers that interfere with eachother.

The first one detects if the unit has a fishing rod equipped and if the user is casting in water. If not the unit is ordered to stop and give an error message.



upload_2016-9-4_20-0-50.png



The second trigger waits for the unit to finish the channel ability and then calculate a percentage. Based on the percentage the unit gets some lewt.

upload_2016-9-4_20-2-50.png



The problem is that when the first trigger stops the unit from casting, it automatically runs the second trigger and "gives loot" to the player.

My question is, how to stop the first trigger from interfering with the second one?

Thanks! :D
 
Level 4
Joined
Jul 26, 2016
Messages
88
Hello!

I have 2 fishing triggers that interfere with eachother.

The first one detects if the unit has a fishing rod equipped and if the user is casting in water. If not the unit is ordered to stop and give an error message.



View attachment 247431


The second trigger waits for the unit to finish the channel ability and then calculate a percentage. Based on the percentage the unit gets some lewt.

View attachment 247438


The problem is that when the first trigger stops the unit from casting, it automatically runs the second trigger and "gives loot" to the player.

My question is, how to stop the first trigger from interfering with the second one?

Thanks! :D

Instead of Finishes Casting the ability event for the second trigger, try a Starts the effect of an ability : )
 
Level 7
Joined
Nov 13, 2006
Messages
243
Instead of Finishes Casting the ability event for the second trigger, try a Starts the effect of an ability : )

Well yes, but i want the player to stay the whole duration of the channel in order to get his fish or boots or w/e. I don't want him to just spam cast the ability and get it.

I just got an idea, i'll test it and come back with the result.
 
Level 7
Joined
Nov 13, 2006
Messages
243
Hm well hopefully this is a single player game with only one unit that has the Cast line ability. This would definitely screw up if multiple instances of cast line were to go.

On a side note, you know you can copy-paste triggers into the forums without having to take pictures of it, and then uploading it, right? Take a look at this tutorial.

It works for now. I will make it multiplayer compatible tomorrow.

And i know i can copy paste them but it was easier to just print screen a part of the screen and them just ctrl+v directly
 
Level 7
Joined
Nov 13, 2006
Messages
243
It's best to make stuff multiplayer compatiable as soon as possible. I remember starting a map when I had absolutely no knowledge about triggers and I ended up limiting the heroes to 1 per game... It was a pain to rework everything to make them MUI :D

Well its alright on this map because i just have to turn some variables into arrays to handle all players so its not such big of a pain. I mean the triggers above took me ~2 minutes to turn them into multiplayer compatible system with a break to take a pee.
 
Level 7
Joined
Nov 13, 2006
Messages
243
Say... Just out of curiosity (and hoping to take a variable array of your map), if you turn off then turn on the loot trigger in case fishing conditions aren't met, does the loot trigger still run?

It should work, you just turned it off and on again. But i suggest you use how its done in the images above. It works perfectly in single player and for multiplayer just turn FishingBool into an array to store a value for each player and its good to go.
 
Status
Not open for further replies.
Top