Skocz do zawartości
  • 0

Fajerwerki


Cinu2421

Pytanie

7 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
2 godziny temu, Cinu2421 napisał:

launch flickering ball firework coloured purple and red fading to pink at location of event-block timed 0

Jak ustawic aby fajerwerka wybuchala za kazdym razem na jednej wysokosci z tym efektem lecacej rakiety?

Albo jak wykryc eksplozje fajerwerki?

Do wykrywania eksplozji fajerwerki służy event 'on firework explode'. Przykład:

on firework explosion coloured light red, green and blue:
    broadcast "Boom!"

 

Edytowane przez Kormic
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
13 minut temu, Kormic napisał:

Do wykrywania eksplozji fajerwerki służy event 'on firework explode'. Przykład:


on firework explosion coloured light red, green and blue:
    broadcast "Boom!"

 

Hmmm, mam cos takiego wiesz jak to polaczyc aby po wybuchu droply tam te przedmioty?

on place player head:
    name of player's tool is "%{Bursztynowa}%":
        cancel event
        remove 1 of event-item from player's inventory
        pop ball firework colored black at location of event-block
        wait 1 seconds
        loop {Bursztyn.items::*}:
            if loop-value is not air:
                chance of {Bursztun.szansa::%loop-index%}%:
                    if {Bursztun.Ilosc::%loop-index%} is not set:
                        drop 1 of loop-value at location of event-block
                    else:
                        set {_a} to random integer between 1 and {Bursztun.Ilosc::%loop-index%}
                        drop {_a} of loop-value at location of event-block

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
5 minut temu, Cinu2421 napisał:

Hmmm, mam cos takiego wiesz jak to polaczyc aby po wybuchu droply tam te przedmioty?


on place player head:
    name of player's tool is "%{Bursztynowa}%":
        cancel event
        remove 1 of event-item from player's inventory
        pop ball firework colored black at location of event-block
        wait 1 seconds
        loop {Bursztyn.items::*}:
            if loop-value is not air:
                chance of {Bursztun.szansa::%loop-index%}%:
                    if {Bursztun.Ilosc::%loop-index%} is not set:
                        drop 1 of loop-value at location of event-block
                    else:
                        set {_a} to random integer between 1 and {Bursztun.Ilosc::%loop-index%}
                        drop {_a} of loop-value at location of event-block

 

Masz na myśli coś takiego, tak? Musiałem nieco przerobić skrypt, aby zmienne ustawiały się przed tą eksplozją.

on place player head:
	name of player's tool is "%{Bursztynowa}%":
		cancel event
		remove 1 of event-item from player's inventory
		loop {Bursztyn.items::*}:
			if loop-value is air:
				continue
			chance of {Bursztun.szansa::%loop-index%}%:
				if {Bursztun.Ilosc::%loop-index%} is not set:
					set {fajerwerki::ilosc} to 1
				else:
					set {_a} to random integer between 1 and {Bursztun.Ilosc::%loop-index%}
					set {fajerwerki::ilosc} to {_a}
				set {fajerwerki::item} to loop-value
				set {fajerwerki::loc} to event-location
		wait 1 second			
		pop ball firework colored black at location of event-block
					
on firework explode colored black:
	if distance between {fajerwerki::loc} and event-location is greater than 1:
		stop
	drop {fajerwerki::ilosc} of {fajerwerki::item} at event-location
	clear {fajerwerki::*}

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
    name of player's tool is "%{Bursztynowa}%":
        cancel event
        remove 1 of event-item from player's inventory
        set {_x} to location of event-block
        add 10 to y-loc of {_x}
        pop ball firework colored black at location of {_x}
        send "%last spawned entity%"
        wait 0.5 seconds
        loop {Bursztyn.items::*}:
            if loop-value is not air:
                chance of {Bursztun.szansa::%loop-index%}%:
                    if {Bursztun.Ilosc::%loop-index%} is not set:
                        drop 1 of loop-value at location of {_x}
                    else:
                        set {_a} to random integer between 1 and {Bursztun.Ilosc::%loop-index%}
                        drop {_a} of loop-value at location of {_x}

Dalem tak narazie musi mi wystarczyc :(

 

Edytowane przez Cinu2421
Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...