Creep Respawn and Item tables?

BlightWarden

New Member
Reaction score
6
I need to know how to make a respawned creep continue to use the same item table it had before it died. So..

Creep A in Region A has custom item table A.

I need creep A in region A to once again have item table A when it respawns.

I need the solution if its a trigger, in basic WE form as I do not use anything aside from the basic world editor. If its not a trigger then a explaination on how to do it would be great, or atleast the locations of the solution.

Thanks for any and all replies.
 

BlightWarden

New Member
Reaction score
6
Heptameron post in this thread explains how to reuse the item tables: http://www.thehelper.net/forums/showthread.php?t=21047

I think it's easier to trigger the table yourself instead of relying on blizzards auto generated code.


Thanks! I guess I need to learn how to use Variables, Arrays and integer in the WE. I'v been trying to avoid them since I get a bit confused trying to read how to use them. The descriptions and Instructions are a bit... Robotic.

Thanks again!
 

BlightWarden

New Member
Reaction score
6
Ok, I need a path. I can't find this.


Random integer number between 1 and 100) Less than 51
// ...50 % chance to create one Mana Stone

How do I find random integer?

I think I figure out how to make variables, arrays and set values, but I can't find the right path to the above exsample. SO if I want to make a item table I need to know the path. Thanks for any and all replies.


[edit] Just incase I will detail what I want to do and maybe someone can explain the trigger step by step including pathing. I know a bit about making WE triggers, I don't use anything aside from standard WE so jass and all that is completely lost on me.

My custom item table has 5 items. a 60%, a 20%, a 14%, a 5% and a 1%. After a creep dies (initially placed on the map) and respawns, I want the same custom item table on that creep. OR I want to make a trigger that mimics the custom item table.

My variable info is as follows.

Variable name Variable type Initial value
set1itemtable Item Array [5] No Item

My set item value trigger as follows.

Set Item Value Trigger
Events
Conditions
Actions
Item - Set the custom value of Claws of Attack +15 0001 <gen> to 0
Item - Set the custom value of Crown of Kings +5 0002 <gen> to 1
Item - Set the custom value of Orb of Frost 0005 <gen> to 2
Item - Set the custom value of Kelen's Dagger of Escape 0003 <gen> to 3
Item - Set the custom value of Mask of Death 0004 <gen> to 4


So if I screwed up, as I believe I probably have, or will. Please let me know I screwed up and provide a solution. Walking me through this would be much appreciated. I only need to be shown once... I hope.

Thanks again.

[edit2]

I am using Laika's guide found here
http://www.thehelper.net/forums/showthread.php?t=20023

And phyrex1an's trigger found here as a guide
http://www.thehelper.net/forums/showthread.php?t=21047

So I am attempting to learn this without pestering the community, but its not working out.;)


[edit3] lol, Might have just figured it out. Its a math path. Will return if I figured it out or not.

[edit4] Ok, I do need the path to this -------- Less than 51
// ...50 % chance to create one Mana Stone.

I do not know how to find a way to make it identify percentages. Thanks for any help.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, that really isn't a Percentage Comparison, but an Integer Comparison ;)
In conditions, go to Integer Comparison -> Math - Random Number and set the values there to 1 and 100

Then click Ok and change the "Equal to" to "Less than or equal to" and change the last value to 50, and there you go ... you have a 50 % chance ;)
 

BlightWarden

New Member
Reaction score
6
Well, that really isn't a Percentage Comparison, but an Integer Comparison ;)
In conditions, go to Integer Comparison -> Math - Random Number and set the values there to 1 and 100

Then click Ok and change the "Equal to" to "Less than or equal to" and change the last value to 50, and there you go ... you have a 50 % chance ;)

Tyvm!!

A few more questions, if I may.

This is my trigger. Is it correct?

Trigger:
  • Set 1 Item Table Trigger
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Infernal
      • (test region 1 &lt;gen&gt; contains (Dying unit)) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than 51
        • Then - Actions
          • Item - Create Claws of Attack +15 at (Center of test region 1 &lt;gen&gt;)
          • Skip remaining actions
        • Else - Actions
          • Do nothing
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than 21
            • Then - Actions
              • Item - Create Crown of Kings +5 at (Center of test region 1 &lt;gen&gt;)
              • Skip remaining actions
            • Else - Actions
              • Do nothing
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random integer number between 1 and 100) Less than 15
                • Then - Actions
                  • Item - Create Kelen&#039;s Dagger of Escape at (Center of test region 1 &lt;gen&gt;)
                  • Skip remaining actions
                • Else - Actions
                  • Do nothing
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random integer number between 1 and 100) Less than 6
                    • Then - Actions
                      • Item - Create Mask of Death at (Center of test region 1 &lt;gen&gt;)
                      • Skip remaining actions
                    • Else - Actions
                      • Do nothing
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Random integer number between 1 and 100) Less than 2
                        • Then - Actions
                          • Item - Create Orb of Frost at (Center of test region 1 &lt;gen&gt;)
                          • Skip remaining actions
                        • Else - Actions
                          • Do nothing



