Aller au contenu
  • 0

Probleme de spawn


Question

Posté(e)

Bonjour j'ai fait ce petit Skript et j'ai un énorme gros problème

 

Mon Code :

 

on spawn:
   if event-entity is a zombie:
       if event-entity is not within {spawn.1} to {spawn.2}:
           if chance of 16%:
               set helmet of event-entity to leather helmet
               dye event-entity's helmet red
               set name of event-entity to "&aZombie"
           else:
               clear event-entity
       else:
           clear event-entity
   else:
       clear event-entity


command /zombie <text>:
   trigger:
       if player is op:
           if arg 1 is "setspawn":
               add location of player to {spawnzombie::*}
               message "Vous avez set le spawn %{spawnzombie::*}%"
           if arg 1 is "spawn":
               loop {spawnzombie::*}:
                   spawn 1 zombie at loop-value
           if arg 1 is "clear":
               clear {spawnzombie::*}

 

Mais le soucis c'est que sa fait spawner trop de zombie genre 80 entity mais vue que ma région spawn.1 et spawn .2 n'st pas trop grad sa fait laguer:/

 

Et j'aimerais que les zombies puissent spawn que avec une commandes (/zombie spawn)

19 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Change sa:

if event-entity is not within {spawn.1} to {spawn.2}:

if chance of 16%:

 

Par:

if event-entity is not within {spawn.1} and {spawn.2}:

chance of 16%:

 

N.B: Esseye de voir si le zombie spawn autre part que la région, tu le kill et clear les items droppés.

  • J'aime 1
  • 0
Posté(e)
Change sa:

if event-entity is not within {spawn.1} to {spawn.2}:

if chance of 16%:

 

Par:

if event-entity is not within {spawn.1} and {spawn.2}:

chance of 16%:

 

N.B: Esseye de voir si le zombie spawn autre part que la région, tu le kill et clear les items droppés.

Sa change quoi ? :/

  • 0
Posté(e)
Si ce n'est pas ce que tu cherche , explique un peu mieux ce que tu veux :p

en gros je veut que les zombie spawn que avec une commandes et que si il spawn naturellement non :p

  • 0
Posté(e)

command /zombie:
trigger:
	loop 10000 times:
		set {_x} to a random integer between 100 and 1000
		set {_y} to a random integer between 20 and 100
		set {_z} to a random integer between 100 and 1000
		set {_loc} to location {_x} {_y} {_z}
		if {_loc} is within {spawn.1} and {spawn.2}:
			exit loop
	spawn 1 zombie at {_loc}
	set helmet of event-entity to leather helmet
               dye event-entity's helmet red
               set name of event-entity to "&aZombie"
	set {lastused} to now

on spawn:
if event-entity is a zombie:
	if difference between {lastused} and now is less than 5 seconds:
		stop
	else:
		cancel event

 

Tiens, tu pourrais faire quelque chose de ce genre

  • J'aime 1
  • 0
Posté(e)
command /zombie:
trigger:
	loop 10000 times:
		set {_x} to a random integer between 100 and 1000
		set {_y} to a random integer between 20 and 100
		set {_z} to a random integer between 100 and 1000
		set {_loc} to location {_x} {_y} {_z}
		if {_loc} is within {spawn.1} and {spawn.2}:
			exit loop
	spawn 1 zombie at {_loc}
	set helmet of event-entity to leather helmet
               dye event-entity's helmet red
               set name of event-entity to "&aZombie"

 

Tiens, tu pourrais faire quelque chose de ce genre

 

Enfaite ce que je veut c'est que les zombie ne spawn qu'avec une commandes et non Naturellement :p

  • 0
Posté(e)
Tiens, j'ai modifié mon code

j'ai déja une commandes :

 

command /zombie <text>:
   trigger:
       if player is op:
           if arg 1 is "setspawn":
               add location of player to {spawnzombie::*}
               message "Vous avez set le spawn %{spawnzombie::*}%"
           if arg 1 is "spawn":
               loop {spawnzombie::*}:
                   spawn 1 zombie at loop-value
           if arg 1 is "clear":
               clear {spawnzombie::*}

  • 0
Posté(e)
Rajoute ça alors

 

set {lastused} to now

on spawn:
   if event-entity is a zombie:
       if difference between {lastused} and now is less than 5 seconds:
           stop
       else:
           cancel event

Merci mais la ils vont toujours spawn naturellement :/

  • 0
Posté(e)
Non, c'est pour les empêcher de spawn naturellement, sa les bloque si tu n'as pas exécuté la commande dans les dernières secondes

Je te remercie énormément mais Bon cette méthode me convient pas :/ sa ne fait pas ce que je veut du coup j'aimerais faire

 

Que quand un zombie spawn si il a spawner grâce a une spawner sa le laisse sinon sa le kill merci <3

×
×
  • Créer...

Information importante

Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.