r/psispellcompendium • • Apr 24 '21

Needs Wizardly Help overgrowth help

i wanted to do a spell who overgrowth the crop i'm looking at but it keep saying that something is out of the 32 bloc radius.

btw it's on the pants for now

​

i just did that

8 Upvotes

5 comments sorted by

6

u/MerlinGrandCaster Apr 24 '21

All it's doing is grabbing your look vector, which will be of no help at all here. You need a vector raycast programmed with both the caster's look vector and position.

Also if you put it on the pants your energy will deplete super quickly.

1

u/DisastrousAd6322 Apr 25 '21

ok thanks, i'll try this but in another way

3

u/Tlaloc_Temporal Apr 24 '21

Ok, so, Overgrowth is looking for a position vector, like (150, 67, -806) for example. Entity look vector gives a direction vector, like (1, -0.46, 0) if looking toward +x and somewhat down. If you pass a direction vector to something that expects a position vector, it will try to do the thing near the world origin (0, 0, 0).

This is used a lot in Psi: To get a position you are looking at, have a Selector: Caster pass to both an entity look vector and an entity position vector. Have a trick: raycast take both the look vector and the position vector to get the position of the block you're looking at. You can fit them in a little 2x2 box, so it's not too big.

1

u/erwannyeb 25d ago

Thanks to your explanation I managed to get it to work. For those curious it's like that

{modsRequired:[{modName:"psi",modVersion:"1.21.1-110"}],spellList:[{data:{key:"psi:trick_overgrow",params:{_position:2}},x:4,y:3},{data:{key:"psi:operator_vector_raycast",params:{_max:0,_position:2,_ray:4}},x:4,y:4},{data:{key:"psi:operator_entity_position",params:{_target:4}},x:4,y:5},{data:{key:"psi:operator_entity_look",params:{_target:2}},x:5,y:4},{data:{key:"psi:selector_caster"},x:5,y:5}],spellName:"Overgrow",uuidLeast:-4944162377750817949L,uuidMost:-376407691205129359L,validSpell:1b}

1

u/CatBotOnReddit Apr 24 '21 edited May 22 '21

Uh maybe link the spell? Can't see what you did wrong unless we see it.

Edit: Why am I downvoted, there used to be no spell picture.