question 2. When I first kill the creep, it drops two items. How can I fix it to where it only drops 1. It only drops 2 items the first time I kill it, then only 1 item at most after.

question 3. Sometimes no items drop, is this suppose to happen? I like the chance of not getting an item, but I'd like to know if its suppose to be like that or if its an error, if it is an error, how can I fix it?


Thanks for any and all replies.


PS: I have a regional condition in place so it will identify an individual creep from the others. If I have an infernal in test region 2 that dies, I don't want that to trigger this. Also so I can have multipul item tables for the same creep types.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Question 1. To start with, remove ALL "Do Nothing" actions, they do exactly as they say !!! (Which is nothing XD)

Question 3. Yes, since this only triggers when the random number is below 51 means that if it's above, nothing will happen ;)
 

BlightWarden

New Member
Reaction score
6
Question 1. To start with, remove ALL "Do Nothing" actions, they do exactly as they say !!! (Which is nothing XD)

Question 3. Yes, since this only triggers when the random number is below 51 means that if it's above, nothing will happen ;)

Thank YOU very much! You have been of great help! +++rep!:thup:

Now if I can just figure out how to make it only drop one item the first time I kill it. lol.

PS: Well, now I'v had my first taste of variables, Arrays and integers. Now its time to play around with them and see if I can't learn how to make my maps leak proof! 4-5+ years of world editing and I'm just now learning these functions!:eek::D


Revised Trigger as follows. Is this correct? Thanks.

Trigger:
  • Set 1 Item Table Trigger revised
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Infernal
      • (test region 1 &lt;gen&gt; contains (Dying unit)) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than 51
        • Then - Actions
          • Item - Create Claws of Attack +15 at (Center of test region 1 &lt;gen&gt;)
          • Skip remaining actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than 21
            • Then - Actions
              • Item - Create Crown of Kings +5 at (Center of test region 1 &lt;gen&gt;)
              • Skip remaining actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random integer number between 1 and 100) Less than 15
                • Then - Actions
                  • Item - Create Kelen&#039;s Dagger of Escape at (Center of test region 1 &lt;gen&gt;)
                  • Skip remaining actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random integer number between 1 and 100) Less than 6
                    • Then - Actions
                      • Item - Create Mask of Death at (Center of test region 1 &lt;gen&gt;)
                      • Skip remaining actions
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Random integer number between 1 and 100) Less than 2
                        • Then - Actions
                          • Item - Create Orb of Frost at (Center of test region 1 &lt;gen&gt;)
                          • Skip remaining actions
                        • Else - Actions
 

Komaqtion

You can change this now in User CP.
Reaction score
469
PS: Well, now I'v had my first taste of variables, Arrays and integers. Now its time to play around with them and see if I can't learn how to make my maps leak proof! 4-5+ years of world editing and I'm just now learning these functions!:eek::D

Ouch XD well, even if you're that experienced, you learn new things ;)
And since you now know about variables, do you know that your trigger leaks??? :eek:
 

BlightWarden

New Member
Reaction score
6
Ouch XD well, even if you're that experienced, you learn new things ;)
And since you now know about variables, do you know that your trigger leaks??? :eek:

Yea, there are quite a few things I have yet to learn how to do, leaderboards, custom spells, modeling, icon making, skinning and more. I mostly make Competitive RPG maps (AKA hero wars with quests:p) That my buddies and I play over lan or network.

I'v never hosted my maps online before and I'v only ever gotten minor lag after a 2 hour game. But I did learn a while ago (years and years) that my maps do leak, my triggers do leak, thanks to Emjlr3's guide to identifying leaking triggers.

His guide found here will help me fix all my old maps!
http://www.thehelper.net/forums/showthread.php?t=27219

I have around 40+ custom maps that I'v made, so I can't wait to start working on my favorites!

Now I need to learn how to make those dummy units for spells and effects.:D Leaderboards and a few other things like a game timer/count down timer. lol, I'm a veteran newbie.:thup:



Afterthought: I may not be able to clean up the leaks if I need to do it in jass... I don't have the time to learn jass, nor do I think I could pick it up quickly. I hope I can leak proof my maps without jass, or atleast reduce the amount of memory leakage to a bare minimum.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Almost no way to "leak proof" you're maps without JASS, though it doesn't take much knowledge to clean up leaks, really ;)

Just a few lines are needed, but i might be able to help you ;)
 

BlightWarden

New Member
Reaction score
6
Almost no way to "leak proof" you're maps without JASS, though it doesn't take much knowledge to clean up leaks, really ;)

Just a few lines are needed, but i might be able to help you ;)


Oh yea? I'd be very grateful! For exsample, a few questions if I may?

In the editor it has a custom script code function, This is where you put the jass code?

And if we could discuss a single jass solution, I may be able to get the hang of it. As an exsample...:D


Point Good
Events
Conditions
Actions
Set Temp_Point = (Center of (Playable map area))
Unit - Create 1 Footman for Player 1 (Red) at Temp_Point facing Default building facing degrees
Custom script: call RemoveLocation (udg_Temp_Point)

Help me understand this trigger, please, if you have time.

Set temp_point is what function? A variable? A region variable?

