xChikyx

Regular
Regular
Joined
Aug 7, 2019
Messages
43
Reaction score
12
First Language
English
Primarily Uses
RMXP
I'm trying to make a lantern for my game, but the image of it doesnt work to be over the character.
The weird thing is that if i do the same thing in a new game file, it works, it just does nothing in my current game file.
Any idea what could be causing this? the image appears on the top left corner, and doesnt move at all, even if the variabels used to set it in place actually change as the character moves...
UPDATE: The variables that are set after the character's Screen X and Screen Y coordinates sometimes update with the right coordinate, but sometimes they don't update at all.... I have no idea why...
 
Last edited:
Joined
Oct 4, 2019
Messages
55
Reaction score
25
First Language
English
Primarily Uses
RMMV
if it works in a new game but not in the current one, I'm wondering if maybe you have a plugin installed that's messing with the refresh of your game file for some reason?
 

xChikyx

Regular
Regular
Joined
Aug 7, 2019
Messages
43
Reaction score
12
First Language
English
Primarily Uses
RMXP
if it works in a new game but not in the current one, I'm wondering if maybe you have a plugin installed that's messing with the refresh of your game file for some reason?
No, I have nothing that is messing with those variables, and no script touches the refresh as far as I know... :/
I'll check that out anyway... Do you know which basic scrips interact with that?
 
Joined
Oct 4, 2019
Messages
55
Reaction score
25
First Language
English
Primarily Uses
RMMV
there's no real way to tell simply by looking at the scripts itself but its actually extremely easy to tell, since this lantern system works completely fine on a new game all you have to do is make a new game then add a single plugin/ play around with that plugin for a little while whilst also testing the lantern system in game/ if you see no change in the lanterns behavior remove that plugin and move onto the next one/ repeat this cycle for all your plugins (remember- there could be more than one culprit here so be thorough ok.)

there is also a chance this could be the result of two plugins interacting badly with each other, if the above test fails try testing two at a time to see if its a compatibility issue causing you problems. chances are though you wont need to resort to that.
 

xChikyx

Regular
Regular
Joined
Aug 7, 2019
Messages
43
Reaction score
12
First Language
English
Primarily Uses
RMXP
there's no real way to tell simply by looking at the scripts itself but its actually extremely easy to tell, since this lantern system works completely fine on a new game all you have to do is make a new game then add a single plugin/ play around with that plugin for a little while whilst also testing the lantern system in game/ if you see no change in the lanterns behavior remove that plugin and move onto the next one/ repeat this cycle for all your plugins (remember- there could be more than one culprit here so be thorough ok.)

there is also a chance this could be the result of two plugins interacting badly with each other, if the above test fails try testing two at a time to see if its a compatibility issue causing you problems. chances are though you wont need to resort to that.
The bad thing is that I have modified so many of the basic scripts that I have no idea where to start hahahaha But well, at least it's a start...
 
Joined
Oct 4, 2019
Messages
55
Reaction score
25
First Language
English
Primarily Uses
RMMV
that's no worries either, just test the scripts one by one like I told you by placing the ones you are currently using into the new game project and playing around with them until the lantern stops working, it shouldn't matter weather the scripts are modded or not the testing protocol still remains the same.
 

xChikyx

Regular
Regular
Joined
Aug 7, 2019
Messages
43
Reaction score
12
First Language
English
Primarily Uses
RMXP
that's no worries either, just test the scripts one by one like I told you by placing the ones you are currently using into the new game project and playing around with them until the lantern stops working, it shouldn't matter weather the scripts are modded or not the testing protocol still remains the same.
I'll do it tomorrow, it's already too late here... Once I found the culprit, how could I spot the problem? Would it be something in the refresh area?
 
