• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

A regrow system?

Status
Not open for further replies.
Level 35
Joined
Oct 9, 2006
Messages
6,394
Well... you create the item from start i pressume?
Then make a region where the item is...

Then make this trigger:
  • Events
    • Unit - A unit Acquires an item
  • Conditions
    • (Item-type of (Item being manipulated)) Equal to (Your item type)
  • Actions
    • Set ItemRespawn = (Item being manipulated)
    • Wait 60.00 seconds
    • Item - Create (Item-type of ItemRespawn) at (Center of (Your region)
Only problem with this is, if the item is destroyed before being moved it would respawn..
 
Level 3
Joined
Jun 17, 2007
Messages
62
That trigger is not very good if you wanna trade the item.

Make a variable and set it to the created item. Then Look at the condition if the item is the one of the variable.
 
Level 35
Joined
Oct 9, 2006
Messages
6,394
That trigger is not very good if you wanna trade the item.

Make a variable and set it to the created item. Then Look at the condition if the item is the one of the variable.

:confused: May I point out that he still can make that trigger with my variable use... and he didnt say anything about wanting the item not to be tradeable because that would be the only reson to do what you suggests....
Course in the same moment he takes up that item to trade it.. well then he activates my trigger.. 1min later a new item appears.. that was what he wanted....
As said the only problem with this is that it doesnt respawn if item is destroyed before being picked up....
 
Level 9
Joined
Jul 27, 2006
Messages
652
Well he said how to regrow one item... so no need realy..
And if he realy needs it.. I do think it is kinda easy to write:
  • Custom script: local item udg_ItemRespawn

A local global sigh... I havn't tested but im pretty sure that doesn't work... try :

  • Custom script: local item i = udg_ItemRespawn
  • Wait 60.00 seconds
  • Custom script: set udg_ItemRespawn = i
  • Item - Create (Item-type of ItemRespawn) at (Center of (Your region)
  • Custom script: set i = null
That would work quite well
 
Status
Not open for further replies.
Top