#show me what components are on the

1 messages · Page 1 of 1 (latest)

viral crater
fathom ibex
#

There is more

#

Maybe

cinder ibex
#

please show all of the components on the prefab

fathom ibex
#

Oh yeah there is more GO

viral crater
#

oh lol I cut it off

#

well here it is

cinder ibex
#

and the other objects that are part of the prefab?

viral crater
#

The other pipe is the same

#

then the scoreadder

fathom ibex
#

And the parent?

viral crater
#

it's the prefab

fathom ibex
#

It can have components on it

cinder ibex
# viral crater

why would the spawnerscore object need a rigidbody and scroll script

viral crater
#

No it adds points

fathom ibex
viral crater
#

ye

#

Its a flappy birb game

cinder ibex
viral crater
#

without those it wouldn't move

runic ridge
#

why does it need to move?

cinder ibex
viral crater
#

yes

#

is that wrong

cinder ibex
#

remove the rb and scroll script from all of the pipes and put those on the root gameobject

fathom ibex
#

Ok but what does the base of the prefab have for components

viral crater
#

oh ok

fathom ibex
#

It has at least a transform

viral crater
#

yes

#

at 0 0 0

fathom ibex
#

Send screenshot please

viral crater
#

now I moved the rb and scripts to it

fathom ibex
#

Ok send the screenshot, please

viral crater
fathom ibex
#

Cool

cinder ibex
#

now put this in your SpawnObject method of the spawner script:
Debug.Log($"Spawning object from {name} - {GetInstanceID()}, time between: {timeToSapwn}"); and show what all it prints

fathom ibex
#

Alroght what is spawning your object

viral crater
cinder ibex
#

and you're still seeing thousands of pipes spawn every second?

viral crater
#

no

cinder ibex
#

then wtf are we doing?

viral crater
#

not after I moved the scripts to the prefab

#

but the speed doesn't increse

cinder ibex
#

show the PipeScroll script

viral crater
cinder ibex
#

that's the pipe spawning one

viral crater
#

oh sorry

#

is there a way to convert double to float?

#

because I think that will fix it

cinder ibex
#

why are you using double in the first place? just use float

cinder ibex
viral crater
#

but when I do this happens

#

syntax

#

0.1 is a double

cinder ibex
#

yes because 0.1 is a double. f is for float

viral crater
#

oh ok

cinder ibex
#

you're literally using a float literal 2 lines directly above

viral crater
#

I'll test

fathom ibex
viral crater
#

which is prob why it went so badly lol

cinder ibex
# viral crater I'll test

making that change would not have changed literally anything though unless the issue was a compile error (which it clearly was not since you entered playmode before)

viral crater
#

Yep it works

fathom ibex
viral crater
#

basically

#

Thank you so much for your help!! catto

cinder ibex
#

i wanna know what you really changed to make it work. because changing the variable type from double to float would not have changed anything about the behavior

viral crater
#

no it was also the prefab

#

because I was getting the prefab as the component when it didn't have the script

#

the children did

cinder ibex
#

right but you changed that before then you still had the issue where it wasn't speeding up and you didn't show any errors in your console so that wouldn't have been the issue at that point anyway

viral crater
#

yeah sry I fixed them myself :I

cinder ibex
#

fine then, keep your secrets i guess

viral crater
#

because I understood some things but not others