• 🏆 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 Attack Engine

Status
Not open for further replies.
Ty, Will check it out tell ya how it works out.

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

Ok... I like the Damage System but when I try to put it into my map it comes up with alot of errors.

I try it on regular editor and it doesnt do anything, big surprise.
I try it on Unlimited and it has errors.
And when I try it on NewGen it just buggs out and says something about hexidecimal memory slots whenever people attack.

How do I fix this?

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

Ok on the newgen I got it working but the triggers were disabled.
When I enabled them they said they Must have an init function called whatever
When I test it it goes to the main screen, Why isnt it working? Why does it work in the other map but not mine?

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

Now Im just confused. I load the trigs into another map and they work fine. What is going on!?!

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

Ok... Now I load it back into my map and it says it works. Then when I test it it pops back to main screen instead of loading game. When I load it from Warcraft I hit start game, the windows go up, then go back down.

---------




Ok ignore all that up there. Those arent really what I needed, they are close but not quite. I need a way of detecting when someone wants to attack, Stopping the damage of the attack, Then add in my own numbers. I also need a way for the triggers to find how much damage he wanted to do to his target.
 
Last edited:
Big_Dub, those systems do exactly what you want.
However, to run them, you must open them with JAGP latest version 5a.
Also, you have to check the vJAss compilator and debugger, you have to enable them.
Enabling Hrimoire and w3error will also be good. You obviously don'r have all functions you need on.
Also, using WEU is useless now, the JNGP has a new function called UMWE which is WEU adapted to the new JNGP maps.

You should also try the example of the maps. They stop the damage and do the damage you want and they can consider armor or not.
For more information you really should post for help the systems creator page.

Now, I can't help you much more. If you want to really create your system you will need to know how to create libraries, and vJAss will be your biggest ally in doing so.

http://wc3campaigns.net/vexorian/jasshelpermanual.html#lib

This link shall teach you most of what you need.
You really shouldn't quit.
 
Level 9
Joined
Mar 25, 2005
Messages
252
Ok... Now I load it back into my map and it says it works. Then when I test it it pops back to main screen instead of loading game. When I load it from Warcraft I hit start game, the windows go up, then go back down.

JNPG has a habit of doing that unless it has succesfully checked the map's scripts' syntax and run JassHelper on it. To do that you have to just save your map, atleast in theory. For me it often fails for one reason or another and when that happens I just try to save it again, sometimes with a different name, sometimes into a new folder and sometimes just as it is. You will notice when the map is succesfully JassHelpered and syntax checked when you see the word "JassHelper" above the loading bar that pops up whenever you save your map.

I need a way of detecting when someone wants to attack, Stopping the damage of the attack, Then add in my own numbers.

Unless I'm completely mistaken, the easiest way to do that is with grim001's Damage Detection actually, because it has some built in damage mod in it.
 
Unless I'm completely mistaken, the easiest way to do that is with grim001's Damage Detection actually, because it has some built in damage mod in it.

You are mistaken my friend, I made grim001's damage system get dispatched to the wc3grave and cleaned up.

I believe he is working on a new system, which no1 knows when it will be ready.
Still the systems i pointed can help ... as long as he understands them
 
Level 9
Joined
Mar 25, 2005
Messages
252
You are mistaken my friend, I made grim001's damage system get dispatched to the wc3grave and cleaned up.

The reason why it is in the graveyard:
grim001 @ wc3c said:
I recommend not using this system because it will soon be replaced by a new, very different, much more powerful system. The new one will also have better examples and documentation. I have stopped developing or supporting this version.

In other words I was not mistaken.
 
LOL, Disciple of life please read the comment I made in my previous post:
I believe he is working on a new system, which no1 knows when it will be ready.
Still the systems i pointed can help ... as long as he understands them

Which agrees with your post, I already told you what he was doing ... there was no need for you to post that, and btw, there is no damage system made by grim001 right now, so you are wrong =). (I mean there is one, but he advices people not to use it)

Anyway, This is not about who is right or wrong, is about helping Big_Dub.
I already gave him a suggestion to look to the tutorial.

It is obvious you are experienced in this matter Disciple, have some suggestion for an upcoming system maybe ?
 
Level 9
Joined
Mar 25, 2005
Messages
252
My point was that since grim001's DD was graveyarded for the reason that there will be a better one and not because there is one right now, it doesn't mean that it isn't the best one out there at the current moment.

Thus I continue to disagree with you :)

but anyways if grim001 actually does make a new one soon it might be a better idea to wait for it instead, but in the mean time I see no reason to prefer Rising_Dusk's Intuitive DD or anything else over grim001's current DD just because the latter is graveyarded.
 
