#Bug Please Help

1 messages · Page 1 of 1 (latest)

brittle gale
half carbon
#

where is this method being called?

hoary mantle
#

input has to be checked in void Update

brittle gale
half carbon
#

yep, that's what i'm geitting at . . .

brittle gale
#

the script just stops working after the timer

half carbon
#

what timer?

brittle gale
half carbon
#

you're destroying the object when ffTimer_max is reached. why would it still work it the object is destroyed?

brittle gale
#

oh

half carbon
#

what do you think Destroy means (does)?

brittle gale
#

not game object

#

im stupid

#

but im trna make it so whenever i press a key it spawns the force field

#

then when the timer runs out it destroys itself

half carbon
#

just comment out the Destroy for now. place a log in the input check and see if it shows . . .

brittle gale
#

forgive me if im wrong. im new

#

to this

#

it works i guess

half carbon
#

do you see a force field object appear in the hierarchy?

brittle gale
#

but now it just clones itself

half carbon
#

so does a new force field appear? i don't know what the pic means. you could've had 2 already in the scene . . .

half carbon
brittle gale
#

yeh srry

#

i can delete the empty game object

#

so do i add the destroy back

#

but i can only add 1

#

and it dosnt get destroyed

half carbon
#

if you're done, you can add it back. i didn't want to object getting destroyed while trying to check if the key press worked . . .

#

it'll only spawn when the key is pressed, you have to keep pressing it to spawn more . . .

brittle gale
#

yeh

#

but i dont think detroying it would be the best option

#

because i want it so whenever i press the key i can only spawn 1. and it also dissapears after the timer is up[

brittle gale