#[solved] ignored function

22 messages · Page 1 of 1 (latest)

compact plume
#

Hi when i put my function into _proces(delta) it ignores it but when i put it into _ready() it works ,anyone has some experience with it ?

obtuse plinth
#

What kind of function? Show your code!

compact plume
#

Func add_to_inventory() -> void:
for index in range(player_inv.slots.size)):
player_inv.slots[index].item = berry

#

It fills the inventory slots with one berry in each slot

#

It works in ready function but in process its just ignored nothing happens

snow gulch
#

does it give you error or doesnt run ?

compact plume
#

Just doesnt run no error

snow gulch
#

if you put just simple print function in it does it work ?

compact plume
#

No it ignores the whole function

snow gulch
#

did you disable processing somewhere

compact plume
#

No

#

Othe code in the process works

obtuse plinth
#

Can you show the code of the whole file?

#

And please put it in-between triple accents. Then it's readable. Like this:

this
is 
code
snow gulch
#

you can do `` `swift to make it work with gdscript formating

pallid thistle
#

just to double check, based on your initial post:
did you write _proces(delta) or _process(delta)

compact plume
#

Restarted godot now the print works but still not doing anything, sorry cant do better i am on mobile and dont have right now internet on desktop

#

The proces function is good have code in it that works

compact plume
#

Problem solved,found out what coused it, thanks for help

obtuse plinth
#

Can you tell us what caused it?

compact plume
#

The oher function that was updating the slot visual was called in ready instead of proces so it was called just once in the begining

#

The function worked as intended just wasnt called more than once that why it worked when i put it in ready