#I’m making a basketball game
1 messages · Page 1 of 1 (latest)
Get distance > If > greater than (whatever distance)
Make the origin the basketball hoop
Can I make the distance a invisible collision cause what if your in the corner @sly pebble
Wdym?
A distance chip checks how far away you are
I mean, you’d be further yes but it wouldn’t change the points at all
How will I know the distance from the goal
it would test your distance from the hoop and if it’s greater than 7 or whatever than you’d get 3 points
So do I connect the int variable or the 2 points to a if chip
I’ll send a pic or ill lyk if it works
Place down a “get distance” chip (I think that’s what it’s called) and then place down an “if” chip. Then place down a “greater than or equal to chip) and wire the bool to the if chip, then wire the top number on the greater than or equal to chip the distance, and the bottom number how far you want it to be for 3 points
And you could theoretically be 1000 meters away and still get 3 points from scoring if you somehow scored from that far
Im in class right now
Ok try that
So when I connect bool to if what do I do after that
The orange thing is the bool?
Right
Ima connect the bool that adds the 2 pointer the output side to the if chip?
Orange is execute
Red is bool
Bool is true/false
So when they score into the hoop, wire to test their distance between them and the hoop and if it’s greater than (whatever) then give them 3 points
I mean wym wire to measure it
@sly pebble
Wire it so when the basketball enters the trigger volume, it sends a signal to an “if” chip, and that chip will be connected to the “greater than or equals to” chip via bool, and that one will have the top left port connected to the “distance” port on the “distance” chip and the button left will be however far the 3 pointer should be, and then the “then” port on the “if” should be connected to the int that gives 3
Wire the then to the Int variable
And then I’m assuming you are only going to have one ball per game right
What’s a shoot around
You just shoot around until the game starts
There like multiple balls you can shoot
But the circuits I have they keep track of it with any ball
It just doesn’t add 3 from the 3 point line
Oh ok, try this: place down “get local player” and put that on the “distance” chip. Then place down a “get position” and wire that to the trigger volume and then wire the other side to the other port on the distance circuit
Which one on the distance
Doesn’t matter it’s just checking the length between two points
Now when I score it’s just counting 3
What’s the other distance port say
If it says 0 that means you have to be at least 0 meters away from the hoop
So you would always make a 3 pointer
So adjust the bottom number to be at 3 point distance
The greater than or equal to make that number bigger and then try
It works now when I shoot a 3 it adds 3 but when I shoot a 2 it doesn’t add nothing
Ok then on the “else” port of the if make it test your distance again and then give you two points if your within 2 point distance
, and then on the else port of that just give 1 point
wouldn't this causes issues unless the player would be forced into a stand still?
what if the player decides to move back if the player scores from a 2 point?
Oh yeah, I mean you could test when they drop it and then save their position as a variable