Motion & Falling Blocks

  • 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 comminuty!

    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.

AsuDev

VIP
Jan 27, 2017
241
22
18
24
United States
How can I set the motion for entities? For example, I'm making a spell and instead of using "set block" I'm using falling block entities and I want to know how I can set the motion for them.

I've been using "spawn falling block of dirt at location of loop-block" and also
"spawn "falling dirt" parsed as an entity type at location of loop-block"

Is it possible to set the motion for either of these or would I have to do something different?
 
Can you write an example for this? What I'm trying to accomplish is a falling block to stay in the air or be on the floor but also still be an entity and not a block.
 
Okay, now how do I delete the falling blocks after? I have this but it does not kill them.

command /testr:
trigger:
set {_loc} to location of block 4 blocks infront of player
set {_loc} to location of block 2 blocks above {_loc}
loop all blocks in radius 2 of {_loc}:
spawn falling block of sandstone at location of loop-block
set {_c} to last spawned entity
set gravity of {_c} to false
add {_c} to {_entities::*}
wait 2 seconds
loop {_entities::*}:
kill loop-value

They are still there even after I killed them...
 
Status
Not open for further replies.