Joined
Oct 4, 2019
Messages
55
Reaction score
25
First Language
English
Primarily Uses
RMMV
chances are no actually, software errors are unfortunately rarely as clear cut as that, don't get me wrong though its worth looking into first, but if its not the issue I suggest taking the program step by step through the basic troubleshooting steps, if its the type of plugin that requires you to use a script call then test each one of these script calls one by one to see which one if any are causing the issue, if all of them do then its probably something wrong within the script itself meaning something within the script is bugged. if the script is modded, add in the un modified version and see if you get the same error if not then re add your modifications one by one and test the lantern system, the moment the system stops working is the moment that you've got your culprit.
 

xChikyx

Regular
Regular
Joined
Aug 7, 2019
Messages
43
Reaction score
12
First Language
English
Primarily Uses
RMXP
chances are no actually, software errors are unfortunately rarely as clear cut as that, don't get me wrong though its worth looking into first, but if its not the issue I suggest taking the program step by step through the basic troubleshooting steps, if its the type of plugin that requires you to use a script call then test each one of these script calls one by one to see which one if any are causing the issue, if all of them do then its probably something wrong within the script itself meaning something within the script is bugged. if the script is modded, add in the un modified version and see if you get the same error if not then re add your modifications one by one and test the lantern system, the moment the system stops working is the moment that you've got your culprit.
Ok, now I'm confused hahahah
When you say plugins, what do you mean? I thought you were refering to to scripts only...
 
Joined
Oct 4, 2019
Messages
55
Reaction score
25
First Language
English
Primarily Uses
RMMV
you'll need to check through the actual JS themselves too, otherwise you wont be able to narrow down the issue. sorry if that sounded a little confusing or I worded it improperly (to be fair you're not the only one that's tired LOL)
 

xChikyx

Regular
Regular
Joined
Aug 7, 2019
Messages
43
Reaction score
12
First Language
English
Primarily Uses
RMXP
you'll need to check through the actual JS themselves too, otherwise you wont be able to narrow down the issue. sorry if that sounded a little confusing or I worded it improperly (to be fair you're not the only one that's tired LOL)
hahahah okok, i'll try tomorrow and come back with the results or more doubts
 
Joined
Oct 4, 2019
Messages
55
Reaction score
25
First Language
English
Primarily Uses
RMMV
yeah if you cant find anything just post a reply to this thread and ill check it tomorrow and well try something else.
 

KK20

Just some XP Scripter
Regular
Joined
Oct 11, 2018
Messages
495
Reaction score
204
First Language
English
Primarily Uses
RMXP
For the record, this is RMXP, not RMMV, so plugins and javascript are words that do not apply here.

You could also upload a demo of the project; would make the debugging process easier for everyone. Also, do not touch the base scripts unless you absolutely know what you're doing. Edits to the base scripts should 99% of the time be implemented as a separate script.
 
Joined
Oct 4, 2019
Messages
55
Reaction score
25
First Language
English
Primarily Uses
RMMV
For the record, this is RMXP, not RMMV, so plugins and javascript are words that do not apply here.

You could also upload a demo of the project; would make the debugging process easier for everyone. Also, do not touch the base scripts unless you absolutely know what you're doing. Edits to the base scripts should 99% of the time be implemented as a separate script.
Ah, my apologies I’ve misread. In that case you are absolutely right. But I’d also still continue with adding a backup of the adjusted scripts and replacing them with the original ones then adding back in the edits one by one till something breaks, so it would still apply just change all notations of js and plug-in to scripts.
 

xChikyx

Regular
Regular
Joined
Aug 7, 2019
Messages
43
Reaction score
12
First Language
English
Primarily Uses
RMXP
SO, i know which script does the thing, but reverting it to the original isnt working for some reason...

In the sprite_picture script, i have these lines:

self.x = 0 - $game_map.display_x / 4#@picture.x
self.y = 0 - $game_map.display_y / 4#@picture.y

clearly I put the right thing after the #
I modified this so the pictures that are bigger than the screen don't move when the character move (it works for the lights I use in the outside map)
It's worth mentioning that even with this there was a time where a lantern could work perfectly fine :/

