System Main Attribute Control

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
JASS:
// With some function, this system allow you to manipulate the main attribute, you can
// change it when you want and for what you need.


This is deceptive - it led me to believe this system could change the main attribute of the hero (ie. str -> int).
 

luorax

Invasion in Duskwood
Reaction score
67
No, that's impossible - the only way I can imagine is "Chaos" and three different unit type per hero. But that'd be a lot of work (especially if you want to modify a stat, or something like that), and would mess up a lot of things.

This system is made to handle the main attributes of heroes (and to detect it, because Blizzard did not give us a native to get a unit's primary attribute); to be honest personally I don't find this that useful as each well coded map (where the user knows how to use vJASS properly) will have some sort of struct for unit/hero types in which the user can store the primary attributes.
 

Laiev

Hey Listen!!
Reaction score
188
I'm running into problems with this system.

When I register a unit to this system, it creates 6 Tauren Chieftain ('Otch') units at a spot on my map. :confused:


I also noticed a couple of things:

Shouldn't

JASS:

library MAC requires AIDS


be =>

JASS:

library MAC requires AIDS, TimerUtils


??

Also,

JASS:

// ~ Importing ~
//
// To import this System you'll need:
// - Chaos Ability MAC (Ability used to morph the heroes.)
// - Dummy MAC (Unit used to take damage.)
// - Chaos MAC (Unit used to be morphed.)
//
// Then you'll need to copy the AIDS and Key Timer 2 if you don't have it yet.
// Copy this Trigger to your map and configure it below to your map.
//


This says I need Key Timer 2? I thought the system was using TimerUtils.

Anyway, I want to use this system, it looks awesome. But I don't want 6 random tauren heroes on my map.

I just forget to change the doc and the requirements |:

about the 'bugs'

Did you copy all the abilities and units?

The only reason to apper the tauren to you is that you forget to copy the Chaos ability that morph the hero to an unit without model


Updated to fix the problems at doc and requirement
 

tommerbob

Minecraft. :D
Reaction score
110
When I disable the system, it works perfect. No weird taurens show up on my map.

Then I enable it, and I don't even register a unit or anything, just enable it, and when I load the map 6 tauren heroes show up.

I directly copied over the Chaos ability and the 2 dummy units from the test map, and input the exact same Unit Id's.
 

Laiev

Hey Listen!!
Reaction score
188
The system has no relation with any tauren Oo'

Make sure to set the rawcodes to the right after copy and paste the objects


If you still see the tauren, can you make a demo with the problem?


The system itself don't use taurens :S
 

tommerbob

Minecraft. :D
Reaction score
110
Okay, I've created a demo map with my problem.

I did nothing but install the system into the map following your instructions. I didn't register a unit or anything. But my problem persists. I preplaced a Paladin on the map, and 3 Paladins are created. I then removed the preplaced paladin on the map, and 3 paladins are NOT created. I did nothing else.

Map is attached.
 

Attachments

  • MAC test.w3x
    44.8 KB · Views: 364

Laiev

Hey Listen!!
Reaction score
188
I'm without Warcraft, but when I get it, I'll check this...

The only reason to that happen is that you forget to copy the custom ability Chaos and/or configure the Rawcode in the system.


The system automatic register units like AIDS, preplaced and entering units.
 

luorax

Invasion in Duskwood
Reaction score
67
The problem is with your TimerUtils. I don't know why, but your TimerUtils terminates the thread the dummy units get their timed life.

Check my attached map, use that TimerUtils. (Mine is orange, yours was blue - but changing yours to orange did not even help, it only got to work after changing it to red)
 

tommerbob

Minecraft. :D
Reaction score
110
The problem is with your TimerUtils. I don't know why, but your TimerUtils terminates the thread the dummy units get their timed life.

Check my attached map, use that TimerUtils. (Mine is orange, yours was blue - but changing yours to orange did not even help, it only got to work after changing it to red)

Yeah that TimerUtils in your map only works when I changed it to Orange or Red. It does not work with Blue at all.

Edit: I changed my original TimerUtils in my map (not yours) to Orange, and it works. But this is not a solution I like. :*( Unless you can convince me to use Orange in my map, cause I'm using blue for safety.
 

luorax

Invasion in Duskwood
Reaction score
67
Well, on the test map changing yours to Orange did not help.
But actually I don't see a reason to not use Orange. It's safe and fast; and also, I never used Blue. I don't see a reason to not use it.
 

Bribe

vJass errors are legion
Reaction score
67
Why is this using its own hashing? Hashtables are way more efficient than your looping-through-JASS method. And cleaner...
 

Laiev

Hey Listen!!
Reaction score
188
because I don't want to use a hashtable just for this?


I don't care much about fastest way to do things, and I really don't want to reduce the limit of hashtable in one map just for this...
 

Sevion

The DIY Ninja
Reaction score
424
To be honest, 255 hashtables is more than enough for any map :|

And if you use even 100 then you're doing something wrong.

Don't worry about the hashtable limit.
 

Laiev

Hey Listen!!
Reaction score
188
It's an idea

To be honest, 255 hashtables is more than enough for any map :|

And if you use even 100 then you're doing something wrong.

Don't worry about the hashtable limit.
Some people just download spells and spells and really don't care about the code, in gui, some spells create hashtable just for that spell...

I see some friends doing this |:


PS: also I'm still without wc3... and Hash function is approved here
 

Bribe

vJass errors are legion
Reaction score
67
Hash function is approved here so that return bug users can have some hashing. It's otherwise bad.
 
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