So, I have some item that when used, you put it down on the map. Like a building system.
It works in a way that when the item is used, it triggers a common event, and the common event moves an event from outside the map to the player location (via variables)
There is also a variable that the common event increases every time it's used (and a conditional brunch, that depends on the variable number moves different event) so it won't move the same event from place to place, but bring a new event each time the player put one.
(When the item is used, variable changes to 1. When variable is 1, event 1 moves to player location. When used again, variable changes to 2, etc.)
First problem is that the player can only put the object in a specific map, because unfortunately events can't be moved to other maps. Temporary solution is a conditional brunch that allows to put the object only when the player is in the map where the "object-events" are.
Second problem is that even only in the map, the objects put when using the item won't stay after re-entering the map. I tried to make it so the object events will have a page that moves them to the player location if the variable is their number, or use a seperate switch for every event that tells him to move. In both options, when re-entering the map, the objects disappear and return to their original hidden location, even though their switch\variable is still ON.
I managed to solve the second problem, but it replaced with another problem instead.
I made it so when the variable increased to 1, object number 1 turned a self switch instead of directly moving. After doing so, the objects will stay when re-entering the map, however, for some odd reason, when I put the second object, the first one disappears, when I put the third one, the second object disappears, etc.
I've been stuck on these problems for hours now and I'm really clueless. What am I doing wrong? I also tried using pictures instead of events, but they don't stay in one location in the map and aren't interacted like events...
Help will be very much appreciated.
Code of the Common Event:
It works in a way that when the item is used, it triggers a common event, and the common event moves an event from outside the map to the player location (via variables)
There is also a variable that the common event increases every time it's used (and a conditional brunch, that depends on the variable number moves different event) so it won't move the same event from place to place, but bring a new event each time the player put one.
(When the item is used, variable changes to 1. When variable is 1, event 1 moves to player location. When used again, variable changes to 2, etc.)
First problem is that the player can only put the object in a specific map, because unfortunately events can't be moved to other maps. Temporary solution is a conditional brunch that allows to put the object only when the player is in the map where the "object-events" are.
Second problem is that even only in the map, the objects put when using the item won't stay after re-entering the map. I tried to make it so the object events will have a page that moves them to the player location if the variable is their number, or use a seperate switch for every event that tells him to move. In both options, when re-entering the map, the objects disappear and return to their original hidden location, even though their switch\variable is still ON.
I managed to solve the second problem, but it replaced with another problem instead.
I made it so when the variable increased to 1, object number 1 turned a self switch instead of directly moving. After doing so, the objects will stay when re-entering the map, however, for some odd reason, when I put the second object, the first one disappears, when I put the third one, the second object disappears, etc.
I've been stuck on these problems for hours now and I'm really clueless. What am I doing wrong? I also tried using pictures instead of events, but they don't stay in one location in the map and aren't interacted like events...
Help will be very much appreciated.
Code of the Common Event:
Code:
◆Control Variables:#0018 PlayerLocationID = Map ID
◆Control Variables:#0019 PlayerLocationX = Map X of Player
◆Control Variables:#0020 PlayerLocationY = Map Y of Player
◆If:PlayerLocationID = 33
◆If:WhichBottleToPut = 0
◆Control Switches:#0042 Bottle1 = ON
◆Play SE:Jump1 (90, 100, 0)
◆Control Variables:#0023 WhichBottleToPut = 2
◆
:Else
◆If:WhichBottleToPut = 2
◆Control Switches:#0043 Bottle2 = ON
◆Play SE:Jump1 (90, 100, 0)
◆Control Variables:#0023 WhichBottleToPut = 3
◆
:Else
◆If:WhichBottleToPut = 3
◆Control Switches:#0044 Bottle3 = ON
◆Play SE:Jump1 (90, 100, 0)
◆Control Variables:#0023 WhichBottleToPut = 4
◆
:Else
◆If:WhichBottleToPut = 4
◆Control Switches:#0045 Bottle4 = ON
◆Play SE:Jump1 (90, 100, 0)
◆Control Variables:#0023 WhichBottleToPut = 5
◆
:Else
◆If:WhichBottleToPut = 5
◆Control Switches:#0046 Bottle5 = ON
◆Play SE:Jump1 (90, 100, 0)
◆Control Variables:#0023 WhichBottleToPut = 6
◆
:Else
◆If:WhichBottleToPut = 6
◆Control Variables:#0023 WhichBottleToPut = 6
◆Erase Event
◆
:End
◆
:End
◆
:End
◆
:End
◆
:End
◆
:End
◆
:Else
◆Text:None, Window, Bottom
: :Use your bottles only in a confusing place!
◆Change Items:Green Bottle + 1
◆
:End