Items

I tried to look at the tutorials but im wondering if´ or how to code in items correctly like for example if say my character picks a knife or refuse to take a weapon, how do i use what “if statements” to make it work?

Maybe you want something along these line?

*create knife false

*comment Changing the variable to true when the player picks the knife
#Pick up knife
*set knife true

*comment When knife needs to be used
*if knife
Player has knife
*else
Player does not have knife

3 Likes

*create knife false is put in the startup file right ?

I think that’s what im looking for , i think i haven’t gotten so far as to us yet but it seems to be correct-

Yes you must put it in the startup. Unless you only intend to use that variable in a single scene, in that case you can just use *temp knife false in the scene file.

Another thing, you might want to use *if not(knife) instead if the *else is not working. Thought I’d mention this in case you had any troubles latter on, cause that has happened to me before.