Trying to have my gameplay work

I am trying to open a window on my game where an image appears, a piece of wool.

I want to give the player three prompts to transform that wool into something else.

The player will have to use the keyboard keys to go either up, down, left or right.
depending on the direction of the three prompts, the wool will become either this Item or that.

Example:
press up (wool changes upwards)
press right (wool changes to the right)
press up wool changes into a sword

I imagine what im trying to do is having "choices" be set by the movement of the direction keys on the keyboard, or at least I imagine this as a solution.
Welcome!

This tutorial article may be helpful.

Welcome!

This tutorial article may be helpful.

Thanks! It has helped me by pointing in a different direction. Still haven't figured out how to do what I want, though, but I guess this thinking I'm doing right now is just part of the process in creating something.

thanks a lot, really!
Still haven't figured out how to do what I want, though
Why? Doesn't that article literally tell you how to make images that change as you scroll between things?
Why? Doesn't that article literally tell you how to make images that change as you scroll between things?
Its different from what I want to do.

its not a menu screen.

what's happening now is I created a bunch of conditional branches that turn on the right variables (ibelieve) and I assigned the right pictures... but the change only occurs when I hold the directional keys, not when I press and let them go.

also, the event keeps appearing on the left hand corner even when I specified its place in the center of the map

Why? Doesn't that article literally tell you how to make images that change as you scroll between things?
Hey!

Now I got it to work, that is the pictures. for some reason though it keeps appearing at the left hand corner and not where I set it. any help greatly appreciated. thanks a bunch

Why? Doesn't that article literally tell you how to make images that change as you scroll between things?
Okay, now I figured everything out, it seems... I it worked out with your tutorial, thank you thank you thank you

I got it working now perfectly, so rewarding
Hey guys,

Here I am back again having problems with this same mechanism.

I followed a lot of what was given in the tutorial above, including keeping a movement of 5 frames to the "player" inside the loop so he does not move on the map as the pictures are showing.

I even got the whole thing to work, it does work. Problem is that frequently, when inputting the commands on the keyboard the pictures get stuck. as if I clicked on too many times before giving the mechanism time to go to the next instruction. I tried reducing all my "wait" times to see if it would help and it does it.

I am a total amateur so I even feel a little bad sending screenshots, because I know there is plenty of things wrong with it and I am learning. So thank you for the patience if you do help!

here are the screenshots of the event, perhaps there are obvious, glaring errors one might help me with:


Screenshot 2024-12-13 at 01.18.05.png
Screenshot 2024-12-13 at 01.18.19.png
Screenshot 2024-12-13 at 01.18.32.png
Screenshot 2024-12-13 at 01.18.47.png




Screenshot 2024-12-13 at 01.18.05.png
Screenshot 2024-12-13 at 01.18.19.png
Screenshot 2024-12-13 at 01.18.32.png
Screenshot 2024-12-13 at 01.18.47.png
The very top of the event looks wrong.

Why is the entire thing in a loop? Parallel events automatically loop.

You don't need to erase a picture ID just to show a picture with the next ID - simply do Show Picture with the ID that you want to replace. It's possible the erase/show is causing a bit of lag, although I wouldn't really think so.

I tried reducing all my "wait" times to see if it would help and it does it.
I don't know what this means.

Problem is that frequently, when inputting the commands on the keyboard the pictures get stuck
And can you explain exactly what this means? What does a "picture getting stuck" look like? It's hard to troubleshoot if you don't know what the problem is.
The very top of the event looks wrong.

Why is the entire thing in a loop? Parallel events automatically loop.
I followed what was done in the tutorial above where the parallel event is looped. I think that by putting the "character movement route at a wait" during the loop holds the character while the event happens. In any case, I tried removing the loop and then it doesn't work at all so it seems to me the loop should be there.

And can you explain exactly what this means? What does a "picture getting stuck" look like? It's hard to troubleshoot if you don't know what the problem is.

