Location of player + 2 to right

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

MrNygus

Active Member
Jan 28, 2017
116
2
18
Hi,

set {_loc33} to location of the block 1 behind {_p}

And when I look down or up this position is on my location :emoji_frowning:
I want position of my body not my head.
 
Last edited:
Add "horizontally" so it doesn't count your pitch (up/down looking):

code_language.skript:
set {_loc33} to location of the block 1 horizontally behind {_p}
 
Add "horizontally" so it doesn't count your pitch (up/down looking):

code_language.skript:
set {_loc33} to location of the block 1 horizontally behind {_p}

what with right?
code_language.skript:
set {_loc44} to location of the block 1 horizontally right of {_loc33}
doesnt work

+ when zombie ride armostand I can't teleport it to this position

code_language.skript:
        spawn an zombie at {_loc22}
        set {_zombie} to last spawned entity
        make {_zombie} ride {_target2}
        teleport {_target2} to location of the block 1 horizontally forward {_target4}
 
Last edited by a moderator:
what with right?
code_language.skript:
set {_loc44} to location of the block 1 horizontally right of {_loc33}
doesnt work

+ when zombie ride armostand I can't teleport it to this position

code_language.skript:
        spawn an zombie at {_loc22}
        set {_zombie} to last spawned entity
        make {_zombie} ride {_target2}
        teleport {_target2} to location of the block 1 horizontally forward {_target4}

Can you post your full code?
 
I can't, too own script to share ;/ The most important code is share :emoji_stuck_out_tongue:
 
set {_loc44} to location of the block 1 right {_loc33}
spawn an armor stand at {_loc44}
set {_target4} to last spawned entity
 
set {_loc44} to location of the block 1 right {_loc33}
spawn an armor stand at {_loc44}
set {_target4} to last spawned entity

That is just a small example of your code:

code_language.skript:
command /test:
    trigger:
        set {_loc} to location of player
        set {_loc-1} to location of the block 1 right {_loc}
        spawn an armor stand at {_loc-1}
        set {_target-1} to last spawned entity
        spawn an zombie at {_loc-1}
        set {_target-2} to last spawned entity
        make {_target-2} ride {_target-1}
        teleport {_target-2} to location of the block 1 horizontally forward {_target-1}
        make {_target-2} ride {_target-1}
So , i have tested it. The teleport make the entity stop riding the second one , so just make the entity ride the armor stand one more time after the teleport and you have fixed it.
 
I looping this every 2 ticks so...
Zombie is teleported every ~3 seconds and no ride armor stand:/ hmm maybe change teleport to push?
 
I looping this every 2 ticks so...
Zombie is teleported every ~3 seconds and no ride armor stand:/ hmm maybe change teleport to push?

Push should work well , but i suggest to don't use periodical events to spawn custom entities.
 
set {_postarget3} to location of the block 1 horizontally behind {_p}
push {_target3} to {_postarget3}

Can't understand this condition/effect: push {_target3} to {_postarget3} (car2.sk, line 68: push {_target3} to {_postarget3}')
 
set {_postarget3} to location of the block 1 horizontally behind {_p}
push {_target3} to {_postarget3}

Can't understand this condition/effect: push {_target3} to {_postarget3} (car2.sk, line 68: push {_target3} to {_postarget3}')

code_language.skript:
push {_target3} from {_postarget3} at speed 0.5
 
Can't understand this condition/effect: push {_target3} from {_postarget3} at speed 0.5 (car2.sk, line 68: push {_target3} from {_postarget3} at speed 0.5')
 
Can't understand this condition/effect: push {_target3} from {_postarget3} at speed 0.5 (car2.sk, line 68: push {_target3} from {_postarget3} at speed 0.5')
My bad , try to remove the speed.
 
teleport is better but... I want teleprort armorstand with passanger every 2 tick, how to do this :/
8jj4aqqa63b3.jpg
 
I have:


code_language.skript:
while vehicle of {_p} is {_target}:
            wait 1 tick (without this line is crash)
           ...
           teleport {_target3} to location of the block 1 horizontally behind {_p}
           ...
           make {_zombie} ride {_target2}
 
I have:


code_language.skript:
while vehicle of {_p} is {_target}:
            wait 1 tick (without this line is crash)
           ...
           teleport {_target3} to location of the block 1 horizontally behind {_p}
           ...
           make {_zombie} ride {_target2}

So , what is now the problem?
 
That's same xd Zombie... ;P I send you my code, check it please :emoji_stuck_out_tongue:
 
Last edited by a moderator:
Status
Not open for further replies.