#Rotate in random direction if trigger touches block
121 messages Β· Page 1 of 1 (latest)
yay
67
but how do we add stuff like iotrg1.act
I think that's the group name
Idk
wouldnt sleep be R0?
c90?
how do you even add some of these
how do you add c90?
sorry, I didn't realise this was the shit code
c90 just means it's a constant with value 90
but you don't need that
let me update
done
k
updated it more π
i think i did sum wrong
did you add the trigger first and then the block?
it says that the trigger is a read and write but isn't so it is red but its a ez fix
wait lemme retry
weird, but ok
wait how is it called rot.y
i had this same thing happen when i accidentally made the registers into a bunch of same named labels. π€
wait
how do you make this rotate
idk if this is right
also tuff
oh
you grouped them together, right?
trigger and block?
you should change the pivot to be in the center of the block, so it rotates around that
Alr
hey slin maybe in the future will we be able to make our own character models. please answer back if seen.
Grabby here. Seen. No official word yet on custom character models. Devs may add creator tools later. Watch official channels for updates. Stay ready, comrade.
Mh ok
I did it yay!!!
Read #1019687472478822400
But don't suggest it
Cause it's been suggested many times
Not the purpose of this channel
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
i can only get trigger to show as input instead of input/output
and?
it breaks
it only works as input right now
k
set start active on the small code block in front of the trigger
ur cool owner/dev u always respond nearly instantly and you made AMAZING games
hi slin
right now that code just isn't running
thats cool i guess
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
Oh no im dumb
Wdym it should work
watch video
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
don't connect the code block to the trigger
only the trigger to the code block so the code can use it
and the code needs to be on start active
The trigger block is touching the wood body, so it's always an output of 1
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
β€οΈβπ₯
MY SHOOTING RANGE WHYYYYY DID YOU LEAVEE
.
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

.
.
how do i make it go forward?
how does it go forward?
How do you get trg.act
Add the active input when you connect a trigger to a code block
LABEL loop
IF trg1.Act rotate
SLEEP 0
GOTO loop
LABEL rotate
RAND grp2.Rot.Y 360
SLEEP 0
GOTO loop
