1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Simple respawn for my needs

Discussion in 'World Editor Help Zone' started by Windu, Aug 13, 2008.

  1. Windu

    Windu

    Joined:
    Nov 26, 2005
    Messages:
    706
    Resources:
    0
    Resources:
    0
    Listen, I am making a "troll tribes" kind of map ... anyway, many things are finished, but still I need to figure out a small issue:
    I need to find an easy way to respawn 4 types of units (Stone deposit, Iron deposit, Mithril deposit and Copper deposit). What I need is a short way to make them re-appear every 5 minutes at the exact place where they were placed in the World Editor
    Please help me.
     
  2. Masiah

    Masiah

    Joined:
    Jan 18, 2008
    Messages:
    701
    Resources:
    0
    Resources:
    0
    Does it have to check if the previous deposit is still there?
     
  3. Windu

    Windu

    Joined:
    Nov 26, 2005
    Messages:
    706
    Resources:
    0
    Resources:
    0
    Well ... yes, I mean, we donn't want one deposit to spawn over the other. Ijust need it to replace a dead unit (deposit) 3 minutes after its death.
     
  4. Numerion

    Numerion

    Joined:
    Jul 3, 2008
    Messages:
    644
    Resources:
    0
    Resources:
    0
    event:deposit dies
    actions:wait 3mins
    else actions:unit create deposit at place of diyng unit

    it maybe work
     
  5. Windu

    Windu

    Joined:
    Nov 26, 2005
    Messages:
    706
    Resources:
    0
    Resources:
    0
    It won't ... because if another deposit of the same type dies before this one is revived, it will start the trigger again... and everything will fail.
     
  6. Squiggy

    Squiggy

    Joined:
    Mar 25, 2008
    Messages:
    2,620
    Resources:
    18
    Maps:
    2
    Spells:
    15
    Tutorials:
    1
    Resources:
    18
    Unit dies, condition: triggering unit equal to deposit, wait 300 seconds, set temppoint = (Position of triggering unit), create 1 unit-type of triggering unit at temppoint for owner of triggering unit, call RemoveLocation(udg_temppoint)

    the reason why you should use triggering unit is, because it's saved local means it can be used after waits
     
  7. Masiah

    Masiah

    Joined:
    Jan 18, 2008
    Messages:
    701
    Resources:
    0
    Resources:
    0
    I thought about something similar as you Squiggy, but does this trigger work with items?
     
  8. YoshiRyu

    YoshiRyu

    Joined:
    Jun 26, 2007
    Messages:
    686
    Resources:
    0
    Resources:
    0
    trigger can be use several time simultaneously
    Squiggy's one will works perfectly if temppoint is a local variable ;)
    (add as first action in the trigger "Custom Script : local location udg_temppoint" to make it local = one for each use of the trigger)