• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] [SOLVED] Trying to make a custom ability from The Hive Work

Status
Not open for further replies.
Level 6
Joined
Dec 11, 2014
Messages
93
Hey everyone. I was wondering if I could get some help on making the downloaded FireForm Spell from the Hive work in another map.

It works perfectly fine when I download the map there and test it in the map file, but when I copy the custom ability, custom units, variables, and then the triggers themselves it won't work in the map I pasted it too. I am still pretty novice at downloading and importing custom spells via triggers (And even more novice at recognizing the parts of, or making custom spell triggers myself.)

I have also attached the map I am trying to make it work in here, removing anything not related to the spells (I didn't reset the gameplay constants though, in case the issue may be related to that?) and the ability despite just flat out copying and pasting everything from the original map just doesn't work for whatever reason.

Could someone maybe point me in the right direction on why it may not be working? Am I missing something incredibly obvious or is there something in gameplay constants I have changed that could be causing the issue?
Any help would be GREATLY appreciated because this ability is perfect for the map I'm trying to mod.
 

Attachments

  • Fireform ability.w3x
    63.1 MB · Views: 10
Level 24
Joined
Feb 9, 2009
Messages
1,787
Copied into a brand new map fine.
Ensure that the config section in the trigger editor has their variables set:
1654473243433.png
 
Level 6
Joined
Dec 11, 2014
Messages
93
And did you try doing it in a fresh map?
Or with a unit with no other spells, or an alternate cast spell?
Give me a screenshot of your trigger editor.

The program lightshot is what I use to take configurable screenies.
Unfortunately I'm at work and don't have access to the save file right this moment, but I did upload an empty map with my post that had just the copied and pasted triggers/variables if you want to check that, otherwise I can post screenshots when I am home tomorrow. Thanks for your quick reply!
 
Level 20
Joined
Feb 27, 2019
Messages
593
Remove or replace
(Terrain pathing at TempPoint of type Walkability is off) Equal to True
in FF_Loop with something else.
You can use an item to check for pathability. I stole the function for that from bribes knockback system but using an item to check for pathability is well known.

EDIT: At least, therein lies the problem.
 
Last edited:
Level 24
Joined
Feb 9, 2009
Messages
1,787
Unfortunately I'm at work and don't have access to the save file right this moment, but I did upload an empty map with my post that had just the copied and pasted triggers/variables if you want to check that, otherwise I can post screenshots when I am home tomorrow. Thanks for your quick reply!
That's some overtime you are doing...
Let us know if you are being held against your will~
 
Level 6
Joined
Dec 11, 2014
Messages
93
That's some overtime you are doing...
Let us know if you are being held against your will~
Omg! I knew I was forgetting something LOL sorry about that. Was a hectic day and I came home and slept right away, haven't had much of a chance to work on my map so it totally slipped my mind.
I've attached various screenshots of the triggers here, I forgot to open the variables until the screenshot3 part 2 (the last trigger editor screenshot), so if you want to look at the variables just check that screenshot (but it's basically just the initial ones that get copied over.)

I have also attached my object editor screenshot of the copied over units and ability (also just the generic values). Hopefully this will be enough to find what could potentially be the problem. I am going to test it in a brand new empty map right now as well and will update this comment with the results.

EDIT: I made a fresh map and it -is- working there, so I guess the problem does lie within my map somewhere. Now to just find out where. The only other thing I can think of that I changed is the gameplay constants...

2NDEDIT: I copied and pasted the entire code from the original map again, reset all gameplay constants to their original values, made sure I had no custom models or anything imported in the map, yet still for whatever reason it doesn't want to work in the map I attached above. I have NO idea what is different about that map than the fresh one I tried on or the original map. Everything is set to be the same and there are no other triggers in the game (other than revealing visibility at the start of the game but the original map has a trigger like that too) that could be interrupting it... I'm at a complete loss.
 

