Aller au contenu
  • 0

[SkDragon] Comment faire un cercle instantané ?


Question

Posté(e)

Informations concernant les versions:

  • Version de Skript: Skript 2.2 Fixes V8b
  • Version de SkDragon: skDragon-0.14.0
  • Version de mon serveur: spigot 1.8.8

 

Bonjour,

Il y'a peu de temps j'ai découvert l'add-on "SkDragon", m'aidant ainsi à créer mes cosmétiques. Je souhaite créer un cosmétique permettant au joueur d'être au centre d'un cercle de flamme. Quand je dit "Cercle de flamme", je ne veux pas parler du "drawComplexCircle" qui dessine un cercle au fur et à mesure.

 

Je recherche vraiment une technique voir un bout de code permettant de dessiner le cercle instantanément.

 

J'ai bel et bien recherché au préalable sur d'autres forums et sur celui-ci, je ne trouve rien à ce sujet.

 

Merci d'avoir pris le temps de lire mon topic :3

13 réponses à cette question

Messages recommandés

  • 0
Posté(e)

Salut @_MonsterKid_

 

Si tu t'aventure dans cette voie, et crois moi c'est une mauvaise idée, il te faut CA !

On ne dispense pas de cours de trigonométrie dans le coin et je n'ai hélas pas du tout le temps de t'expliquer... Il te faudra utiliser des formules mathématiques.

 

Bon courage...

  • 0
Posté(e)
Salut @_MonsterKid_

 

Si tu t'aventure dans cette voie, et crois moi c'est une mauvaise idée, il te faut CA !

On ne dispense pas de cours de trigonométrie dans le coin et je n'ai hélas pas du tout le temps de t'expliquer... Il te faudra utiliser des formules mathématiques.

 

Bon courage...

J'ai déjà pu utiliser la trigonométrie pour certaines particules, je voudrais seulement demander si une personne parmi tant d'autres sais comment faire ça avec l'add-on "SkDragon"

Comme le montre cette vidéo (uniquement réalisé avec SkDragon)

  • 0
Posté(e)

J'ai trouvé peut-être des syntaxes:

 

draw[simple]Halo particle %string%[[, material] %-itemstack%][, speed %-number%][, ([offset]XYZ|RGB) %-number%, %-number%, %-number%], center %object%, id %string%[, isSingle %-boolean%, %-player%][, r[ainbow]M[ode] %-boolean%][, solid %-boolean%][, density %-number%], visibleRange %number%[, tps %-number%, second %-number%]

drawHalo particle "redstone", RGB 0, 0, 0, center player, id "%player%", rainbowMode true, solid true, visibleRange 32

 

drawRings particle %string%[, material %-itemstack%][, speed %-number%][, ([offset]XYZ|RGB) %-number%, %-number%, %-number%], center %entity/location%, id %string%[, isSingle %-boolean%, %-player%][, r[ainbow]M[ode] %-boolean%], randomRotation %boolean%, animated %boolean%, radius %number%, ringCount %number%, ringDensity %number%, visibleRange %number%[, rot[ation]XYZ %-number%, %-number%, %-number%][, dis[placement]XYZ %-number%, %-number%, %-number%][, pulseDelay %-number%]

command /rings [<boolean>] [<boolean>]:
   trigger:
       drawRings particle "redstone", RGB 80, 255, 255, center player, id "%player%", rainbowMode true, randomRotation arg-1, animated arg-2, radius 1, ringCount 4, ringDensity 10, visibleRange 32, pulseDelay 2

 

SKDRAGON 1.0 EFFECTS
drawLine particle %particlename%[, material %itemstack%][, speed %number%][, ([offset]XYZ|RGB) %number%, %number%, %number%], center %entity/location%[, target %entity/location%], id %string%[, onlyFor %players%][, r[ainbow]M[ode] %boolean%][, solid %boolean%][, density %number%][, length %-number%][, zigZag count %number%, height %number%], visibleRange %number%[, dis[placement]XYZ %number%, %number%, %number%][, pulseDelay %number%]

