#Nothing gets printed

1 messages · Page 1 of 1 (latest)

gray marlin
#

Nothing gets printed because of either you not pressing the buttons, the code being executed in the wrong place, or not running

vital snow
#

im pressing the buttons

#

its in update

stoic laurel
#

send the whole file imo

gray marlin
#

Is the script running?

gray marlin
vital snow
stoic laurel
#

also what is the script attached to?

#

maybe its attached to a gameobject which isnt active or smth

vital snow
#

i have other abilities on it that work fine

gray marlin
#

You don't need to send the whole file. Show the object with this script attached.

vital snow
#

clearly active

stoic laurel
#

why are those checkboxes not checked?

vital snow
#

i check then on the canvas

gray marlin
#

Alright, is the Update method being called?

vital snow
#

ues

gray marlin
vital snow
#

waitimma try somethin

stoic laurel
#

btw this is a bit of a redundant question, but why do you serialize the player object, on the player object?

gray marlin
stoic laurel
vital snow
#

oh

#

transform things

#

also

#

why not

#

yeah yeah i can do this.transform

gray marlin
vital snow
#

but wheres the fun i nthat

vital snow
stoic laurel
#

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

gray marlin
vital snow
#

what is with you and the word redundant

gray marlin
stoic laurel
#

that too.

#

anyhow

#

back on the main problem

gray marlin
vital snow
#

no

#

curious

stoic laurel
#

or useless

gray marlin
#

That's the word I found suitable to use.

vital snow
#

fair enough

stoic laurel
#

as a sanity check

vital snow
#

update works

gray marlin
#

Have you printed something at the start of it, or are you just sure there is no way your Update won't work?

vital snow
#

there's a separate code there

gray marlin
#

Anyway, please, send the full Update method using a site for sharing your code

vital snow
#

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

gray marlin
#

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

vital snow
vital snow
#

ohhhh

#

i accidentlly put the time script in the water function

#

whoops

gray marlin
#

And I asked you to use a specific code site

#

!code

tawdry vaporBOT
vital snow
gray marlin
#

Well, yeah, I have edited its 2nd part

vital snow
#

issue solved

gray marlin
#

Alright

vital snow