Please Help -- I cannot do Jass and I need a Jass Script for Modifying Creep Stats

K

Kevin

Guest
http://www.wc3campaigns.net/showthread.php?p=814522#post814522

This is a thread where I just basically flipped out, but it explains exactly what I am looking for.

I cannot do jass, if anyone here can provide me with the scripting I need then I would be very grateful.

Now, here's the condensed version of what I need, and don't worry about me giving credit in my map I always give credit to people who help.



I need a script I can run inside a trigger that goes off when a unit enters the playable map area-- condition: the unit is not a hero.

This script would then make the unit's:

Damage = to maxdamage variable
Defense/armor = to maxdefense variable
Level = to maxlevel variable

Now I can modify the unit's life without the need for a script, but I might as well do it in the same script.


That's all I need. I just need that simple script with instructions on how to stick it in my trigger and I am very happy. :D
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
No need to flame anyone, even if he isn't a member of this forum.

Working from the triggers you have at wc3c.
But I suggest that you add a condition to make sure that the attacked or attacking unit is a hero ^^. Also the agility ect of a hero isn't very likely to change just because a unit is attacked.

Anyway, first you have to implement the Bonus Mod, it is described there how you should do that but feel free to ask if there is something you don't understand.
It's extremely boring to implement the bonus mod so be prepared for that.

After that I suggest that you set all creeps armor to 0 , attack to something low like 1 - 4 and life to something low like 1.

Create a unit variable named Creep.

Then add this script at the lines below the bonus mod you added before.
Code:
function InitCreepBonus takes nothing returns nothing
   local unit u = udg_Creep
   call setBonus(udg_damagetemp, u, 0)
   call setBonus(udg_defensetemp, u, 1)
   call setBonus(udg_maxlife, u, 2)
   set u = null
endfunction
Note that this won't change the creep level, you can't manipulate that with jass code.

Example of creep spawning:
Code:
    Unit - Create 1 Furbolg Shaman for Neutral Hostile at spawnpoint facing Default building facing degrees
    Set Creep = (Last created unit)
    Custom script:   call ExecuteFunc("InitCreepBonus")

Remember to make a backup of your map before you start, also this is completely untested so there is a chance that it wont work on the first try ^^
 
K

Kevin

Guest
Yes, very sorry, I was just very upset with the guy.

Ok, thank you very much for helping, I will be more than happy to stick your name on the map as well.

Ok I will test it tonight, and try to see how that goes and give you a report on whether or not it works :D

While I agree that modifying the creature's armor and attack down to low numbers might normally be good, I want to leave them the same just to give a little bit more difficulty (especially considering the creatures won't be carrying items, but the heroes will). But, otherwise I will follow what you said.

tyvm :D
 
K

Kevin

Guest
:sighs:

ok I can't figure out how to implement these scripts into my map, I'll wait for my friend to get home and I'll bug him when he's on aim, see if he knows more about this. Unless you're willing to download my map and modify it, it looks like I'm a lost cause here for JASS because I'm just missing something.

I understand your script. I kinda understand BonusMod, I just don't understand how to import it and export it.

Also, it looks like Bonus mod increases in multiples of 2, so would I have to edit the numbers stored in my variables by dividing by 2 and subtracting 1?

My brain is just fried after looking at this for two hours. I just feel dumb.
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
You past all that script into the Custom Script part of your map, then you make the a integer array named BnsBit. Then save.
After that you have to make 40 abilities as descriped the script and change the 'XXXX' part in the script so it points to the right ability.
 
K

Kevin

Guest
Ok now I think know my problem then.

Where do I find the custom script portion of my map? What menu is it under? I can't find anything that says custom script except for a trigger that asks for something completely different.
 
K

Kevin

Guest
:sighs:

Man either I'm doing something wrong or there're some problems with BonusMod that WE just does not like.

" set u = null"
" call IntBonusMod(udg_BnsBit)"

At least you helped me though, I mean, at least I got this far.

Unless you want to take the time to look at the map I think I am going to go the route of setting it up as completely trigger operated neutral/hostile hero units and just forgoe the jass department entirely. This problem has just become so complex it might be better basing the creeps off of hero templates.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top