Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Puccio

#1
Thank you very much, it worked!
#2
Hello,

I have a little problem in the inventory item interactions.

I have three items, and I want a display command to be executed only when the player uses the first item on the second.
I made my display command as a consequence for the "Use inventory on this item" in the second item events.
However, my display command is always executed, also in the case that the used item is the third on second, or with the second on itself, and not only the first on the second!

The tutorial says: use inventory on inv occurs when the player uses another inventory object on this one. Add a "Conditional - if inventory item was used" check to determine which item they used. This event allows the player to combine items, and so on.

However, I don't find any information about the syntax of this "if" condition. I only know to write if(), but I don't know how to write the "item 1 was used" in the scripting language.

Could you please tell me?

Thank you very much!!!

Puccio
#3
Perfect!!! Thank you very much!!!
#4
Hello, I am sorry but my internet connection does not allow uploads of more than six lines at each time...
The whole room script is the seven lines I posted at 12:43, there is nothing else in.
Maybe this is exactly the problem...
#5
The manual only says about Character.ChangeRoom(int room_number, optional int x, optional int y), that's what I did, but it doesn't seem to say anything about writing edges lines in the script.

Sorry for the inconvenient, thank you again.
#6
Now, when I do build, run, if I pass the right edge I can read

Error: prepare_script: error -18 (no such function in script) trying to run 'player.ChangeRoom(2);' (Room 1)
#7
In the post above I wrote what I made in Edit room. In the room script for room 1, on the other side, there is still nothing about edges. There is only a display line, that I made before (and that works perfectly).

1// room script file
2
3function hHotspot2_Look(2)
4{Display("!");
5
6}
7
#8
Thank you, but I am sorry it still doesn't seem to work.

In facts, I clicked on room1, edit, events.
When, in the left column, there is

Walks off right edge

in the right column for this same line, I wrote

player.ChangeRoom(2);
#9
Hello, I have read all the tutorial but it doesn't work! I have created two rooms (room 1 and room 2). In the room 1, I have created the edges. At events, just beside "walks off right edge", I wrote "player.change room(2)".

When I run it, the character moves at my command, and, if he walks off the right edge, I have the error "no such function in script trying to run "player.change room(2) return;".

Which is my mistake?

Thank you very much in advance.
SMF spam blocked by CleanTalk