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

Global Spell Shrine help.

Status
Not open for further replies.
Level 2
Joined
Dec 11, 2018
Messages
21
I´ve been trying to come up with a way to make this Global shrine happen but I find it above my knowledge to do so. I was hoping that you guys could help me make it happen or guide me how to do it.

My Idea is the following:
A shrine where you can use 5-7 different global spells affecting the hero of all other players except brown.(which does not have a hero and is going to be the computer /Neutral for bosses etc).
The plan is that every player (probably 6 players total) is going to have 1 hero each that they use through the map and each will have one of these "shrines" where they can use global spells that will affect every other players´ hero.

I´ve tried for several hours and to the limit of my very limited Wc3 knowledge to make something happen but I cannot get it right.

The spell ideas I was gonna have in the shrine was:
1st: Finger of death targeting every other hero and killing them.
2nd: Mass slow where you curse every other hero with a slow debuff for a limited time.
3rd: Mass Stun where you stun every other hero.
4th, 5th and 6th was going be the same as 1st-3rd but single target (where you choose what player you want to affect even if you don´t have vision of their hero atm).
7th: Vision, a spell where you gets vision of a targeted area for a limited time.

I think I can manage to make the spells and dummys needed, but I don´t know how to:
- target all other heroes
- how to target a hero without vision
- how to make the channel spell to cover all different spells with as low amount of triggers as possible.

With other words,,,,, I got very low knowledge of what to do and therefor would appreciate if you would be EXTRA thorough with the explaining and would appreiciate as much help as you would want to offer in this situation. I know Im asking for a lot, sorry.

Happy holidays and Cheers, my masters of Wc3 Editor.

P.S if there is any information that is unclear or you need specified/explained then please tell me and I will do my best to complete it.
 
Level 2
Joined
Dec 11, 2018
Messages
21
I also need to add that the map is going to start by every players will get 1 unit to use for the "hero picking" like in hero arenas etc. This means that the players won´t begin with the heroes Im talking of in the post above, but first after approx 1min of the game time where the hero choosing is over. I hope I did not confuse thing even further with this and sorry if the English is poor.
 
Level 19
Joined
Aug 29, 2012
Messages
793
Again, there are multiple ways to do this.

First, you need to store heroes into Unit variables.

  • Register Heroes
    • Evénements
      • (Your Event here)
    • Conditions
      • (Your conditions)
    • Actions
      • Set PlayerHero[(Player number of (Owner of (Triggering unit)))] = (Triggering Unit)
This is an example, you may need to change "Triggering Unit" by something else depending on how heroes are selected in your map. Once they are stored in variables, you can easily refer to them later. Note that this variable must have an array, meaning it must go up to a certain number; in this case, we want to store 5 units, so an array of 5 is nice. (Yes I know arrays start at 0 but let's not overcomplicate things).

Now for instance, for Finger of death:

  • Finger of Death
    • Evénements
      • Unité - A unit Begins the effect of an ability
    • Conditions
      • (Ability being cast) Egal à Finger of Death (Global)
    • Actions
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (PlayerHero[(Integer A)] belongs to an enemy of (Owner of (Triggering unit))) Egal à TRUE
            • Alors - Actions
              • Set TempPoint = (Position of PlayerHero[(Integer A)])
              • Unité - Create 1 Dummy Caster for (Owner of (Triggering unit)) at TempPoint facing (XYZ) degrees
              • Unité - Add a 3.00 second Générique expiration timer to (Last created unit)
              • Unité - Add Finger of Death to (Last created unit)
              • Unité - Order (Last created unit) to Archimonde - Finger of Death PlayerHero[(Integer A)]
              • Custom script: call RemoveLocation (udg_TempPoint)
            • Sinon - Actions
First of, you need what we call a dummy caster, i.e. a invisible, invincible unit that has no other purpose than casting your spells and creating effect without players knowing it. I think you can find various tutorials about dummy casters here.
Now the trigger : I use a loop from 1 to 5, which would correspond to player numbers. The loop will go from players 1 to 5, meaning that the actions will run 5 times, each time replacing "Integer A" by the player number. Then, I check if PlayerHero (the unit that we stored in the 1st trigger) with the array (player number) belongs to an enemy of the unit that casts the global spell; if it's the case, I store a location as TempPoint, I create a dummy caster at this location, give it a timed life as well as the actual Finger of death spell, and order it to cast the spell on the hero.
The last line is used to clean memory leaks, that's a bit advanced and you can find tutorials about them if you like.

Thus, the game will create 4 (5 minus the player who casts the spell) dummies and order them to cast the spell I want on heroes stored in a variable.

That's the gist of it. You can then change the type of spells you want to best cast on the heroes, but the main concept is here: store them, create an invisible unit near them, order it to cast the spell you want on them.
 
Level 2
Joined
Dec 11, 2018
Messages
21
Thank you a lot for your reply! I did however not fully understand how to add the heros to the variable but I understand that you need more information. The way heroes is going to get picked is like most hero arenas where you get a wisp which you then use to enter a circle of the hero wanted. The wisp then dies and the selected hero gets summoned at a specific point. However all heroes no matter player, is going to be summoned at the same region.

What confused me were when you put "your event" and "your conditions" and what to actually place there.
 
Last edited:
Level 7
Joined
Apr 17, 2017
Messages
316
Regarding to casting a spell with no vision and targeting specific target, one can use a spellbook and since you said you will only have 6 players, you can add 6 spell in a spellbook, which only targets spefic color and trigger it. You dont need to target them by clicking on the enemies do you? If not you can use a spell based with no target, then use triggers. Here's the demo map:
 

Attachments

  • Demo Map.w3x
    25.4 KB · Views: 18
Level 2
Joined
Dec 11, 2018
Messages
21
@Aeryn Correct, the point of the "global shrine" is exactly that you can affect an enemy with the chosen spell without actually knowing where in the map they are or see them. That means that it´s not possible to target them directly by neither area or direct target. I really like your spellbook idea and Im going to look into it further when I get home tonight! Please stay tuned :)<3

