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

[JASS] Gost's Jass Questions - Continualy Updated

Status
Not open for further replies.
Level 10
Joined
Jan 21, 2007
Messages
576
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

  • Capture the Flag.w3x
    48.5 KB · Views: 35
Level 10
Joined
Jan 21, 2007
Messages
576
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:
Level 10
Joined
Jan 21, 2007
Messages
576
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.
 
Level 10
Joined
Jan 21, 2007
Messages
576
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.
 
Level 10
Joined
Jan 21, 2007
Messages
576
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?
 
Level 10
Joined
Jan 21, 2007
Messages
576
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.
Top