Aller au contenu

[IceRunner] - Système courbe de glace


Messages recommandés

Posté(e)

Salut !

 

On m'a demandé de skripter un petit système de IceRunner.

Je ne sais pas si mon skript répond bien à la demande mais je pense que c'est une bonne base.

 

options:
limit : 50

on shoot:
if projectile is a snowball:
	if name of shooter's tool is "icerunner":
		if shooter's horizontal facing is north:
			loop {@limit} times:
				wait 1 tick
				set {_location} to projectile's location
				reduce y-coordinate of {_location} by 1
				increase z-coordinate of {_location} by 1
				set block at {_location} to ice
		if shooter's horizontal facing is south:
			loop {@limit} times:
				wait 1 tick
				set {_location} to projectile's location
				reduce y-coordinate of {_location} by 1
				reduce z-coordinate of {_location} by 1
				set block at {_location} to ice
		if shooter's horizontal facing is east:
			loop {@limit} times:
				wait 1 tick
				set {_location} to projectile's location
				reduce x-coordinate of {_location} by 1
				reduce y-coordinate of {_location} by 1
				set block at {_location} to ice
		if shooter's horizontal facing is west:
			loop {@limit} times:
				wait 1 tick
				set {_location} to projectile's location
				increase x-coordinate of {_location} by 1
				reduce y-coordinate of {_location} by 1
				set block at {_location} to ice


command /icerunner:
trigger:
	give snowball named "icerunner" to player

Posté(e)
Aucune action ne se réalise, normal ?

Il manquait le give de la boule de neige nommé "icerunner". Après, vous n'êtes pas obligé d'utiliser une boule de neige nommée :)

Posté(e)

Merci.

 

Ps : Un bug se produit, quand on lance la boule de neige, on remarque que le block de glace se crée sur nous aussi, ( donc on suffoque)

Posté(e)
Merci.

 

Ps : Un bug se produit, quand on lance la boule de neige, on remarque que le block de glace se crée sur nous aussi, ( donc on suffoque)

J'ai un peu modifié le skript au niveau des Y pour régler le prob

Posté(e)

Personnellement j'utilise cela, car je sais pas pourquoi en 1.7 ton code Prof y a 1 block sur 2 qui spawn.

on shoot:
   if projectile is a snowball:
       push projectile in the direction of shooter at speed -0.4
       push projectile upward at speed 0.2
       set {_shoot} to 0
       wait 2 tick
       while {_shoot} < 500:
           spawn 1 of particle fireworks spark at location of projectile
           if block 2 meter down projectile is ice:
               set block 2 meter down the projectile to packed ice
           if block 2 meter down projectile is air:
               set block 2 meter down the projectile to ice
           add 1 to {_shoot}
           wait 1 tick

Posté(e)
Personnellement j'utilise cela, car je sais pas pourquoi en 1.7 ton code Prof y a 1 block sur 2 qui spawn.

on shoot:
   if projectile is a snowball:
       push projectile in the direction of shooter at speed -0.4
       push projectile upward at speed 0.2
       set {_shoot} to 0
       wait 2 tick
       while {_shoot} < 500:
           spawn 1 of particle fireworks spark at location of projectile
           if block 2 meter down projectile is ice:
               set block 2 meter down the projectile to packed ice
           if block 2 meter down projectile is air:
               set block 2 meter down the projectile to ice
           add 1 to {_shoot}
           wait 1 tick

Je trouve que ton skript est plus stable que celui du profs perso :)

×
×
  • 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.