Periodic Item removal.

BlightWarden

New Member
Reaction score
6
Creeps drop power up items. If players do not take those power ups, the amount of runes on my map can add up quickly. I need a way to remove power ups that have been on the map for 60 seconds without removing power ups that have not been on the map for 60 seconds. I need the trigger to activate After a power up has been created and only affect That power up.

This will allow me to remove unwanted runes without risking removal of wanted runes. Hope I made that clear.

I would appreciate a working example trigger and the pathway to any complex triggers.

Wanted power ups will be picked up asap by the players and they do not go to inventory. They are used when picked up.


thanks for any and all replies. +rep to all who can help. (going to spread rep right now.);)
 

rApp

New Member
Reaction score
3
When the item is dropped you might can start a timer which is set to 60 seconds, and if the item is picked up you cancel the timer?

Might be something to work with? =)
 

BlightWarden

New Member
Reaction score
6
When the item is dropped you might can start a timer which is set to 60 seconds, and if the item is picked up you cancel the timer?

Might be something to work with? =)

And how would I go about doing that in trigger form?


it will be simple using local variables

A local variable is a term I seem to be unable to remember. What sort of variable would that be?
 

Lammet

New Member
Reaction score
0
Creeps drop power up items. If players do not take those power ups, the amount of runes on my map can add up quickly. I need a way to remove power ups that have been on the map for 60 seconds without removing power ups that have not been on the map for 60 seconds. I need the trigger to activate After a power up has been created and only affect That power up.

This will allow me to remove unwanted runes without risking removal of wanted runes. Hope I made that clear.

I would appreciate a working example trigger and the pathway to any complex triggers.

Wanted power ups will be picked up asap by the players and they do not go to inventory. They are used when picked up.


thanks for any and all replies. +rep to all who can help. (going to spread rep right now.);)
A unit dies
Unit equal to "Creep 1"
Create 1 item "Power-up" at point of dying unit
Wait 60 seconds
Remove "power-up"

If u uses the power-up there is nothing to destroy = the power-up will not be destroyed
If u doesn't, the power-up will be removed
And only unwanted power-ups will be removed
Sorry I can't give u a proper trigger, Don't got WE on this computer so can't make the trigegr for ya.
But it's something like above.
 

BlightWarden

New Member
Reaction score
6
I'v heard too many bad things about newgen to use it, plus I'm not a fluent in jass scripting. Also thanks Lammet! That totally slipped my mind. I can just add a wait and a remove action to my item drop tables!

I'll be back if anything goes wrong with that.;) If it works, +rep to lammet.:thup: And thank you Triggerhappy, for the suggestion.
 

Lammet

New Member
Reaction score
0
I'v heard too many bad things about newgen to use it, plus I'm not a fluent in jass scripting. Also thanks Lammet! That totally slipped my mind. I can just add a wait and a remove action to my item drop tables!

I'll be back if anything goes wrong with that.;) If it works, +rep to lammet.:thup: And thank you Triggerhappy, for the suggestion.

No problem, just pm if it doesn't work and I'll will guide you with a real trigger or tutorial. Keep up the god work!:thup:
 

BlightWarden

New Member
Reaction score
6
Ok, I ran into some problems. I still have no idea how to add a remove power up after 60 seconds to my item table trigger. There is no "Remove power up" option. I can remove lastcreated item/matching item/picked item of type (power up) from region. But if a monster drops a power up outside of the region then it won't be removed.

Creeps don't just drop a single item, so that original trigger posted by Lammet won't work for me.

Here is my trigger.

Trigger:
  • Set 1 Item Table Trigger revised
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Creep A
      • (test region 1 <gen> 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 Power up A at (Center of test region 1 <gen>)
          • 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 Power up B at (Center of test region 1 <gen>)
              • 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 Power up C at (Center of test region 1 <gen>)
                  • 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 Power up D at (Center of test region 1 <gen>)
                      • 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 Power up E at (Center of test region 1 <gen>)
                          • Skip remaining actions
                        • Else - Actions


So This is what I need. Creep A dies. My item table trigger activates, A power up is created. If the players do not take the power up, after 60 seconds it is removed. I need a way to do this without delaying the item drop table if another Creep A is killed and I need a way to do this without the wrong power up being removed. I need a way to do this without using jass and without downloading any additional WE enhancments.

If its not possible, then I will just have to make it clear to players that they need to pick up all power ups.
 

Sevion

The DIY Ninja
Reaction score
413
I'v heard too many bad things about newgen to use it, plus I'm not a fluent in jass scripting.

What? Since when is NewGen bad? And since when is NewGen only for JASSer's?

Ever heard of UMSWE? Plus all of the other additions?
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
I've tried long and hard on the WE, and I realised its almost impossible to do it without JASS or custom scripts, because they stack and its for a long time. The best I could come up is if you kill a unit and for 60seconds you dont kill other units, it will be removed. But if you kill others units, it wont be removed.
 

Exide

I am amazingly focused right now!
Reaction score
448
Like Nexor already stated, this should be no problem with local variables.
Nevermind using NewGen and other complicated crap. :p
All you need is simple JASS. =)
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Wait, I got it.

Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Item - Create Tome of Experience at (Position of (Triggering unit))
      • Set item[integer] = (Last created item)
      • Set integer = (integer + 1)
      • Wait 60.00 seconds
      • Set integer2 = (integer2 + 1)
      • Item - Remove item[integer2]

