Cooldown and how to give a mob a life span

Started by Jamesthefool on

Topic category: Advanced modding

Active 5 years ago
Joined Jul 2018
Points:
684

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 0
Cooldown and how to give a mob a life span

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

Active 1 year ago
Joined Jan 2018
Points:
731

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 56
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

Active 5 years ago
Joined Sep 2017
Points:
935

User statistics:

  • Modifications: 7
  • Forum topics: 11
  • Wiki pages: 1
  • MCreator plugins: 0
  • Comments: 202
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.

Active 2 years ago
Joined Feb 2020
Points:
622

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
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.