Hi to all! i have a big problem here =(

Status
Not open for further replies.
Level 3
Joined
Dec 20, 2008
Messages
41
Greetings! I'm working on a mod atm, everything was alright, until i've encountered serious problem with triggers.
Well, i want to make some certain item (for exemple Cloack of Shadows) to be destroyed if dropped on the ground, if it hadn't been picked up for certain amount of seconds. Please help me with this trigger! And sorry for the inconvenience. Cheers.
 
Level 5
Joined
May 3, 2009
Messages
129
Somthing like this
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Item - Create Mask of Death at (Center of (Playable map area))
      • Set item = (Last created item)
      • Countdown Timer - Start timer as a One-shot timer that will expire in 30.00 seconds
  • Untitled Trigger 001
    • Events
      • Time - timer expires
    • Conditions
    • Actions
      • Item - Remove item
  • Untitled Trigger 002
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • item Equal to (Item being manipulated)
    • Actions
      • Countdown Timer - Pause timer
  • Untitled Trigger 003
    • Events
      • Unit - A unit Loses an item
    • Conditions
      • item Equal to (Item being manipulated)
    • Actions
      • Countdown Timer - Start timer as a One-shot timer that will expire in 30.00 seconds
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I'm sorry, but I wouldn't recommend the above system...

You're lucky, since I wanted to create this exact same system a week ago ^^ (and so I did).
There are a few other systems in this map as well, but the system you need are the triggers "Init" and "Remove Items" (and coincidentally, the item counter is 30 seconds...).

If you have any further questions, feel free to ask. (e.g.: exclude certain items/area's, change the timer for certain items, ...).
 

Attachments

  • Item Systems.w3x
    19.1 KB · Views: 52
Level 3
Joined
Dec 20, 2008
Messages
41
Sorry but you PvSvN got me wrong. I meant another thing.
I want not to create the item manually but to make the last dropped item to be destroyed after 30 secs if the item type is Clock of Shadows. so fore example

Destroy Item
Events
Conditions
(Item-type of (Last dropped item)) Equal to Cloak of Shadows
Actions
Wait 30.00 seconds
Item - Set life of (Last dropped item) to 0.00

i think that I've put right actions and condition, but what about event?
what event should i use? there aren't any events related to the items =(

P.S. ap0calypse your map won't open. =( i think it's due to my older version of WE. I'm using 1.21.
this is the map I'm talkin' about (ignore the missing unit models I've imported everything to an MPQ archive)

just change the model of the grunt[thrall] in custom units to it's default one and start the map, when it's started choose the Horde faction and check the Shaman. he has Badge of Wisdom an item that i want to remain with him always, he can't sell the item, can't drop and shouldn't drop it after his death, but unfortunately, after his corpse decays the item drops on the ground =(

sorry for this wall of text, but I'm kind off breaking my mind on this problem for about a whole day or two, so please just please help me if you can. ty.
 

Attachments

  • (4)Blackrock and Roll - take 3!.w3x
    359.4 KB · Views: 38
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,272
Sorry but we only support people who are using the lattest patches (eithor beta or current).

Thus you will need to update to version 1.24 (at this time the current WC3 version) to be fully supported. This is due to huge trigger revisions which occur causing old maps to be unplayable.

In the end there is no excuse to not be using the lattest version of WC3, afterall it is only a battlenet click away. If it is because of JNGP using 1.21's WE, then do not worry, as you can update to 1.24 (like me) and just use the old 1.21's WE exe to run JNGP. The result is JNGP still works and you can use all the lattest cool features.

Be warned that if your map uses GUI gamecahce actions, it is advisible to convert those triggers to custom text before updating to prevent a bug from preventing your map from loading in WE. Also many old JASS systems will need to be updated or fixed due to the removal of the type casting bug they used, but your map will be rejected from this site anyway unless this occurs as all testing is done using the lattest version of WC3.
 
Level 3
Joined
Dec 20, 2008
Messages
41
hmm. fingers crossed i found a way to solve my problem

here are the triggers

Destroy Badges
Events
Unit - A unit Dies
Conditions
Or - Any (Conditions) are true
Conditions
(Unit-type of (Triggering unit)) Equal to Shaman [thrall]
// and other units etc
Actions
Item - Remove (Item carried by (Triggering unit) in slot 1)
Item - Remove (Item carried by (Triggering unit) in slot 2)
Item - Remove (Item carried by (Triggering unit) in slot 3)
Item - Remove (Item carried by (Triggering unit) in slot 4)
Item - Remove (Item carried by (Triggering unit) in slot 5)
Item - Remove (Item carried by (Triggering unit) in slot 6)

this works like a charm! finally after hours of tinkering lol

and what about patching, well thanks for informing me i really didn't knew that that could be such a problem. either way thank you all very much. if any1 of you will be interested i'll upload my full mod to somewhere and give you a link =)

thanks a lot again.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
A lot of the newest spells/systems/maps only work with the new patch.

Your trigger doesn't do what you wanted to do... (according to me).
(this is your trigger - for clarification)

  • Trigger
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Shaman [thrall]
          • // and other units etc
    • Actions
      • Item - Remove (Item carried by (Triggering unit) in slot 1)
      • Item - Remove (Item carried by (Triggering unit) in slot 2)
      • Item - Remove (Item carried by (Triggering unit) in slot 3)
      • Item - Remove (Item carried by (Triggering unit) in slot 4)
      • Item - Remove (Item carried by (Triggering unit) in slot 5)
      • Item - Remove (Item carried by (Triggering unit) in slot 6)
You wanted to remove items that were left on the ground for a certain time...
E.g.: an item is dropped, 30 seconds later, that item will be removed, while another item - that was dropped 10 seconds ago - isn't removed yet.

Your trigger removes the items which a dying hero is carrying...

I don't see the link between those 2 things?

This is my trigger, in case you wanted to check it:

  • Remove Items
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Item - Pick every item in (Playable map area) and do (Actions)
        • Loop - Actions
          • Set ItemCounter = (Load 0 of (Key (Picked item)) from ItemTable)
          • Set ItemCounter = (ItemCounter + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ItemCounter Greater than or equal to 20
            • Then - Actions
              • Set loc[1] = (Position of (Picked item))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (ItemCounter mod 2) Equal to 0
                • Then - Actions
                  • Set FloatingText = (Load 1 of (Key (Picked item)) in ItemTableIf the label is not found, this function returns NULL.)
                  • Floating Text - Destroy FloatingText
                  • Floating Text - Create floating text that reads (String(((60 - ItemCounter) / 2))) at loc[1] with Z offset 100.00, using font size 9.00, color (40.00%, 40.00%, 60.00%), and 0.00% transparency
                  • Set FloatingText = (Last created floating text)
                  • Hashtable - Save Handle OfFloatingText as 1 of (Key (Picked item)) in ItemTable
                • Else - Actions
              • Custom script: call RemoveLocation(udg_loc[1])
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ItemCounter Greater than or equal to 60
            • Then - Actions
              • Set FloatingText = (Load 1 of (Key (Picked item)) in ItemTableIf the label is not found, this function returns NULL.)
              • Floating Text - Destroy FloatingText
              • Hashtable - Clear all child hashtables of child (Key (Picked item)) in ItemTable
              • Item - Remove (Picked item)
            • Else - Actions
              • Hashtable - Save ItemCounter as 0 of (Key (Picked item)) in ItemTable
Well, it has a little timer above the item (that counts down from 10-0, to leave enough time for the players to see it and pick it up).
Without that, the trigger would be a lot shorter (less than half of what it is now I believe).
 
Level 3
Joined
Dec 20, 2008
Messages
41
well that was all my fault.
actually i was creating an veterancy system with special items, which grant some bonuses.
so for example a shaman after 300 seconds of battle, if he manages to survive, gains an item named Badge of Wisdom, which increases it's health and mana by 200, damage by 12 and mana regen by 25%. every unit have a 4 slot inventory, and units can't sell, buy, drop or pick up any items. so the only thing in what they spend their slots are the veterancy badges. so a shaman may have 4 badges of wisdom, if he manages to survive for 1200 seconds (20 min which is pretty much for a standard unit).

however the problem is that even if i set the values of (can be dropped after death to false) here and there, after the shaman dies and decays the badges appear on the place of his corpse.

i was struggling with the problem, and I've asked about that in Russian forums, and they told me that it's impossible to get rid of the dropped item even with triggers. and someone advised that i should remove the item after some amount of time after death.
so the idea was if the shaman dies and decays and the badges are dropped, then after 30 seconds ('cuz some idiot told me that that is the minimal time in triggers) to remove the item from the ground.

well after struggling with the triggers a bit longer i've managed to remove the items from units just in the time of their death.


well, anyways, thanks alot for your aid =) and really sorry for the confusion i've caused.
it's due to the fact that i was told that it's impossible.
 
Last edited:
Level 3
Joined
Dec 20, 2008
Messages
41
sorry for double post, but since the problem is solved i don't think it matters now.

i forgot to say that you'll ll get +1 to rep for quick and productive help.

thanks alot again and sorry for the aforementioned fault of mine.
 
Status
Not open for further replies.
Top