Doom Angel's Question Thread

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
but acehart said that they all can take up to the same amount of index
Other than that, all arrays have the same maximum number of elements: 8192.
Regardless of size.
so i guess that's not just the index...
 

Chocobo

White-Flower
Reaction score
409
but acehart said that they all can take up to the same amount of index

so i guess that's not just the index...

The index starts from 0, it the maximal index is 8191.

Choosing between 1,50 or 100? It's for map init. When you give it a pre-defined value, it will loop between 0 and the size you put. Example :

MyVar Size = 100
MyVar Value = 3

MyVar[0] = 3
MyVar[1] = 3
MyVar[2] = 3
MyVar[3] = 3
MyVar[4] = 3
MyVar[5] = 3
MyVar[6] = 3
MyVar[7] = 3
MyVar[8] = 3
MyVar[9] = 3
MyVar[10] = 3
...
MyVar[93] = 3
MyVar[94] = 3
MyVar[95] = 3
MyVar[96] = 3
MyVar[97] = 3
MyVar[98] = 3
MyVar[99] = 3
MyVar[100] = 3
MyVar[101] = 0

It stops at 101.

If you put a size to 0, it does :

MyVar[0] = 3
MyVar[1] = 0
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
so basically what u are saying is that if i have 1 i can use the value up to 8191 arrays but basically from 100 and above it the value i put inside it will not be saved unless i will increase the size of it am i getting it right?

any1 wanna make some tut about it? :p
 

Chocobo

White-Flower
Reaction score
409
so basically what u are saying is that if i have 1 i can use the value up to 8191 arrays but basically from 100 and above it the value i put inside it will not be saved unless i will increase the size of it am i getting it right?

any1 wanna make some tut about it? :p

Ignore the Size, it only applies to predefined Values, that's all.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
so it doesn't realy matter and i can just put all my variables to 1?

Predefined is the ones that are defined at map init?
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
oh i think i get it so basically it only affect it by the deafult value means that i can set deafult value for only up to 100 arrays in the map init and the rest of it i must set using set variable actions, did i get it right?
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
k i got new question:
is it possible to put item on some unit and make it affect on other unit?
(e.g: Claws on peasant but it add +3 attack to paladin)
 
M

Mythic Fr0st

Guest
Yes it is,

WEU has a feature to add "Bonus" Damage or Subtract it, same with armor, not sure if you can do it in simple jass without WEU,

But yea

You'd store the main hero into a unit array, then add the bonuses, to that Unit Array, and the hero would get the effects, and same for armor, however, you'd have to make a trigger for both "Acquiring the Item" and "Loosing" the item, if you get WEU I can show you how to do it all in one simple trigger for adding the bonuses, and 2 small triggers for acquiring the item / losing the item
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
WEU has a feature to add "Bonus" Damage or Subtract it, same with armor, not sure if you can do it in simple jass without WEU,
WEU is basically Jass based actions which became GUI

You'd store the main hero into a unit array, then add the bonuses, to that Unit Array, and the hero would get the effects, and same for armor, however, you'd have to make a trigger for both "Acquiring the Item" and "Loosing" the item, if you get WEU I can show you how to do it all in one simple trigger for adding the bonuses, and 2 small triggers for acquiring the item / losing the item
but i can do something like add bonus of current item right?
cuz if im gonna add bonus for each item using trigger this will take years...
 
M

Mythic Fr0st

Guest
I dont know what you mean, but you'd do this

Variables:
Weapons, item type, array 1
Weapon_Bonus, integer, array 1
Hero, unit, array 1 (Which is set to all your heroes)
Weapon_Index, integer, no array
PN, integer, no array

Code:
    Events
        Map Initilization
    Conditions
    Actions
        Set Weapon[0] = Claws Of Attack + 15
        Set Weapon_Bonus[0] = 15
        Set Weapon[1] = Rabbit Fangs + 20
        Set Weapon_Bonus[1] = 20
        Weapon_Index = 1 //Set to the highest index of them all

Code:
    Events
        A unit looses an item
    Conditions
    Actions
        Set PN = Player number of owner of triggering unit
        For each Integer A from 0 to Weapon_Index do MULTIPLE Actions
            Loop - Actions
                If / Then / Else, Multiple Functions
                    If - Conditions
                        Item Type of Item being manipulated equal to Weapon[Integer A]
                    Then - Actions
                        Advanced - Subtract Weapon_Bonus[Integer A] Damage from Hero[PN]

Same thing for acquiring, except u change event, and "Add" Weapon_Bonus[Integer A]

And WEU has actions that normal WE doesn't (In jass)
It has a list of functions made up (You can make your own functions in jass)
 

Chocobo

White-Flower
Reaction score
409
WEU is basically Jass based actions which became GUI


but i can do something like add bonus of current item right?
cuz if im gonna add bonus for each item using trigger this will take years...

WEU = Adds 336 variables, 9271 lines of script, .. and many things you won't use.

Remember, the max level of upgrades used by WEU for Advanced Upgrades thing if I remember is 4095. You go over? It's over for the upgrade, it sticks at 4095.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
I dont know what you mean, but you'd do this
doing that is execly what i rather not having it will take too much time and triggers for all of the items besides that's only for atk what about mana regeneration, hp , attrib bonus and more....
is it possible to add all of them?
 

Master

Thou shall be helped by...The Black Adder!
Reaction score
72
k i got new question:
is it possible to put item on some unit and make it affect on other unit?
(e.g: Claws on peasant but it add +3 attack to paladin)
Replace item with a same one but with enchanged stats when carried by a specific unit?

P.S: How could a Peasant...hold an item by default? :eek:
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
Replace item with a same one but with enchanged stats when carried by a specific unit?
just simply make item affect on a unit without carrying it (i don't realy care who holds it as long as it gives what i need)
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
yea it was just an example but bassically even putting this item at the end of the map just how can i make it affect the unit even if it's not holding it?
 

Master

Thou shall be helped by...The Black Adder!
Reaction score
72
Add a Hero/Unit ability you made, identical with the item's abilities to the Unit :)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      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