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

Help import JASS skill

Status
Not open for further replies.
Level 7
Joined
Jul 17, 2018
Messages
185
Hello everyone, someone who can help me on how to import this skill to my map is that it is very different from the others, I think it is because of this JASS or GUII

Divine Halo v2.1
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
It has instructions in the description. Follow these in this order:

1) Go to file then preferences and enable "automatically create unknown variables when pasting trigger data". If you've done this before you may not have to do it again.

2) To import this spell, open up the test map and copy over the dummy unit, the halo ability, the holy bolt ability, the holy bolt buff, and the Divine Halo trigger.

3) In your map go into Variables (Control + B) in the Trigger Editor and create all of these variables:
Create 1 timer array with size 1 called TimerUtils_timer
Create 1 integer called TimerUtils_int
Create 1 hashtable called TimerUtils_hash
Create 1 hashtable named DHash

4) In the Divine Halo trigger you want to set 'h000' to whatever your Dummy Unit's ID is. Do the same for 'A000' but set it to the Divine Halo ability ID.
vJASS:
//Divine Halo by Zaio
//These are right below the IMPORTING INSTRUCTIONS:
function DHCDID takes nothing returns integer
    return 'h000' // Change the h000 to your dummy units ID (Hold ctrl and press D on the unit in object editor)
endfunction

function DHCAID takes nothing returns integer
    return 'A000' // Change the A000 to your Divine Halo ability ID (Hold ctrl and press D on the ability in object editor)
endfunction
Note: Each ability/unit has it's own unique ID. So whenever you create a new ability or unit a new ID will be assigned to it. To view these ID's press "Control + D" in the Object Editor. The names of the Ability/Unit will change on the left side of the editor to something like A000, A001, A002, h000, etc... Also, Items/Destructibles/Doodads/Buffs/Upgrades have ID's too but we don't need to worry about that for this spell.

5) Last step. I noticed that the the dummy unit isn't setup correctly and will have a delay when casting spells.
To fix this, set the dummy unit's Art - Animation - Cast Backswing and Art - Animation - Cast Point to 0.
 
Last edited:
Level 7
Joined
Jul 17, 2018
Messages
185
It has instructions in the description. Follow these in this order:

1) Go to file then preferences and enable "automatically create unknown variables when pasting trigger data". If you've done this before you may not have to do it again.

2) To import this spell, open up the test map and copy over the dummy unit, the halo ability, the holy bolt ability, the holy bolt buff, and the Divine Halo trigger.

3) In your map, go into Variables (Control + B) in the Trigger Editor and create all of these variables:
Create 1 timer array with size 1 called TimerUtils_timer
Create 1 integer called TimerUtils_int
Create 1 hashtable called TimerUtils_hash
Create 1 hashtable named DHash

4) In the Divine Halo trigger you want to set 'h000' to whatever your Dummy Unit's ID is. Do the same for 'A000' but set it to the Divine Halo ability ID.
vJASS:
//Divine Halo by Zaio
//These are right below the IMPORTING INSTRUCTIONS:
function DHCDID takes nothing returns integer
    return 'h000' // Change the h000 to your dummy units ID (Hold ctrl and press D on the unit in object editor)
endfunction

function DHCAID takes nothing returns integer
    return 'A000' // Change the A000 to your Divine Halo ability ID (Hold ctrl and press D on the ability in object editor)
endfunction
Note: Each ability/unit has it's own unique ID. So whenever you create a new ability or unit a new ID will be assigned to it. To view these ID's press "Control + D" in the Object Editor. The names of the Ability/Unit will change on the left side of the editor to something like A000, A001, A002, h000, etc... Also, Items/Destructibles/Doodads/Buffs/Upgrades have ID's too in case you were wondering.

5) Last step. I noticed that the the dummy unit isn't setup correctly and will have a delay when casting spells.
To fix this, set the dummy unit's Art - Animation - Cast Backswing and Art - Animation - Cast Point to 0.

