#Basically, I want to make it so all entities that are not player get pushed in direction away from

1 messages · Page 1 of 1 (latest)

delicate jasper
#

the location

on right click with a stone axe:
    push player upwards at speed 0.5
    wait 0.6 second
    set {_loc} to location of player
    loop 15 times:
        set {_radius} to loop-value * 0.5
        set {_shape} to circle with radius {_radius}
        set particle of {_shape} to smoke
        draw the shape of {_shape} at {_loc}
        loop all entities in radius {_radius} around {_loc}:
            if loop-entity is not player:
                set {_direction} to vector from {_loc} to location of loop-entity
                set {_direction} to ({_direction} * -1)
                push loop-entity in {_direction} at speed 1
                damage loop-entity by 5 hearts
        wait 1 tick

there is an error on the push line it does not like that line

hollow cipher
#

push <entity> <vector> at speed <speed>

#

why are you multiplying the vector by -1

#

if you want it to be in the opposite direction just chnage the order of the locations when you first make the vector

#

vector from {_loc} to loop-entity -> vector from loop-entity to {_loc}

delicate jasper
delicate jasper
#

oh my gosh rage ur smart

#

well kinda this is what i got

on right click with a stone axe:
    push player upwards at speed 0.5
    wait 0.6 second
    set {_loc} to location of player
    loop 15 times:
        set {_radius} to loop-value * 0.5
        set {_shape} to circle with radius {_radius}
        set particle of {_shape} to smoke
        draw the shape of {_shape} at {_loc}
        loop all entities in radius {_radius} around {_loc}:
            if loop-entity is not player:
                set {_direction} to vector from loop-entity to {_loc}
                push loop-entity {_direction} at speed 1
                damage loop-entity by 5 hearts
        wait 1 tick

and it l ike bounces back and fourth between center and stuff

#

its weird

wispy wagon
# delicate jasper

you wrote vector from loop-entity to {_loc}, making the vector point from the entity to the player

#

just swap loop-entity and {_loc} and it should go the opposite direction