#Nothing gets printed
1 messages · Page 1 of 1 (latest)
Nothing gets printed because of either you not pressing the buttons, the code being executed in the wrong place, or not running
send the whole file imo
Is the script running?
It's redundant.
one sec
also what is the script attached to?
maybe its attached to a gameobject which isnt active or smth
You don't need to send the whole file. Show the object with this script attached.
why are those checkboxes not checked?
i check then on the canvas
Alright, is the Update method being called?
ues
Why should they?
waitimma try somethin
I thought those checkboxes are meant for like, if they're enabled or not yknow
btw this is a bit of a redundant question, but why do you serialize the player object, on the player object?
Well, yeah, let's just not blind-guess
i just asked why they're not checked just in case
honestly i forgor
oh
transform things
also
why not
yeah yeah i can do this.transform
Why not?
but wheres the fun i nthat
exactly
well there's nothing wrong with doing it, its just that instead of typing player.transform.position you can type transform.position, you dont even need this.transform.position
anyhow
Yeah, you can also simplify it to transform, this is redundant.
what is with you and the word redundant
In the case, when player isn't the gameObject, it's usually better to make it Transform, in order to access its position directly
Does it perhaps trouble you?
lets just use trivial xd
or useless
That's the word I found suitable to use.
fair enough
try to put a normal check in Update where, on a button press, smth gets printed
as a sanity check
update works
Alright, so the Update method is called, you say
Have you printed something at the start of it, or are you just sure there is no way your Update won't work?
there's a separate code there
Anyway, please, send the full Update method using a site for sharing your code
it works fine
t doesnt interact with any other code
{
if (Player.transform.position.y < -0.5f)
{
Player.transform.position = Spawn;
}
_hInput = Input.GetAxis("Horizontal") * MoveSpeed;
_vInput = Input.GetAxis("Vertical") * MoveSpeed;
this.transform.Translate(Vector3.right * _hInput * Time.deltaTime);
this.transform.Translate(Vector3.forward * _vInput * Time.deltaTime);
if (Checked == true && Input.GetKeyDown(KeyCode.Space))
{
_rb.AddForce(transform.up * 10 * 35);
}
Mudball.velocity = transform.TransformDirection(Vector3.forward * 15);
WaterBolt.velocity = transform.TransformDirection(Vector3.forward * 15);
}```
wait
I don't think this is the full code
Surprisingly, I don't see the part of the code you sent in your initial question
i asked you to hold on
ohhhh
i accidentlly put the time script in the water function
whoops
📃 Large Code Blocks
Use links to services like:
https://gdl.space/, https://paste.ofcode.org/, https://hatebin.com/, https://paste.myst.rs/, https://hastebin.com/
📃 Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
i didnt see that message
Well, yeah, I have edited its 2nd part
issue solved