-Step # 5 I don't understand very well
-I managed to do it but it came out like this :(
 

Attachments

  • Error DivineHalo.png
    Error DivineHalo.png
    1.2 MB · Views: 97

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
In the Object Editor units have a field called "Art - Animation - Cast Backswing/Point" it's located at the top near Abilities. For your Dummy Unit set both of these fields to 0. Those two fields are used to control a units cast animations before and after the spell is cast. Setting them to 0 makes the spell cast instantly.

And I don't know why it turned out like that. Did you set everything up correctly? Make sure your dummy unit has Flying movement.
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
Well, I created a new map and imported the spell over and it worked just fine. However, I couldn't get it to work properly in your map. I think you have to update to the latest patch and/or make sure your map is on the latest patch. There's nothing else that I can think of other than it being the patch.
 
Level 7
Joined
Jul 17, 2018
Messages
185
1) I created the map with version 1.30.
2) My map never opened it in an earlier version.
3) I updated it, opened the game and it is slow, as if the FPS were low, the same for the editor.
 
Level 39
Joined
Feb 27, 2007
Messages
5,011
The error is simply with the height of the lightning effects not taking into account terrain height. I noticed this by scrolling the mouse wheel to change the camera angle and the lightning effects appeared to shift down below the caster even further. I've edited the spell code a small bit to work properly. Also if you are testing against the mud golems just south of your hero's location it won't shoot bolts at them because it checks for resistant skin/magic immunity, which mud golems have. Test on the trolls to the northwest and it will shoot at them correctly.

An explanation of the change I made can be found here: Divine Halo v2.1 or you can copy the spell code (and LocalZ library from the Custom Script section) from the attached version of your map where it is fixed. I did not notice the map to be laggy in 1.31 for me, so I'm not sure what you're experiencing. Perhaps you had the camera draw distance too far out?
 

Attachments

  • (8)Frio y Sangre.w3x
    21.4 MB · Views: 18

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
Just dawned on me. With the new 1.31 patch didn't we get options for the 32/64bit editors?

Quoting someone else:
In the Warcraft III folder (Program Files(x86), in my case) I saw 2 new Folders, you must have them I suppose (I don't know if this folders exists in the 1.30 version). They are: "x86" and "x86_64".
Due my PC being 64 bit, I used the last one (if you have 32, try the other folder). Inside they have also a .exe of Warcraft III and World Editor.

Try these editors out.
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
Did you try the fix that was posted in that link? Unfortunately, i'm not exactly sure what you mean in your last post :p

Are you saying that you fixed the editor but the game still runs slow?

Did you try this:

"For map making it is recommended to use the x86 World Editor as the x86-64 one has several well known bugs and stability problems."

-----------------------------------

Here is another possible solution:

It appears this may be an issue with older Intel graphics processors and DirectX 11. If you force DirectX 9 it should help resolve these low FPS issues.

Please try the steps below:
  1. Go to Your Warcraft 3 installation directory (C:\Program Files\Warcraft III\x86_64 is the default)
  2. Right Click Warcraft III.exe and create shortcut
  3. Right Click shortcut and select properties
  4. Add -graphicsapi Direct3D9 to the end of the target field
  5. Launch the client via the shortcut
This should resolve the FPS problems for now.
 
Last edited:
Level 7
Joined
Jul 17, 2018
Messages
185
@Uncle @Pyrogasm

IN THE END I SOLVED IT!, I tried all the advice they gave me and it didn't work, I reinstalled it and it was still the same...but this code you gave me -graphicsapi Direct3D9 got my attention, so I searched YouTube and found this :
you just need to add this -windowmodefullscreen. hahaha I thought it was my pc

Thank you very much to both of you, I was stressed hahaha.
PS: Uninstalling it was useless, bye-bye full campaign in hard mode. :,D
 
Status
Not open for further replies.
Top