And the custom script at the bottom, call RemoveLocation (udg_Temp_Point). Would I type it in exactly as I see it and the WE would know its function and enable it? So I don't have to learn jass before hand, I can just copy what I see in the leak guide? Or someone could give me the jass script and I just type it in and Bam, it works?

Thanks for any and all replies, and for your time.:)


[edit] when I say type exactly I mean the obvious and change what I need to as in:
call RemoveLocation (udg_MyRegionof_Exsample).

Also do I need the _ in the name? I know udg_ is needed, but do I need it for Myregionofexsample? Thanks!
 

Komaqtion

You can change this now in User CP.
Reaction score
469
In the editor it has a custom script code function, This is where you put the jass code?

Yes ;)

Set temp_point is what function? A variable? A region variable?

Temp_Point is a Point Variable, and that GUI action is called "Set Variable"

In that action, you first select a variable, which you've created in the Variable window, and depending on what variable type that variable is, different selections of "actions" will be visible.

And the custom script at the bottom, call RemoveLocation (udg_Temp_Point). Would I type it in exactly as I see it and the WE would know its function and enable it? So I don't have to learn jass before hand, I can just copy what I see in the leak guide? Or someone could give me the jass script and I just type it in and Bam, it works?

Well, you need to type in a already existing Point variable, and this is the leak removal part of the trigger ;)
There are different JASS lines to remove the leaks of different variable types, like:
call DestroyGroup(udg_<Your_Group>)
This will destroy a "precreated" Unit Group variable, to remove the leak there :D

And just so you know, the lines are case sensitive, which means that if you've created a point variable in the variable window, called Temp_Point, then you can't write:
call RemoveLocation(udg_temp_point)

This will not work, so you have to use:

call RemoveLocation(udg_Temp_Point)

Also do I need the _ in the name? I know udg_ is needed, but do I need it for Myregionofexsample? Thanks!

Well, of course not, since you still can't use spaces when you make variables in the variable window, you can "seperate" the words by using a "_", but no, they're not needed.

"Temp_Point" can just as good be "Temppoint", there is absolutely no difference there ;)
But if you
 

BlightWarden

New Member
Reaction score
6
Outstanding! After I take a nap, I'm going to give this jass thingy thang a try and see if I blow up my computer!:D I'll post my trigger abominations afterwards and see what feedback I can get!

Thanks a ton for all the help, I really appreciate it! + rep.


PS: For anyone out there, I still need to know how to solve my problem of the creep dropping two items instead of a single item. This only happens the first time I kill the creep.

I will post all the triggers in the catagory, maybe something is causing it. 4 triggers total.

Trigger:
  • Set custom item value trigger
    • Events
    • Conditions
    • Actions
      • Item - Set the custom value of gg_item_ratf_0001 to 0
      • Item - Set the custom value of gg_item_ckng_0002 to 1
      • Item - Set the custom value of gg_item_ofro_0005 to 2
      • Item - Set the custom value of gg_item_desc_0003 to 3
      • Item - Set the custom value of gg_item_modt_0004 to 4










Trigger:
  • Set 1 Item Table Trigger revised
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Infernal
      • (gg_rct_test_region_1 contains (Dying unit)) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than 51
        • Then - Actions
          • Item - Create common drop at (Center of gg_rct_test_region_1)
          • Skip remaining actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than 21
            • Then - Actions
              • Item - Create Masterwork Helm at (Center of gg_rct_test_region_1)
              • Skip remaining actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Random integer number between 1 and 100) Less than 15
                • Then - Actions
                  • Item - Create Paladine&#039;s Fist at (Center of gg_rct_test_region_1)
                  • Skip remaining actions
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Random integer number between 1 and 100) Less than 6
                    • Then - Actions
                      • Item - Create Shield 20 at (Center of gg_rct_test_region_1)
                      • Skip remaining actions
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Random integer number between 1 and 100) Less than 2
                        • Then - Actions
                          • Item - Create orb 9 at (Center of gg_rct_test_region_1)
                          • Skip remaining actions
                        • Else - Actions




Trigger:
  • sample creep respawn trigger
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to Infernal
        • Then - Actions
          • Wait 10.00 seconds
          • Unit - Create 1 Infernal for Neutral Hostile at (Center of gg_rct_test_region_1) facing Default building facing degrees
        • Else - Actions


I have this trigger because I had to pick the items to be in my table, then remove them when the game starts at 0.01 gametime.
Trigger:
  • remove item trigger
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Item - Remove gg_item_ofro_0005
      • Item - Remove gg_item_ratf_0001
      • Item - Remove gg_item_ckng_0002
      • Item - Remove gg_item_desc_0003
      • Item - Remove gg_item_modt_0004


*I know the triggers leak, thats not the issue and I am working to fix that, thanks!:D Ok, off to bed.

Heh, not a bad night of WE if I do say so myself. Learned variables, Arrays and Integers. (to a certain extend), also learned how to import and use custom skins and models, got the basics of jass leak prevention and learned how to make a item table trigger. Not a bad night!

Next is custom skills, multiboards and those invisable dummy units. :D
 
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