Attachments

  • Screenshot1.png
    Screenshot1.png
    77.9 KB · Views: 9
  • Screenshot2.png
    Screenshot2.png
    57.3 KB · Views: 9
  • Screenshot3part1.png
    Screenshot3part1.png
    98.7 KB · Views: 11
  • Screenshot3part2.png
    Screenshot3part2.png
    111.9 KB · Views: 11
  • Screenshot4.png
    Screenshot4.png
    101.2 KB · Views: 12
  • Screenshot5.png
    Screenshot5.png
    154.9 KB · Views: 9
Last edited:
Level 6
Joined
Dec 11, 2014
Messages
93
Remove or replace
(Terrain pathing at TempPoint of type Walkability is off) Equal to True
in FF_Loop with something else.
You can use an item to check for pathability. I stole the function for that from bribes knockback system but using an item to check for pathability is well known.

EDIT: At least, therein lies the problem.
Oh, I didn't realize that was a problem. I didn't notice that system in the original map, so it didn't even cross my mind that could be causing it. I'll have to look into this, thanks.

EDIT: I did manage to copy and paste it into a blank map and it worked fine, so I don't think the problem lies with that trigger unfortunately.
 
Last edited:
Level 24
Joined
Feb 9, 2009
Messages
1,787
Omg! I knew I was forgetting something LOL sorry about that. Was a hectic day and I came home and slept right away, haven't had much of a chance to work on my map so it totally slipped my mind.
I've attached various screenshots of the triggers here, I forgot to open the variables until the screenshot3 part 2 (the last trigger editor screenshot), so if you want to look at the variables just check that screenshot (but it's basically just the initial ones that get copied over.)

I have also attached my object editor screenshot of the copied over units and ability (also just the generic values). Hopefully this will be enough to find what could potentially be the problem. I am going to test it in a brand new empty map right now as well and will update this comment with the results.

EDIT: I made a fresh map and it -is- working there, so I guess the problem does lie within my map somewhere. Now to just find out where. The only other thing I can think of that I changed is the gameplay constants...

2NDEDIT: I copied and pasted the entire code from the original map again, reset all gameplay constants to their original values, made sure I had no custom models or anything imported in the map, yet still for whatever reason it doesn't want to work in the map I attached above. I have NO idea what is different about that map than the fresh one I tried on or the original map. Everything is set to be the same and there are no other triggers in the game (other than revealing visibility at the start of the game but the original map has a trigger like that too) that could be interrupting it... I'm at a complete loss.
Pleasing to find that the spell is working, its a start in the right direction.
Can you describe how it doesn't "work"?
I also wonder if the variable TempDest variable might be too common and might have mixed up with someone else who used that same name for their variable.
Lastly if you post your map triggers, I could take a look.
(Export it here and attach to your next post.):
1654637866003.png
 
Level 6
Joined
Dec 11, 2014
Messages
93
Maybe one or more of the rawcodes for objects used by this spell is already in use in your map, so when you paste data over it's not quite right?
That was my thought too, but I cleared my map and saved a copy of it - basically empty of any other triggers/abilties/etc. and it still didn't want to work for whatever reason (even after I copied and pasted the original maps data over again once it was a clean slate)
 
Level 6
Joined
Dec 11, 2014
Messages
93
Pleasing to find that the spell is working, its a start in the right direction.
Can you describe how it doesn't "work"?
I also wonder if the variable TempDest variable might be too common and might have mixed up with someone else who used that same name for their variable.
Lastly if you post your map triggers, I could take a look.
(Export it here and attach to your next post.):
View attachment 400995
When the unit goes to cast the ability, he plays his attack animation (which is the one the dummy spell uses) and then he just kinda blips out of existence for not even a second and then is standing right where he started like nothing happened. He doesn't move at all, no special effects play or anything. He just kinda blips out of existence for a half second. If you use it on a location that would have trees or units that it SHOULD destroy or damage respectively, it just doesn't. It also doesn't trigger any units to attack him either, as though he didn't do anything really.

I thought about the TempDest being too common as well but I made an empty version of my map basically that only had that custom ability, triggers, and units, and it still was doing the same as the above.

