Use items from inventory for puzzles?

Bowtirage

Villager
Member
Joined
May 12, 2016
Messages
22
Reaction score
1
First Language
English
Primarily Uses
I watched this video and followed everything line by line but it doesn't activate.

Example of what i'm trying to do.
Locked in room.
Gets key.
Key is added to inventory.
Approaches door.
Opens menu.
Selects key to use.
Because of the X,Y,& Direction input into common events, it recognizes the item and the event begins (You used the key to unlock the door)
If it's not in the right area it's supposed to say "You can't use this here" and it does that part fine so it seems like it's not picking up on the spot TO use it.

I really need to figure this out since it potentially changes how my game can be played.
This is what I input into common event contents:
$gamePlayer.scrolledX() == 5 && $gamePlayer.scrolledY() == 7 && $gamePlayer.direction() == 2 && $gameMap.mapId() == 6
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
Please show a screenshot of your event.
There are a lot of things that could have gone wrong, and a lot of them involve properties you didn't even mention in your description of your event.
That is quite normal and the reason why we prefer full screenshots: often the bug is in something that you don't realise as an important part. And in a screenshot we get everything, not only what you think is involved.
 

Bowtirage

Villager
Member
Joined
May 12, 2016
Messages
22
Reaction score
1
First Language
English
Primarily Uses
bandicam 2018-04-10 15-10-00-517.jpg bandicam 2018-04-10 15-10-00-517.jpg bandicam 2018-04-10 15-08-42-161.jpg
Please show a screenshot of your event.
There are a lot of things that could have gone wrong, and a lot of them involve properties you didn't even mention in your description of your event.
That is quite normal and the reason why we prefer full screenshots: often the bug is in something that you don't realise as an important part. And in a screenshot we get everything, not only what you think is involved.
 

Attachments

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,674
First Language
German
Primarily Uses
RMMV
And where and how do you call the common event?
That part is still missing from your screenshots.
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,115
First Language
English
Primarily Uses
RMMV
I assume you are calling the common event from the item?

.scrolledX() and .scrolledY() are not the correct functions.
Use .x and .y instead like this:
Code:
$gamePlayer.x === 5 && $gamePlayer.y === 7 && $gamePlayer.direction() === 2 && $gameMap.mapId() === 6
 

Bowtirage

Villager
Member
Joined
May 12, 2016
Messages
22
Reaction score
1
First Language
English
Primarily Uses
I assume you are calling the common event from the item?

.scrolledX() and .scrolledY() are not the correct functions.
Use .x and .y instead like this:
Code:
$gamePlayer.x === 5 && $gamePlayer.y === 7 && $gamePlayer.direction() === 2 && $gameMap.mapId() === 6
That worked! Thanks a ton!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,045
Members
137,569
Latest member
Shtelsky
Top