• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[JASS] Gost's Jass Questions - Continualy Updated

Status
Not open for further replies.
Alright I am making a spell where my hero throws a hammer and it keeps moving forward until it comes within range of a unit. But there seems to be something wrong with the timer or something, because each cast after the first one the hammer seems to move faster and faster =/. I can't figure out whats wrong with it lol.

The only 2 factors that come into it moving is the timer, and velocity. And I don't think there is anything wrong with either.

The map is attached, the detection of the spell cast and the system itself is in the hammer toss trigger. There is a GCU system in the map header aswell.

(Please do not redistribute or take anything from the map at this time =))

EDIT: The reason I attached the whole map is to make it easier for you to duplicate the bug, just cast the move a bunch of times and you will see. (And sometimes it seems if you cast a hammer, while another hammer is active, the 2nd one moves normal speed... or something like that o.O. just test it lol hard to explain.
 

Attachments

Gah so stupid, thanks yet again for the help. I feel bad for not being able to rep you more, but it insists I spread it around more =(.

EDIT: For some reason having this code:
JASS:
function SpawnFlagCenter takes nothing returns nothing
    call CreateItem('I000',GetUnitX(gg_unit_ncp3_0024),GetUnitY(gg_unit_ncp3_0024))
endfunction

function SpawnFlagBoth takes nothing returns nothing
    call CreateItem('I001',GetUnitX(gg_unit_ncop_0001),GetUnitY(gg_unit_ncop_0001))
    call CreateItem('I000',GetUnitX(gg_unit_h001_0000),GetUnitY(gg_unit_ncop_0000))
endfunction

Causes wc3 to, when creating the units that are preplaced, set gg_unit_ncop_0001 (or the other preplaced units mentioned in the code) equal to CreateUnit(). Normal it is u = CreateUnit and they make the units that way you know? What the heck causes this to happen lol? And it is only when I have that code.
 
Last edited:
Gah so stupid, thanks yet again for the help. I feel bad for not being able to rep you more, but it insists I spread it around more =(.

EDIT: For some reason having this code:
JASS:
function SpawnFlagCenter takes nothing returns nothing
    call CreateItem('I000',GetUnitX(gg_unit_ncp3_0024),GetUnitY(gg_unit_ncp3_0024))
endfunction

function SpawnFlagBoth takes nothing returns nothing
    call CreateItem('I001',GetUnitX(gg_unit_ncop_0001),GetUnitY(gg_unit_ncop_0001))
    call CreateItem('I000',GetUnitX(gg_unit_h001_0000),GetUnitY(gg_unit_ncop_0000))
endfunction

Causes wc3 to, when creating the units that are preplaced, set gg_unit_ncop_0001 (or the other preplaced units mentioned in the code) equal to CreateUnit(). Normal it is u = CreateUnit and they make the units that way you know? What the heck causes this to happen lol? And it is only when I have that code.
 
Ah, ok.

I made a custom stun system and every works perfectly the only problem is my timer for how long the stun should last starts right when I call the function to stun a unit, but in order to actually stun the unit I create a dummy and have it cast a storm bolt (99999 speed and no missile art) on the target. But I think there is still a delay between when I tell it to get stunned and when it actually gets stunned =/.

Is there any way around this? I was thinking of pausing the unit but idk, I want to see if there is a best way to do this before I go mucking my code up.
 
Would the delay always be a flat number? So that I could just tack that number onto the stun duration? Probably not, is there any downside to pausing a unit?
 
Alright onwards!

I am almost done with the gameplay code for my AoS and haven't made any spells yet that will be affected by this but I have been thinking about it. All of my spells that do damage will be coded so I will have no trouble 'detecting' that damage. But lets say I had an ability that when cast on an enemy hero all damage that hero did (through spells or auto-attack) over 5 seconds was dealt back to it.

How would I got detecting the damage he did with his autoattack =(? Because most systems have the add event thing, but doesn't that lag, especialy in an aos withs o many units. Or they use an orb (which I have never really looked into and am curious how they do that) but I dont want to fuck myself out of using all other orbs for abilities/items =/.
 
Status
Not open for further replies.
Back
Top