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.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top