Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Special items

9 years ago

I'm quite new to the advanced editor, and the answer is probably right in front of me somewhere, but I'd like to have numerous "special items" in a game, which the player can collect. They won't have a use, but at the end of the game, the player will be told how many special items they found. This might lead to bonus short stories within the game, but that's my basic idea. How do I go about this?

Special items

9 years ago

You can use variables or items that dont go anywhere. Look at the articles under help and info for a more in depth explanation if you need it. 

Special items

9 years ago

You would put something like this in the script of the page where you want to reveal the number of special items found.

IF $ITEMSTATE01 = 1 THEN %SPCLITMS := %SPCLITMS + 1

IF $ITEMSTATE02 = 1 THEN %SPCLITMS := %SPCLITMS + 1

IF $ITEMSTATE03 = 1 THEN %SPCLITMS := %SPCLITMS + 1

 

$ITEMSTATE has the $ in front because it is a system variable, as opposed to a user created variable. You need to have scrips turned on. You also need to create the %SPCLITMS variable. Note, the numbers behind $ITEMSTATE are going to be the ID numbers of the special items.