@Chaosium I feel very stupid as I still don´t fully understand it and Im sorry to being a pain in the ass. However I would ask you, if you could make an example map using "Wisp --> Hero circle" and show more concretely how it could look. One thing I didn´t understand is, as I have 1 trigger for each hero available to be picked (currently 6 total), what exactly should be in events and conditions. So let´s say when a wisp enters a circle the hero would be created at a certain region, would I be able to use "Unit enters region" as an event, in a new trigger, and use the same region the heroes is created in, as the "entering" region and then have your "set" variable as action? In that case I should replace triggering unit with entering unit right? Again Im sorry for being slow and I really appreciate all your effort to help me.
 
Level 19
Joined
Aug 29, 2012
Messages
793
If you use Entering unit, you're going to store the wisp in the variable, which isn't what we want. If you have an action Create (your hero) at point XYZ, you need set the variable right after and using "last created unit".

So, you can use "a unit enters region" event, you just need to make sure you save the right unit.
 
Level 7
Joined
Apr 17, 2017
Messages
316
@Aeryn Correct, the point of the "global shrine" is exactly that you can affect an enemy with the chosen spell without actually knowing where in the map they are or see them. That means that it´s not possible to target them directly by neither area or direct target. I really like your spellbook idea and Im going to look into it further when I get home tonight! Please stay tuned :)<3

@Chaosium I feel very stupid as I still don´t fully understand it and Im sorry to being a pain in the ass. However I would ask you, if you could make an example map using "Wisp --> Hero circle" and show more concretely how it could look. One thing I didn´t understand is, as I have 1 trigger for each hero available to be picked (currently 6 total), what exactly should be in events and conditions. So let´s say when a wisp enters a circle the hero would be created at a certain region, would I be able to use "Unit enters region" as an event, in a new trigger, and use the same region the heroes is created in, as the "entering" region and then have your "set" variable as action? In that case I should replace triggering unit with entering unit right? Again Im sorry for being slow and I really appreciate all your effort to help me.
The map I sent you has a mini selection system, with wisps and tavern tho.
 
Level 2
Joined
Dec 11, 2018
Messages
21
@Aeryn I do notice though, that your finger of death for example, does not work on heroes not currently in vision. Is there a way, using your trigger, to fix that as I want the shrine to cast finger of death on all enemies no matter where they are or if you see them.
 
Level 7
Joined
Apr 17, 2017
Messages
316
@Aeryn I do notice though, that your finger of death for example, does not work on heroes not currently in vision. Is there a way, using your trigger, to fix that as I want the shrine to cast finger of death on all enemies no matter where they are or if you see them.
there is a way which is called making your own ability using trigger editor :D
 

Attachments

  • Demo Map.w3x
    27 KB · Views: 23
Level 2
Joined
Dec 11, 2018
Messages
21
WoW that looks like some complex shit xD But I managed to make it work with 2 spells of my shrine!! I also tried looking into if I could apply your trigger setups, to just apply stun like the target stun spell, but I didn´t manage sadly. I think tbh it just got way out of my understanding with all variables indexes and shit xD Anyway 2 spells is working as I want and I want to thank you A LOT for it!! so Thank you!!
 
Level 7
Joined
Apr 17, 2017
Messages
316
Sadly if you order a dummy unit to cast a spell, it needs vision just like normal units. Well if you create a dummy unit on top of target and order him to cast the spell and add 0.3 sec expiration timer to it, I think that should also work
 
Status
Not open for further replies.
Top