the problem is that if I revert the lines (self.x = @picture.x for example) the pictures outside stop working (I can't see them at all) and the lantern pictur STILL do not follow me...
 

xChikyx

Regular
Regular
Joined
Aug 7, 2019
Messages
43
Reaction score
12
First Language
English
Primarily Uses
RMXP
For the record, this is RMXP, not RMMV, so plugins and javascript are words that do not apply here.

You could also upload a demo of the project; would make the debugging process easier for everyone. Also, do not touch the base scripts unless you absolutely know what you're doing. Edits to the base scripts should 99% of the time be implemented as a separate script.
I'm not really sure how to make a demo that i could share :/
 
Joined
Oct 4, 2019
Messages
55
Reaction score
25
First Language
English
Primarily Uses
RMMV
Hmm... this seems difficult...
At this point maybe you should try just working around the problem instead of resolving it directly? Try creating a separate project and making a script specifically for your lantern outside of the game and see if that works?
-
Other than that... I think it’s just a trial and error thing where you keep messing with the script whilst taking notes and see if any changes resolve the issues. Unfortunately that’s just an every day part of programming LOL
 

xChikyx

Regular
Regular
Joined
Aug 7, 2019
Messages
43
Reaction score
12
First Language
English
Primarily Uses
RMXP
Hmm... this seems difficult...
At this point maybe you should try just working around the problem instead of resolving it directly? Try creating a separate project and making a script specifically for your lantern outside of the game and see if that works?
-
Other than that... I think it’s just a trial and error thing where you keep messing with the script whilst taking notes and see if any changes resolve the issues. Unfortunately that’s just an every day part of programming LOL
Yeah, I was thinking making a script that just pust an image in the screen... no idea how to do so tho
 
Joined
Oct 4, 2019
Messages
55
Reaction score
25
First Language
English
Primarily Uses
RMMV
Ok then, maybe a different work around then? Maybe make a separate sprite sheet for your character with a lantern instead of having an image following the character? I mean if you can? That sounds like it’d be a lot easier than just writing a new script.
 

xChikyx

Regular
Regular
Joined
Aug 7, 2019
Messages
43
Reaction score
12
First Language
English
Primarily Uses
RMXP
This is What I'm trying to achieve:
The first picture is with all the lights on.The second is with the lantern on and everythig else off. The 3rd is showing how it doesnt work lol
A new sprite doesnt work because i need everything else to be completely dark...
Also, is there a way to make that a Picture "deletes" parts of another picture? for example, a completely black picture, and over it the lanters that "deletes" the picture underneath where it could iluminate something?

For now i'll try to come up wiht a script that positions the lantern picture over the character... wish me luck (or give me an already existing script XD)
 

Attachments

  • 1.jpg
    1.jpg
    161.1 KB · Views: 5
  • 2.jpg
    2.jpg
    63.1 KB · Views: 5
  • 3.jpg
    3.jpg
    63.2 KB · Views: 5

Latest Profile Posts

I realized recently since my game is still a turn based game, that something like the card game Yomi is a lot closer to what I should try to aim for combat wise. Should also help for those who don't really play fighting games to make things a bit easier to understand. ugh the struggles of trying to show love for my 2 favorite genres in 1 go lol.
Did a bit of work on the chemistry tiles I want.

Hey There!


QPcure.png

My next plugin will be: "Dynamic Temperature Stats"

Now you might be wondering... What does it do?

Well, it's a fascinating plugin that adds a body temperature mechanic to characters.

(MORE INFO ⬇️)
Holy crap, it's cold. Our heat went out this morning and the repair guy won't get the part needed to fix it at least until tomorrow. Had to be now of all times, when we have stuff to do all week and it's the coldest night of November so far.
I have invented a new food: soupie!
It is soup-pie! It's what happens when you try to make a pie, and it turns out super gooey and falls apart and you need a spoon to eat it! Soupie! Said like sue-pie. Not soupy - oh just let me eat my sad apple pie :kaothx:

Forum statistics

Threads
136,561
Messages
1,267,575
Members
180,243
Latest member
Mudkipo
Top