drawLine particle redstone, center player, target location of target block, id "%player%", rainbowMode true, solid true, density 5, length 6, zigZag count 0, height 0, visibleRange 32, displacementXYZ 0, 1, 0, pulseDelay 1

drawLine particle redstone, center player, id "%player%", rainbowMode true, solid true, density 5, length 6, zigZag count 0, height 0, visibleRange 32, displacementXYZ 0, 1, 0, pulseDelay 1

drawLine particle redstone, center player, target location of target block, id "%player%", rainbowMode true, solid true, density 10, length 0, zigZag count 1, height 0, visibleRange 32, displacementXYZ 0, 1, 0, pulseDelay 1

  • 0
Posté(e)
J'ai trouvé peut-être des syntaxes:

 

draw[simple]Halo particle %string%[[, material] %-itemstack%][, speed %-number%][, ([offset]XYZ|RGB) %-number%, %-number%, %-number%], center %object%, id %string%[, isSingle %-boolean%, %-player%][, r[ainbow]M[ode] %-boolean%][, solid %-boolean%][, density %-number%], visibleRange %number%[, tps %-number%, second %-number%]

drawHalo particle "redstone", RGB 0, 0, 0, center player, id "%player%", rainbowMode true, solid true, visibleRange 32

 

drawRings particle %string%[, material %-itemstack%][, speed %-number%][, ([offset]XYZ|RGB) %-number%, %-number%, %-number%], center %entity/location%, id %string%[, isSingle %-boolean%, %-player%][, r[ainbow]M[ode] %-boolean%], randomRotation %boolean%, animated %boolean%, radius %number%, ringCount %number%, ringDensity %number%, visibleRange %number%[, rot[ation]XYZ %-number%, %-number%, %-number%][, dis[placement]XYZ %-number%, %-number%, %-number%][, pulseDelay %-number%]

command /rings [<boolean>] [<boolean>]:
   trigger:
       drawRings particle "redstone", RGB 80, 255, 255, center player, id "%player%", rainbowMode true, randomRotation arg-1, animated arg-2, radius 1, ringCount 4, ringDensity 10, visibleRange 32, pulseDelay 2

 

SKDRAGON 1.0 EFFECTS
drawLine particle %particlename%[, material %itemstack%][, speed %number%][, ([offset]XYZ|RGB) %number%, %number%, %number%], center %entity/location%[, target %entity/location%], id %string%[, onlyFor %players%][, r[ainbow]M[ode] %boolean%][, solid %boolean%][, density %number%][, length %-number%][, zigZag count %number%, height %number%], visibleRange %number%[, dis[placement]XYZ %number%, %number%, %number%][, pulseDelay %number%]

drawLine particle redstone, center player, target location of target block, id "%player%", rainbowMode true, solid true, density 5, length 6, zigZag count 0, height 0, visibleRange 32, displacementXYZ 0, 1, 0, pulseDelay 1

drawLine particle redstone, center player, id "%player%", rainbowMode true, solid true, density 5, length 6, zigZag count 0, height 0, visibleRange 32, displacementXYZ 0, 1, 0, pulseDelay 1

drawLine particle redstone, center player, target location of target block, id "%player%", rainbowMode true, solid true, density 10, length 0, zigZag count 1, height 0, visibleRange 32, displacementXYZ 0, 1, 0, pulseDelay 1

Les "Halos" permettent uniquement de faire Spawn des particules sur la tête du joueur. Pour les autres, déjà testés mais ça répond pas à ma question de tracer un cercle autour du joueur avec des "drawLine". Je pense qu'il faut utiliser une formule mathématique pour tracer un cercle :/

  • 0
Posté(e)

Voici les deux algorithmes si tu les veux ils ne demandent aucun add-ons, on travaille uniquement avec les coordonnées X,Y et Z du centre et le rayon R.

