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

Spell Request

Status
Not open for further replies.
Level 19
Joined
Jun 16, 2007
Messages
1,574
Hello, i'm currently requesting a spell i need for my project, and it will also come in handle for other maps.

What type of trigger am i after ?
I wish for the spell to be either in Vjass or Jass.

I'm just after either one or both of the following spells:
Descriptions:
Flamethrower 1:
The first flamethrower, will be fired forwards which will stop at 700range exactly, and it must damage any units which it comes into contact.
(So damage over time, not instantly)

Framethower 2:
This flamethrower spell will be fired from a 140Degree's angle, and will be moved right moving at a reasonable speed towards a 40 Degree's angle. The caster will face 140degree's and move with the flamethrower effect, to 40degree's as well.

(Same as above, damages over time, not instantly)

First Spell will be a straight Line being fired forward
Second Spell will be doing this : ( but rotated right
Damage: Main Attribrute x 2
Cooldowns: Doesn't really matter i will do this ingame
Levels: Doesn't really matter i will do this ingame
Flamethrower Effect: Doesn't really matter as long as it looks like a proper flamethrower
Damage Style: The way i say "Damage over time, i mean as in each time the effect (Dummy) comes into contact with the unit will cause damage, because the dummys will keep moving fowards and being removed so it gives a more realistic effect.
Spell Durations: Set the duration to what you think is reasonable, so roughly 10 to 30seconds ?
Spell Type: These spells will be channeling, since the caster will be creating the flamethrower either from their gun or mouth (since my project is a dbz map)

The First spell will be Target based spell
The Second spell will be instant
Destroy Destructibles: Yes


What will you benefit from this ?
You will be given credits in my project, and as well you will help provide two spells which will be useful for other map designers, also i will give reputation.

Thank you for your time.
 
Last edited:
Level 14
Joined
Nov 18, 2007
Messages
1,084
I want to make some things clear:
  1. Are both spells line-type spells?
  2. By damaging over time, do you mean you want the spell to leave a buff on the unit it comes into contact with? Or do you mean that the flamethrower will deal damage to any nearby enemy units periodically?
  3. What exactly does the second spell do? Where is it coming from? The caster?
  4. Any preferred visual art?
 
Level 19
Joined
Jun 16, 2007
Messages
1,574
Here's an reference image for the 2nd one, with the degrees angles

degrees-360.gif

Starts from 140 and moves right to 40

Lets say the caster is in the center of the Degrees section.
So the Flame will start at 140, and end at 40.

Flamethrower 1 has been done to what i requested but can you make the flamethrower link a tad more so it doesn't look like it breaks off from each other ?

Edit: Also forgot to add this at first post:

Destroy Destructibles: Yes
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
Sorry, I still don't completely understand what kind of effect you want. D:
I made a picture of what I think you want:
attachment.php

C is the caster's position.
700 represents the distance the flames travel in the 140 degrees direction.
The orange represents the flame's path.
 

Attachments

  • WhatYouWant.PNG
    WhatYouWant.PNG
    16.2 KB · Views: 123
Level 19
Joined
Jun 16, 2007
Messages
1,574
Thats exactly what i want, So whatever position the caster is facing it will fire the flamethrower at its facing position and create that shape,

Also i want it too shoot the flamethrower forwards and make the line move right so it looks like he's controlling the flamethrower and swinging it.
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
Let's hope I got it correct this time.

Note I have two variations of Flamethrower 2. The first sticks with what you wanted by having the caster face 140 degrees then slowly rotating to 40 degrees. The second variation allows the caster to face anything and slowly rotates him by ROTATE_ANGLE degrees.

I also made the spells require my own custom library which is basically this:
JASS:
// KillTreesInRect by watermelon_1234
library KillTreesInRect requires DestructableLib
    globals    
        private rect TempRect = Rect(0,0,0,0)
    endglobals
    
    private function KillTrees takes nothing returns boolean
        if IsDestructableTree(GetFilterDestructable()) and not IsDestructableDead(GetFilterDestructable()) then
            call KillDestructable(GetFilterDestructable())
        endif
        return false
    endfunction
    
    function KillTreesInRect takes real x, real y, real radius returns nothing
        call SetRect(TempRect,x-radius,y-radius,x+radius,y+radius)
        call EnumDestructablesInRect(TempRect,Filter(function KillTrees),null)
    endfunction
endlibrary
 

Attachments

  • Flamethrower.w3x
    100.9 KB · Views: 56
Level 19
Joined
Jun 16, 2007
Messages
1,574
Ok Thank you, going to test it out now,

Thank you Flamethrower2var2 is exactly what i wanted, and also thank you making it do damage by "int*2", and also by allowing to destroy destructibles.

My request is done, and also do you have any tutorails which allow me to learn how to tweak other spells into changing them into int*2 based spells because i've found a few jass script spells which i need tweaking, this will be very useful for me, and also to make it destroy destructibles.

Thank you in advance,
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
There's no real tutorial for doing this since everyone can code their spells differently. However, there are some things that are easier to do depending on the way the spell is coded.

For me, I find it easier to do if the coder had made their damage customizable by function and if they left some comments in the spell code (which I didn't really do with your spell).
Basically, what I would do nest is add a parameter to the function like integer stat. Then I would search for the function's name with Ctrl + F and edit that function to include the extra parameter. It shouldn't be too difficult with basic Jass editing especially if the damage has level support (since there might be a reference to the caster which you can use), but spell code can vary.

Oops, I just saw destructables and made it kill trees instead. :p
Here's an alternate version of that function:

JASS:
// KillDestructablesInRect by watermelon_1234
library KillDestructablesInRect
    globals    
        private rect TempRect = Rect(0,0,0,0)
    endglobals
    
    private function KillDestructable takes nothing returns boolean
        if GetWidgetLife(GetFilterDestructable()) > 0.405 then
            call KillDestructable(GetFilterDestructable())
        endif
        return false
    endfunction
    
    function KillDestructablesInRect takes real x, real y, real radius returns nothing
        call SetRect(TempRect,x-radius,y-radius,x+radius,y+radius)
        call EnumDestructablesInRect(TempRect,Filter(function KillDestructable),null)
    endfunction
endlibrary
Just replace KillTreesInRect with KillDestructablesInRect.
 
Status
Not open for further replies.
Top