Cooldown and how to give a mob a life span

Started by Jamesthefool on Sat, 07/14/2018 - 10:41

Topic category: Advanced modding

Last seen on 18:25, 19. Apr 2020
Joined Jul 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Cooldown and how to give a mob a life span
Sat, 07/14/2018 - 10:41

Ok, so all I want to know is how do I add a cooldown on an item which gives the player boosts and also how to make it so you can summon mobs for a short amount of time. EG:50 seconds

Last seen on 10:39, 20. Apr 2020
Joined Jan 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I tried: while not (i = 20) …
Sat, 07/14/2018 - 19:06

I tried:

while not (i = 20)

    set i = i + 1

//done

Thread.sleep(15)

The above creates an error:

le)8);Thread.sleep(15)for (int i

                                 ^

A semi-colon at the end didn't work either so I'll try putting a space. Sorry for not giving an answer but this might help

Last seen on 00:36, 3. Mar 2020
Joined Sep 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Just give the mob wither, it…
Thu, 07/26/2018 - 14:54

Just give the mob wither, it will die after a while. As for the item, that is a tricky bit of coding.

Last seen on 14:50, 13. Jul 2020
Joined Feb 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
i'm pretty sure while…
Thu, 02/13/2020 - 11:04

i'm pretty sure while cycling down some procedure blocks, i saw this procedure block that gives an item a cooldown. if that isn't what you wanted or if it doesn't exist sorry. but you can also make a cooldown timer using either variables, nbt data, scoreboards etc. and for the summon entities for a period of time, you can make a timer using the figures above as suggested and when the timer is over, you can either select the despawn provided entity procedure block or give the entity high damage.