It works! It worked for me. I spawned many many footman, and I put 1 imba hero thr to clear. I cleared all the footmen and the tomes started to disappear 1 by 1. Except, out of the 50 I killed, 2 books werent removed. That should be okay right?

Okay nvm, found my mistake. This time it should be 0 tomes left.
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to A
    • Actions
      • Item - Create B at (Position of (Triggering unit))
      • Set C = (C + 1)
      • Set D[C] = (Last created item)
      • Wait 60.00 seconds
      • Set E = (E + 1)
      • Item - Remove D[E]

A= Unit/Creep that you want
B=Item/Tome that you want
C= No array integer variable
D= 100 array item variable
E=Another no array integer variable
 

BlightWarden

New Member
Reaction score
6
Wait, I got it.

Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Item - Create Tome of Experience at (Position of (Triggering unit))
      • Set item[integer] = (Last created item)
      • Set integer = (integer + 1)
      • Wait 60.00 seconds
      • Set integer2 = (integer2 + 1)
      • Item - Remove item[integer2]

It works! It worked for me. I spawned many many footman, and I put 1 imba hero thr to clear. I cleared all the footmen and the tomes started to disappear 1 by 1. Except, out of the 50 I killed, 2 books werent removed. That should be okay right?

Okay nvm, found my mistake. This time it should be 0 tomes left.
Trigger:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to A
    • Actions
      • Item - Create B at (Position of (Triggering unit))
      • Set C = (C + 1)
      • Set D[C] = (Last created item)
      • Wait 60.00 seconds
      • Set E = (E + 1)
      • Item - Remove D[E]

A= Unit/Creep that you want
B=Item/Tome that you want
C= No array integer variable
D= 100 array item variable
E=Another no array integer variable

First off, thank you very much, skyblade333 for all your hardwork and effort. But I don't know how to make that trigger. No idea how to get Set C= (C+1) and no idea how to get Item - Remove D[E].

It also appears that this trigger would replace my item drop table trigger and this trigger does not offer me the freedom the item drop table does. And by looking at it, I doubt it would ever create more than 1 item whereas I need to have 5 possible drop chances.

Players will just have to pick up all power ups, shouldnt be too hard since all the power ups benefit them. +rep for the effort.

Like Nexor already stated, this should be no problem with local variables.
Nevermind using NewGen and other complicated crap. :p
All you need is simple JASS. =)

Since I don't know simple jass, then its not possible for me to use it. I'm going to look up what Local Variables mean since no one posted it.


What? Since when is NewGen bad? And since when is NewGen only for JASSer's?

Ever heard of UMSWE? Plus all of the other additions?

Newgen makes things more complicated, just saving a map takes more work and I hear it makes doing certain things a serious pain. I have no idea if newgen is only for jassers or not as I do not use newgen and don't plan to. No I'v never heard of UMSWE, but I don't like WE enhancments because they tend to be more work than I am willing to put forth. I'd love to have additional options for world editing but I'm already asking more questions on this forums about basic WE than is welcome, I'm not going to set myself up.

If I can't do it with standard WE, then I just won't do it. Making maps isn't that important to me. It just keeps me from being bored during odd hours.;)
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
I can explain to you if you want, I mean, A,B,C,D and E are just substitutes. You cant find them in WE, look at the end of my post, it states what the letters mean. And if you give me a list of your item drop table I can help you put it in. There is a way to do a chance based item drop.
 

Exide

I am amazingly focused right now!
Reaction score
448
All you need is this:

Trigger:
  • Untitled Trigger 002
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Custom script: local item i
      • Set temppoint = (Position of (Triggering unit))
      • Item - Create (Random level 1 item-type) at temppoint
      • Custom script: set i = bj_lastCreatedItem
      • Custom script: call RemoveLocation(udg_temppoint)
      • Wait 60.00 seconds
      • Custom script: call RemoveItem(i)
      • Custom script: set i = null
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Does it stack? Because in that 60 seconds another unit might die.
 

Exide

I am amazingly focused right now!
Reaction score
448
Does it stack? Because in that 60 seconds another unit might die.

Doesn't matter, you can kill 999999 units, and it will still work properly.
It's local variables, they're MUI. <3
 

BlightWarden

New Member
Reaction score
6
I can explain to you if you want, I mean, A,B,C,D and E are just substitutes. You cant find them in WE, look at the end of my post, it states what the letters mean. And if you give me a list of your item drop table I can help you put it in. There is a way to do a chance based item drop.

Well it goes like this, 60% chance, 20% chance, 14% chance, 5% Chance, 1% chance. I have 35 different power ups (runes) total that can be created (Drop). Different creeps drop different items, Creeps have 3 tiers, each tier drops better items. So I need the item drop table for that to work.

If I scrap the item drop table, then the creep system won't work and I might as well scrap the creep system, which would be a waste of more than a weeks work on triggers and such. So I don't want to do that. If there is an alternative item drop trigger that allows me to do the same thing, then I will try that. But if I have to spend 3+ days learning how to use it, then it would just be easier to inform the players to take all the power ups they find.

Most power ups are gold, lumber, XP, and temp buffs. So I doubt anyone would leave them on the ground. The only power up I worry about is the invisability power up which could get ignored, but will probably be taken to renew invis on a character.

So no need to get brainfried trying to figure out how to do it. If its that hard then I'd rather leave it up to the players. I'm not trying for a perfect grade A+ map here. Just a simple map to be used to kill a few hours when bored.

No worries, and thanks for the effort.:thup:
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      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