Skocz do zawartości
  • 0

Naprawa vector oraz ruchu moba


Pytanie

Witam, poprawi mi ktoś kod? Entity nie powinno zmienić y tylko x z i powinno być pushowane przez kilka tam sekund.

command /kon:
	trigger:
		spawn adult horse 50 meter backwards player
		set {_e} to last spawned horse
		set gravity of {_e} to off
		wait 1 real seconds
		set the name of last spawned horse to "&4[&6&lApollo&4]"
		tame {_e} to the player
		equip last spawned horse with diamond horse armor and saddle
		make player ride {_e}
		wait 2 real seconds
		if player's vehicle is {_e}:
			push {_e} upwards with speed 10
			set gravity of {_e} to off
			wait 2 seconds
			loop 10 times:
				wait 1 real second
				set {_vector} to vector from location of {_e} to location of player's target block
				set y of {_vector} to 0
				wait 1 second
				set velocity of {_e} to {_vector}

 

Odnośnik do komentarza
https://skript.pl/temat/37363-naprawa-vector-oraz-ruchu-moba/
Udostępnij na innych stronach

2 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Już naprawiłem 

command /kon:
	trigger:
		remove 10 diamonds from player's inventory
		spawn adult horse 30 meter backwards player
		set {_e} to last spawned horse
		set gravity of {_e} to off
		wait 1 real seconds
		set the name of last spawned horse to "&4[&6&lApollo&4]"
		tame {_e} to the player
		equip last spawned horse with diamond horse armor and saddle
		make player ride {_e}
		wait 1 second
		if player's vehicle is {_e}:
			push {_e} downwards with speed 0.2
			set gravity of {_e} to off
			if player's inventory contain 5 diamonds:
				remove 5 diamonds from player's inventory
				loop 100 times:
					wait 1 second
					set {_vector} to vector from location of {_e} to location of player's target 
					set y of {_vector} to 0
					set velocity of {_e} to {_vector}
					make {_e} pathfind to {_vector} at speed 0.9
					remove 5 diamonds from player's inventory
					wait 1 seconds
					if player's inventory does not contain 5 diamonds:
						kill {_e}
						stop
			else if player's inventory does not contain 5 diamonds:
				kill {_e}

Tera help mi w tym. Pojazd (Koń) powinien sam się poruszać do przodu (tam gdzie kamera gracza jest skierowana) przez kilka sekund.

EDIT : w 100% to nie działa do końca. zmieniam kod.

Edytowane przez Misio12320
Odnośnik do komentarza
https://skript.pl/temat/37363-naprawa-vector-oraz-ruchu-moba/#findComment-237779
Udostępnij na innych stronach

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Nieaktywny
Odpowiedz na pytanie...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

  • Ostatnio przeglądający   0 użytkowników

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