I made two different videos to show you, in this first one things work as they should (In this case it was running in a map completely clean of other events, for testing. And in this environment it works.



This video shows it malfunctioning, when it opens in a map with other npc's and events:



You don't need to erase a picture ID just to show a picture with the next ID - simply do Show Picture with the ID that you want to replace. It's possible the erase/show is causing a bit of lag, although I wouldn't really think so.
You're right about that, that was a recent change I made in an attempt to fix my malfunction, thinking it could have been causing it. Will change it back, good to know, thanks.


Thank you so much for helping!
I followed what was done in the tutorial above where the parallel event is looped.
No - the first thing in the tutorial I linked you to is checking for the button press to open the menu.

1734115771458.png


Then there's a loop inside of the event to manage the menu itself. It doesn't serve any purpose to put the entire event contents inside a loop because parallel events already loop.
No - the first thing in the tutorial I linked you to is checking for the button press to open the menu.

View attachment 325542

Then there's a loop inside of the event to manage the menu itself. It doesn't serve any purpose to put the entire event contents inside a loop because parallel events already loop.
I see, thanks. I was able to get it to work without the loop now when opening in my "test" page. However, just like I showed above in the videos, when the item is opened by the player in a map with other events it freezes still. now it freezes even before the first click. I suspect there might be other events interfering? but its strange because I am pretty sure I don't have any outrun or parallel events going on at this stage.
yes and no, but it can work, there is probably more than it meets the eye 🙂
if you check my tutorial on the ocarina of time mini event, it might just work
the way you want to with images instead.

to whatever end purpose.

as in your video, you press 3x right, so if you can do left, left, right for a different image,
than my ocarina might help (also inside menu's) as it trigger some stuff outside.

but to help you fully understand or the mechanic you want to build, we need a more
details what is happening.

is the end also stopped at 3?
can it be stopped at 2?
can it have all combination of the 4 arrows keys?
what purpose have the switches on 1-2 presses? if not on the last one?
etc etc,

more details is better answer to your solution.
is the end also stopped at 3?
can it be stopped at 2?
can it have all combination of the 4 arrows keys?
what purpose have the switches on 1-2 presses? if not on the last one?
etc etc,

My character can manipulate wool into other objects.

When he gets a wool item, he opens it and this "show picture" common event starts.

you, the player have three inputs of up, down, left, right to get something out of this wool.

so first a generic looking piece of wool appears.

when you press one of the keys, the wool changes shape, it was manipulated by the character. so every time you press a button the wool should change until finally after the third press, it has become some item depending on the three inputs you threw in. This means there are 64 different items it could become (although right now I repeat lots of them)

so the 1-2 presses just show the wool manipulated (woolmess as I called the pics)

the third ends the event and it becomes a new item on you inventory
than I would use variables instead of switches, the reason for that,
if you use switches (so far I see) its ON, so the next time, this switch IS ON,
so you need to start with ALL switches OFF this way, it might the reason
why yours fails to continue.

in my ocarina of time, it checks triggers and keyPresses, that works together.
but with variable, you can check this value on the end reward given more easely.

but you can also make it bit shorter, like ATT_Turan said, just overwrite the ID of
2, instead of erase 2, show Id 3, just show id 2 wil erase 2 and replace it.

so you can make it a bit cleaner, so try on top, the global switches to OFF,
see if that solve your first issue.
Hey guys, I really appreciate all the help so far but I still can't get it to work. What is very frustrating is that it does "work" when tested in a test page. it is in the map with other events that it malfunctions . I think this suggests there is some kind of interference with some other event I am not seeing.

I am thinking of rewriting the whole thing using variables as you suggested above, but am dreading having to do so.

I also am already studying your ocarina demo, thank you so much for pointing me towards it. Im sure I'll figure it out eventually.
Hey guys, I really appreciate all the help so far but I still can't get it to work. What is very frustrating is that it does "work" when tested in a test page. it is in the map with other events that it malfunctions . I think this suggests there is some kind of interference with some other event I am not seeing.

I am thinking of rewriting the whole thing using variables as you suggested above, but am dreading having to do so.

I also am already studying your ocarina demo, thank you so much for pointing me towards it. Im sure I'll figure it out eventually.
Is this what you're trying to make?


You should use a common event for things that repeat too much, otherwise it's a nightmare to do something as simple as changing a single SFX or picture, also we can do use a variable to simplify the process and make it easier to manage.

I rewrote it for you using my own best practices, here's the demo download.
The project has a lot of common events so the event I'm using for wool here is 195, the other events are just unrelated stuff, pay them no mind.

Spoiler: Text version of the code
Map Event, Same as Characters Action button:
◆Comment:Show picture wool here
:Comment:I separated the wool and background.
◆Show Picture:#1, Woolbackground, Upper Left (0,0), (100%,100%), 255, Normal
◆Show Picture:#2, ShowWool, Upper Left (0,0), (100%,100%), 255, Normal
◆Text:None, Window, Bottom
:Text:Text about wool
◆Comment:Important variable and label. You can read about the
:Comment:variable in the common event.
:Comment:About the label, read about it at the end of this
:Comment:event.
◆Control Variables:#0015 = 0
◆Control Variables:#0014 = 0
◆Label:TryAgain
◆Comment:Main wool loop
◆Loop
◆Wait:1 frame
◆If:Script:Input.isTriggered('up')
◆Comment:This common event updates the wool picture.
◆Common Event:WoolMess
◆Control Variables:#0014 += 1
◆
:Else
◆If:Script:Input.isTriggered('down')
◆Comment:This common event updates the wool picture.
◆Common Event:WoolMess
◆Control Variables:#0014 += 100
◆
:Else
◆If:Script:Input.isTriggered('left')
◆Comment:This common event updates the wool picture.
◆Common Event:WoolMess
◆Control Variables:#0014 += 1000
◆
:Else
◆If:Script:Input.isTriggered('right')
◆Comment:This common event updates the wool picture.
◆Common Event:WoolMess
◆Control Variables:#0014 += 10000
◆
:End
◆
:End
◆
:End
◆
:End
◆Comment:This is where we check if the combination
:Comment:amounted to anything.
:Comment:'2' is up + up, for example
:Comment:'102' is up + up + down
:Comment:or any combination of those keys.
◆If:#0014 = 102
◆Show Picture:#2, WoolSword, Upper Left (0,0), (100%,100%), 255, Normal
◆Change Items:Carrot + 1
◆Text:None, Window, Bottom
:Text:You made yourself a wool sword!
◆Break Loop
◆
:Else
◆If:#0014 = 1202
◆Show Picture:#2, WoolGlue, Upper Left (0,0), (100%,100%), 255, Normal
◆Change Items:Carrot + 1
◆Text:None, Window, Bottom
:Text:You made yourself a wool glue!
◆Break Loop
◆
:End
◆
:End
◆Comment:This checks if the player has gone offtrack.
:Comment:Right now I know that if the player tries a combination
:Comment:of more than 5 inputs, its pointless to continue.
◆If:#0015 > 5
◆Text:None, Window, Bottom
:Text:That does not seem right.
:Text:Keep going?
◆Show Choices:Yes, No (Window, Right, #1, #2)
:When Yes
◆Text:None, Window, Bottom
:Text:Alright, let's keep going!
◆Comment:Reset variables and try again
◆Control Variables:#0014 = 0
◆Control Variables:#0015 = 0
◆Comment:We use a label here to simplify the process.
◆Jump to Label:TryAgain
◆
:When No
◆Comment:Breaks loop
◆Text:None, Window, Bottom
:Text:You leave the wool alone.
◆Break Loop
◆
:End
◆
:End
◆
:Repeat Above
◆Comment:Always erases wool pictures when we are done.
◆Erase Picture:#1
◆Erase Picture:#2

--------------------------------------------------------------------------------

Common event 195 'WoolMess':

◆Comment:Pick a random wool picture, make sure
:Comment:it is not the same picture we already displayed.
◆Loop
◆If:Dice ≠ OldDice
◆Break Loop
◆
:Else
◆Control Variables:#0006 Dice = Random 1..4
◆
:End
◆
:Repeat Above
◆Comment:Play the SE here so its easy to change if we ever
:Comment:need to
◆Play SE:Bell3 (10, 100, 0)
◆Comment:This pics a picture to show
◆If:Dice = 1
◆Show Picture:#2, WoolMess1, Upper Left (0,0), (100%,100%), 255, Normal
◆
:Else
◆If:Dice = 2
◆Show Picture:#2, WoolMess2, Upper Left (0,0), (100%,100%), 255, Normal
◆
:Else
◆If:Dice = 3
◆Show Picture:#2, WoolMess3, Upper Left (0,0), (100%,100%), 255, Normal
◆
:Else
◆Show Picture:#2, WoolMess4, Upper Left (0,0), (100%,100%), 255, Normal
◆
:End
◆
:End
◆
:End
◆Comment:Save the dice number so we know we already showed
:Comment:that picture last turn, to avoid repetition.
◆Control Variables:#0007 OldDice = Dice
◆Comment:This variable counts how many times the player has
:Comment:called this function, we use it to arbitrarily stop
:Comment:the wool event if the player is going offtrack.
◆Control Variables:#0015 WoolCycles += 1

------------------------------
Sadly this is mostly unreadable, the 'copy as text' function is really just no good.
Is this what you're trying to make?


That is very similar to what I want, yes! Amazing can't believe someone would do that for me. thanks so much.
That is very similar to what I want, yes! Amazing can't believe someone would do that for me. thanks so much.
It's nothing really, have fun making your game!

Original thread: https://forums.rpgmakerweb.com/threads/trying-to-have-my-gameplay-work.173714/