I attached both my basically empty version of my map triggers here, as well as my actual map I am making (Please note that I am a BIG novice when it comes to triggers/scripts still. I can usually make them work but sometimes my custom triggers aren't the prettiest or neatest, and tbh I wouldn't be shocked if a few of them leaked. Just a heads up... 😅 so you can mock me if you wanna but please not too bad as I'm still trying to learn hehe.)

Edit: I hope I attached those right, LOL.
 

Attachments

  • EmeraldgardensMODDEDBYACOLITE.wtg
    121.4 KB · Views: 10
  • Fireform ability.wtg
    14.6 KB · Views: 9
Level 6
Joined
Dec 11, 2014
Messages
93
Imported the triggers and still don't have an issue casting.
Quite the pickle Id say, my last request is to upload your map to see if its truly your map causing the issue.
If you are shy you can dm it to me directly.
Really?! O.O That really is so strange... I'm starting to wonder if my saved map somehow got corrupted? I did experience an issue when I saved it one time where all my imported files had to be reimported (but I downloaded this ability after the fact) but maybe whatever caused that just totally screwed up my map... Hm.

Here is the map. It's really just Emerald Gardens but I modified it for a few friends of mine. We grew up playing wc3 and wished we could customize it (we had no idea the world editor existed back then) and every so often when I learn more we play again and have such a blast. I wanted to really show them what I learned this time after years, even if I have a long way to go I've come a long way from where I started, too.
 

Attachments

  • (12)emeraldgardensMODDEDBYACOLITE.w3x
    69.5 MB · Views: 9
Level 24
Joined
Feb 9, 2009
Messages
1,787
Holy guac I figured it out...
1654745120917.png

The condition as pointed above uses the reference to the variable TempPoint which is not present at the start of the loop, but strangely still works in a normal map for some reason I can't point to just yet.
Must of been an oversight on the spell creator's part, I've done too many of these kinds of things :S


1654745293184.png

Works after the changes above!
 
Level 6
Joined
Dec 11, 2014
Messages
93
Holy guac I figured it out...
View attachment 401042
The condition as pointed above uses the reference to the variable TempPoint which is not present at the start of the loop, but strangely still works in a normal map for some reason I can't point to just yet.
Must of been an oversight on the spell creator's part, I've done too many of these kinds of things :S


View attachment 401043
Works after the changes above!
My absolute HERO!!! Thank you so much for finding out what was wrong, and I'm extra excited that it wasn't me making a rookie error this time that caused the problem! Did the change you attached above and now it works like a charm <3 <3 <3 You are amazing. Can't wait for my friend (Who is obsessed with Dragons) to see my Alexstrasza hero I have planned for her.

Thank you so so so much for your patience and guidance in getting this issue resolved!!!!!! You are the best!
 
Level 20
Joined
Feb 27, 2019
Messages
593
The condition as pointed above uses the reference to the variable TempPoint which is not present at the start of the loop, but strangely still works in a normal map for some reason I can't point to just yet.
Funny words considering the subject XD
The game sure can point to nothing though. It interprets referenced null points as 0.00, 0.00.
 
Level 24
Joined
Feb 9, 2009
Messages
1,787
The game sure can point to nothing though. It interprets referenced null points as 0.00, 0.00.
I'm more confused at the fact that the test map and an empty map can allow the spell to work just fine but the moment it leaves that it no longer functions

Funny words considering the subject XD
You know to much...
1621389583206.jpg
 
Level 39
Joined
Feb 27, 2007
Messages
5,031
I'm not convinced this is actually the culprit here but I found another issue and it COULD cause an instance of the spell to end early. In the cleanup branch of the if-tree in the periodic trigger there are these lines:

  • Custom script: call DestroyGroup(udg_FF_DamagedUnits[udg_FF_Current_Index])
  • Custom script: set udg_FF_DamagedUnits[udg_FF_Current_Index] = null
  • Set VariableSet FF_Angle[FF_Current_Index] = FF_Angle[FF_Max_Index]
  • Set VariableSet FF_Caster[FF_Current_Index] = FF_Caster[FF_Max_Index]
  • Set VariableSet FF_Level[FF_Current_Index] = FF_Level[FF_Max_Index]
  • Set VariableSet FF_Velo[FF_Current_Index] = FF_Velo[FF_Max_Index]
  • -------- ERROR BELOW --------
  • Set VariableSet FF_ReachedDist[FF_Current_Index] = 0.00
  • -------- ERROR ABOVE --------
  • Set VariableSet FF_Distance[FF_Current_Index] = FF_Distance[FF_Max_Index]
  • Set VariableSet FF_Current_Index = (FF_Current_Index - 1)
  • Set VariableSet FF_Max_Index = (FF_Max_Index - 1)
Basically, the traveled distance of any instance beyond the first is not properly being kept track of, and it's possible to reset the distance to get a longer dash out of the spell or end it prematurely. This is truly because ReachedDist is not set = 0 when the spell starts, as it should be. Should be as follows:
  • Set VariableSet FF_ReachedDist[FF_Current_Index] = FF_ReachedDist[FF_MAX_Index]
  • -------- Loop above, Cast below --------
  • Set VariableSet FF_ReachedDist[FF_Max_Index] = 0.00
 
Level 24
Joined
Feb 9, 2009
Messages
1,787
Aha!
This little stinker of a condition is the culprit!
  • (Terrain pathing at TempPoint of type Walkability is off) Equal to True
It works in normal maps because the center of the map is walkable.
But in OP's map the center has doodads and is unwalkable and ends the spell.
Recreated it by placing some void in the center of a different map.

I'm not convinced this is actually the culprit here but I found another issue and it COULD cause an instance of the spell to end early. In the cleanup branch of the if-tree in the periodic trigger there are these lines:

  • Custom script: call DestroyGroup(udg_FF_DamagedUnits[udg_FF_Current_Index])
  • Custom script: set udg_FF_DamagedUnits[udg_FF_Current_Index] = null
  • Set VariableSet FF_Angle[FF_Current_Index] = FF_Angle[FF_Max_Index]
  • Set VariableSet FF_Caster[FF_Current_Index] = FF_Caster[FF_Max_Index]
  • Set VariableSet FF_Level[FF_Current_Index] = FF_Level[FF_Max_Index]
  • Set VariableSet FF_Velo[FF_Current_Index] = FF_Velo[FF_Max_Index]
  • -------- ERROR BELOW --------
  • Set VariableSet FF_ReachedDist[FF_Current_Index] = 0.00
  • -------- ERROR ABOVE --------
  • Set VariableSet FF_Distance[FF_Current_Index] = FF_Distance[FF_Max_Index]
  • Set VariableSet FF_Current_Index = (FF_Current_Index - 1)
  • Set VariableSet FF_Max_Index = (FF_Max_Index - 1)
Basically, the traveled distance of any instance beyond the first is not properly being kept track of, and it's possible to reset the distance to get a longer dash out of the spell or end it prematurely. This is truly because ReachedDist is not set = 0 when the spell starts, as it should be. Should be as follows:
  • Set VariableSet FF_ReachedDist[FF_Current_Index] = FF_ReachedDist[FF_MAX_Index]
  • -------- Loop above, Cast below --------
  • Set VariableSet FF_ReachedDist[FF_Max_Index] = 0.00
Wow I need to get my eyes check, missed that glaring issue.
 
Level 6
Joined
Dec 11, 2014
Messages
93
Aha!
This little stinker of a condition is the culprit!
  • (Terrain pathing at TempPoint of type Walkability is off) Equal to True
It works in normal maps because the center of the map is walkable.
But in OP's map the center has doodads and is unwalkable and ends the spell.
Recreated it by placing some void in the center of a different map.


Wow I need to get my eyes check, missed that glaring issue.
Oooh! So that's why it would work in an empty map. Makes sense!!! Good Sleuthing, to both of you!
 
Status
Not open for further replies.
Top