function bresenham(radius:number,location:location,world:world) :: locations:
 set {_x} to 0
 set {_z} to {_radius}
 set {_m} to 5-4*{_radius}
 while {_x} <= {_z}:
   add location {_x}+x-location of {_location}, y-location of {_location}-1, {_z}+z-location of {_location} of {_world} to {_locations::*}
   add location {_z}+x-location of {_location}, y-location of {_location}-1, {_x}+z-location of {_location} of {_world} to {_locations::*}
   add location -1*{_x}+x-location of {_location}, y-location of {_location}-1, {_z}+z-location of {_location} of {_world} to {_locations::*}
   add location -1*{_z}+x-location of {_location}, y-location of {_location}-1, {_x}+z-location of {_location} of {_world} to {_locations::*}
   add location {_x}+x-location of {_location}, y-location of {_location}-1, -1*{_z}+z-location of {_location} of {_world} to {_locations::*}
   add location {_z}+x-location of {_location}, y-location of {_location}-1, -1*{_x}+z-location of {_location} of {_world} to {_locations::*}
   add location -1*{_x}+x-location of {_location}, y-location of {_location}-1, -1*{_z}+z-location of {_location} of {_world} to {_locations::*}
   add location -1*{_z}+x-location of {_location}, y-location of {_location}-1, -1*{_x}+z-location of {_location} of {_world} to {_locations::*}
   if {_m} > 0:
     remove 1 from {_z}
     set {_m} to {_m}-8*{_z}
   add 1 to {_x}
   set {_m} to {_m}+8*{_x}+4
 return {_locations::*}

function andres(radius:number,location:location,world:world) :: locations:
 set {_x} to 0
 set {_z} to {_radius}
 set {_d} to {_radius}-1
 while {_z} >= {_x}:
   add location x-location of {_location}+{_x}, y-location of {_location}-1, z-location of {_location}+{_z} of {_world} to {_locations::*}
   add location x-location of {_location}+{_z}, y-location of {_location}-1, z-location of {_location}+{_x} of {_world} to {_locations::*}
   add location x-location of {_location}-{_x}, y-location of {_location}-1, z-location of {_location}+{_z} of {_world} to {_locations::*}
   add location x-location of {_location}-{_z}, y-location of {_location}-1, z-location of {_location}+{_x} of {_world} to {_locations::*}
   add location x-location of {_location}+{_x}, y-location of {_location}-1, z-location of {_location}-{_z} of {_world} to {_locations::*}
   add location x-location of {_location}+{_z}, y-location of {_location}-1, z-location of {_location}-{_x} of {_world} to {_locations::*}
   add location x-location of {_location}-{_x}, y-location of {_location}-1, z-location of {_location}-{_z} of {_world} to {_locations::*}
   add location x-location of {_location}-{_z}, y-location of {_location}-1, z-location of {_location}-{_x} of {_world} to {_locations::*}
   if {_d} >= 2*{_x}:
     set {_d} to {_d}-2*{_x}-1
     add 1 to {_x}
   else if {_d} < 2*({_radius}-{_z}):
     set {_d} to {_d}+2*{_z}-1
     remove 1 from {_z}
   else:
     set {_d} to {_d}+2*({_z}-{_x}-1)
     remove 1 from {_z}
     add 1 to {_x}
 return {_locations::*}

  • 0
Posté(e)

Et du coup je dois rajouter mon:

drawLine particle flame, center {_location} , id "1", solid true, density 20, length 6, zigZag count 0, height 5, visibleRange 32, displacementXYZ 0, 0.1, 0, pulseDelay 0

 

dans le code ? Car j'ai testé de le mettre à la fin des "add location" mais ça ne marche pas :/

  • 0
Posté(e)

Essaie ca:

loop andres(1,location of block at player,world):
 drawLine particle flame, center loop-value, id "1", solid true, density 20, length 1, zigZag count 0, height 1, visibleRange 32, displacementXYZ 0, 0.1, 0, pulseDelay 0

Ou:

loop bresenham(1,location of block at player,world):
 drawLine particle flame, center loop-value, id "1", solid true, density 20, length 1, zigZag count 0, height 1, visibleRange 32, displacementXYZ 0, 0.1, 0, pulseDelay 0

Invité
Ce sujet ne peut plus recevoir de nouvelles réponses.
×
×
  • 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.