JNPG has a habit of doing that...you have to just save your map, atleast in theory... You will notice when the map is succesfully JassHelpered and syntax checked when you see the word "JassHelper" above the loading bar that pops up whenever you save your map.

Ok that seemed to work, I dont know why, but saving the map again and testing it right afterward worked. Now I just need to edit the engine and change the numbers to what I want. Pheonix that stuff you told me is REALLY complicated I only get about 3/4 of what you say, I dont think I am ready for that yet. I will try to get it workin, Thanks for the help. Will post back in a while.

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

Ok, I have it working, for now, and I made my function to calculate the damage based on what level of 'Technique' they have, but when I save my map it finds one error in my code.
It says its a syntax

Here is the function
::

updated look down
::

For some reason it isnt indenting, Please excuse this.

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

Ok I changed the script a little bit, and it says the first if statement I have in my code is syntax so I guess I need to learn how to compare values. Will be lookin but if anyone can post something.

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

Apparently I needed the 'then' after each if statement, also Jass is not like C++ and does not know what +=, -=, *=, and /= means... but it isnt finding any errors so Im going to try it out.

----------------------------
JASS:
function CalcHit takes unit A, unit D, real dmg returns real
    local integer Alvl = GetUnitAbilityLevelSwapped('A000', A)
    local integer Dlvl = GetUnitAbilityLevelSwapped('A000', D)
    local integer Arol = ((GetRandomInt(1, 10) + Alvl)*5)
    local integer Drol = ((GetRandomInt(1, 10) + Dlvl)*5)
    local texttag ae = CreateTextTag()
    local texttag de = CreateTextTag()
    if (Alvl > 0)then
    if (Arol <= (30-(Alvl*2))) then
       set dmg = 0
       call SetTextTagText(ae,"Miss!", 0.024)
       call SetTextTagPos(ae, GetUnitX(A), GetUnitY(A), 0.00)
       call SetTextTagColor(ae, 255, 0, 0, 255)
       call SetTextTagVelocity(ae, 0, 0.04)
       call SetTextTagVisibility(ae, true)
       call SetTextTagFadepoint(ae, 2)
       call SetTextTagLifespan(ae, 5)
       call SetTextTagPermanent(ae, false)
    endif
    if (Arol >= (100-Alvl)) then
       set dmg = dmg*2
       call SetTextTagText(ae,"Crit!", 0.024)
       call SetTextTagPos(ae, GetUnitX(A), GetUnitY(A), 0.00)
       call SetTextTagColor(ae, 255, 0, 0, 255)
       call SetTextTagVelocity(ae, 0, 0.04)
       call SetTextTagVisibility(ae, true)
       call SetTextTagFadepoint(ae, 2)
       call SetTextTagLifespan(ae, 5)
       call SetTextTagPermanent(ae, false)
    endif
    endif
    if (Dlvl > 0) then
    if (Drol <= (30+(Dlvl*2))) then
       set dmg = dmg*0.5
       call SetTextTagText(de,"Block!", 0.024)
       call SetTextTagPos(de, GetUnitX(D), GetUnitY(D), 0.00)
       call SetTextTagColor(de, 0, 0, 255, 255)
       call SetTextTagVelocity(de, 0, 0.04)
       call SetTextTagVisibility(de, true)
       call SetTextTagFadepoint(de, 2)
       call SetTextTagLifespan(de, 5)
       call SetTextTagPermanent(de, false)
    endif
    if (Drol >= (100-Dlvl)) then
       set dmg = 0
       call SetTextTagText(de,"Dodge!", 0.024)
       call SetTextTagPos(de, GetUnitX(D), GetUnitY(D), 0.00)
       call SetTextTagColor(de, 0, 0, 255, 255)
       call SetTextTagVelocity(de, 0, 0.04)
       call SetTextTagVisibility(de, true)
       call SetTextTagFadepoint(de, 2)
       call SetTextTagLifespan(de, 5)
       call SetTextTagPermanent(de, false)
    endif
    endif
    set ae = null
    set de = null
    set A = null
    set D = null
    return dmg
endfunction

Ok, this is getting annoying
It should work but it wont...
In the function that actually does the damage I added this line

JASS:
    set damage = CalcHit(source, target, damage)

Basically I need to know why this code, closer shorter one, is not doing anything.

=============

Ok now I am just confused

In the code where it does the damage I replaced the variable that does the damage with a call for my function and it still pretends it doesnt exist!
 
Last edited:
Status
Not open for further replies.
Top