#Rotate in random direction if trigger touches block

121 messages Β· Page 1 of 1 (latest)

balmy coyote
#
LABEL loop
IF trg1.Act rotate
SLEEP 0
GOTO loop
LABEL rotate
RAND grp2.Rot.Y 360
SLEEP 0
GOTO loop

takes trigger.active as first connection and object.rotation.y as second

errant bramble
#

yay

wet oasis
#

so it connects to the trigger?

#

with y rotation

#

lemme try

quartz thorn
#

67

wet oasis
#

but how do we add stuff like iotrg1.act

quartz thorn
#

Idk

wet oasis
#

idk either

#

ok

wet oasis
#

c90?

#

how do you even add some of these

#

how do you add c90?

balmy coyote
#

c90 just means it's a constant with value 90

#

but you don't need that

#

let me update

#

done

wet oasis
#

k

balmy coyote
#

updated it more πŸ˜„

wet oasis
#

i think i did sum wrong

balmy coyote
#

did you add the trigger first and then the block?

wet oasis
#

ye

#

wait

indigo torrent
#

it says that the trigger is a read and write but isn't so it is red but its a ez fix

wet oasis
#

wait lemme retry

indigo torrent
balmy coyote
#

weird, but ok

wet oasis
#

wait how is it called rot.y

bronze violet
# indigo torrent

i had this same thing happen when i accidentally made the registers into a bunch of same named labels. πŸ€”

wet oasis
#

wait

chrome hazel
#

how do you make this rotate

wet oasis
#

make the label rotate

#

the second label

chrome hazel
#

idk if this is right

severe garnet
#

also tuff

chrome hazel
#

oh

wet oasis
#

like this?

balmy coyote
#

trigger and block?

#

you should change the pivot to be in the center of the block, so it rotates around that

wet oasis
#

Alr

quartz thorn
#

nvm

obsidian crypt
sage wadiBOT
obsidian crypt
#

Mh ok

junior cliff
#

I did it yay!!!

quartz thorn
#

But don't suggest it

#

Cause it's been suggested many times

compact iron
willow remnant
#

I'm trying to moke something move forward and when it hits a wall it rotates

#

It used to rotate and now it doesn't after I use this code

#

Now it just goes threw walls

smoky wave
smoky wave
balmy coyote
#

and?

smoky wave
#

it breaks

balmy coyote
#

it only works as input right now

smoky wave
#

k

balmy coyote
# smoky wave

set start active on the small code block in front of the trigger

smoky wave
queen imp
#

hi slin

balmy coyote
#

right now that code just isn't running

queen imp
#

hows you're day?

#

did you do anything fun this week?

balmy coyote
#

bug fixing

#

not that fun

queen imp
#

thats cool i guess

smoky wave
#

yeah that just happens in game development

#

i suck ad scripting and modeling

#

only animating for game development

#

can u fix it i need it

tough apex
#

Oh no im dumb

tough apex
smoky wave
#

watch video

tough apex
#

Send me the code you put in

#

You mightve missed something

#

Or set something wrong

smoky wave
#

LABEL loop
MUL R2 DeltaTime 2
SIN R0 grp1.Rot.Y
COS R1 grp1.Rot.Y
MUL R0 R0 R2
MUL R1 R1 R2
ADD grp1.Pos.X grp1.Pos.X R0
ADD grp1.Pos.Z grp1.Pos.Z R1
SLEEP 0
GOTO loop

#

forwards then rotate

#

here

#

LABEL loop
IF trg1.Act rotate
SLEEP 0
GOTO loop
LABEL rotate
RAND grp2.Rot.Y 360
SLEEP 0
GOTO loop

balmy coyote
#

only the trigger to the code block so the code can use it

#

and the code needs to be on start active

robust root
# smoky wave

The trigger block is touching the wood body, so it's always an output of 1

smoky wave
#

oh

#

TYSM

vernal timber
tough apex
#

LABEL Label0
COS R0 grp1.Rot.Y
SIN R1 grp1.Rot.Y
MUL R0 R0 -5
MUL R1 R1 -5
MUL R0 R0 DeltaTime
MUL R1 R1 DeltaTime
ADD grp1.Pos.X grp1.Pos.X R1
ADD grp1.Pos.Z grp1.Pos.Z R0
SLEEP 0
IF trg2.Act Label1
GOTO Label0
LABEL Label1
RAND grp1.Rot.Y 360
GOTO Label0

void bloom
#

❀️‍πŸ”₯

smoky wave
void bloom
#

uh o

#

I got tired of coding and my headset was at 1

smoky wave
#

oh

#

its ok then

smoky wave
tough apex
#

Inspired by slins idea and leak in #πŸ‘¨πŸ’»grab-development

#

Randomly rotates left or right until it hits that long wide trigger

#

Bit more too it but thats the basic premise. Made it yesterday or the day prior

weak star
weak star
#

.

surreal hollow
#

.

lone verge
near sierra
#

how do i make it go forward?

near sierra
#

how does it go forward?

radiant temple
#

How do you get trg.act

quartz thorn
cosmic oracle
#
LABEL loop
IF trg1.Act rotate
SLEEP 0
GOTO loop
LABEL rotate
RAND grp2.Rot.Y 360
SLEEP 0
GOTO loop