Need help makeing a inventory for my game

#9

It depends. Are you on a PC?

#10

yea i am on windows 10

#11

Use the print screen function to take the screenshot

#12

where should i upload it

#13

On the forum. There’s a function to upload pictures.

#14

k i uploaded it to the forum My error message heres the link

#15
#16

I scooted it over here for you so it’d all be in one place. (:

What do you mean by ‘under variables’? You only need to (and only are allowed to) *create variables in the startup.txt file. Once you’ve created a variable, you can *set it wherever you like, in any scene, to change the variable’s value.

#17

well after some fiddleing around i can make the inventory be persistant on the choicescript_stat page or have it show up for a single scene in the actual story

to bad what i want it to do is show up in the inventory and then be able to remove it after i no longer need said item and while i suppose i could have it show up in the story it just doesnt look good.

#18

I think you might want to take a look at this: http://choicescriptdev.wikia.com/wiki/Concatenation

I’m not too sure, but I think the problem here is the *set inventory & "smg_suppressed" part. Can somebody please correct me if I’m wrong, but should this not be *set inventory inventory & "smg_suppressed"

To be honest, I don’t fully understand the problem just yet. I’ll look at it again after some caffeine makes it way to my brain.

#19

By “show up in the inventory” do you mean when you click the stats screen?
And, are you trying to change gear from the stats screen?

#20

Either way works fine. They’ll give a same result.
But ofc, *set bla "text"&bla will give a different one.

#21

i want to be able to remove gear from the stat screen as well as be able to add it

#22

Yep, many of us want to be able to do that, but that’s hard to do right now.

#23

This is accurate.

Would subroutines help, maybe? With a reset at the the start, of course, to nullify the strings, then just re-calculate them?

1 Like
#24

Idk maybe ill have to look at the code and see how i can put subroutines in but right now i need to sleep so i can wake up on time to go to work.

night everyone

2 Likes
#25

Rest well! We’ll continue working on this conundrum in your absence.

1 Like
#26

Yep, you can reset both the “glued” variable or the “target” variable, depending on your needs.

In fact, I use this kind of mechanism on my WIP. Needless to say, it works wonderfully as a bullet-list creator.

#27

I am intrigued. I’m not sure I understand the concept, though.

Would you care to enlighten me?

#28

Ehh… yeah, I guess :thinking:
It’ll probably sound convoluted, but feel free to ask again to clear things up.

So, I have this snippet of my bullet-list subroutine :point_down:t4:

*label log
*params statlog addlog
*set {statlog} (("• "&addlog)&"[n/]")&{statlog}
*return

It works by having a “parent string variable” reffered to [statlog] where you can slap the extra strings to via the “sticky string variable” [addlog]

The • bullet and the [n/] tag cooperate to create the bullet list.