How to: Fix Event on Screen?

Hello, i know there is a Script that allows us to Fix Pictures to the Map.

But after some Playing/Building, i recogniced that i could need a Way to Fix

some Events to the Screen.

Is that somehow possible? Quick Google didnt give me Solution.
That has a lot of problems as that is not what events are for - can you please describe why you want to do that, what it is intended for?


Then we can see if there is a way to do this.
I was using Pictures (numbers 0 to 9) to Show the Value of a 3digit Variable on the Screen.

Than i thought hey using 3 Events would be easier if they were Fixed on the Screen.

It would be also easier to Animate Head up Display stuff this Way.

So i want to use Events and Eventgrafics insteed of Pictures for some Stuff.
Just use pictures... There are certain problems if you want to use events with that. Plus pics are already fixed on screen.
What kind of Problems do you mean?
Your "display events" will require a map position to be placed, and that will affect all other events on the map. But since that map position moves with the player, it cannot be predetermined with the event commands itself.


As a result you'll have a lot of problems to check and determine what will happen if a regular event is at the same position as your display event.


And what will happen if the player gets to the map border and can suddenly approach or even stand on the position for that event?


And a number of additional potential problems...
What is your difficulty/aversion in using pictures? Ace already fixes pictures to the screen, and they will carry from one map to the next unless you tell it not to. You would need to use a script to fix events to the screen, and you would have to allocate events on every map where you wanted this to be active.


Can you explain why you don't want to do it the way Ace already allows? Is it that you can't get it working properly? We can help with that.
The Time i Fixed Pictures with Eventcommands to the Map it was not perfectly synchron with the screen while mapscrolling,

than i used the fix pics to map script.

Now i have to try the same way in revert to fix events to the Screen.

Just thought that soeone just had done this with Script or that its easy to do ^^.

I will share my results later on. But if you have Solution that safes me Work, please Post 🙂 .

Edit: @Shaz

I was using Pictures, while experimentating around i became the idea of using events insteed, firstly i thought it makes things user friendlier,

but i found out its only half true in some cases and in others not.

So short answer, iam just Experimentating around. I would need a more detailed goal before i can tell what exactly the end result will be.
Also if you're making the events the normal way, no two events can exist in one tile unless you use a certain script to allow it. So if you have moving events they cannot go to the tiles where the HUD events are. And you also need to have those events in all maps that needs the HUD.
Can you show us what your event looked like when you were using pictures? It should have worked just fine.


Wait a minute ... do you want them to be fixed to the map or the screen? If you want them to be on the screen all the time, you shouldn't need to use a script. Pictures automatically stay in place on the screen.


Lets go with pictures, as we know Ace handles them already, and see if we can fix the sync problem you're having.
Can you show us what your event looked like when you were using pictures? It should have worked just fine.
It worked fine, no Problem at that End.

Wait a minute ... do you want them to be fixed to the map or the screen? If you want them to be on the screen all the time, you shouldn't need to use a script. Pictures automatically stay in place on the screen.
My Question was if its possible to Fixate an Event to the Game Screen insteed of the Game Map?

Lets go with pictures, as we know Ace handles them already, and see if we can fix the sync problem you're having.
I dont have a Synch Problem. I know Pictures work, but in some cases Events would work better and in others Pictures would do.

Iam just trying to figure out my initial Question. And if its just for Science sake 🙂 .

Edit:

Engr. AdiktuzmikoAlso if you're making the events the normal way, no two events can exist in one tile unless you use a certain script to allow it. So if you have moving events they cannot go to the tiles where the HUD events are. And you also need to have those events in all maps that needs the HUD.
If your Events are on Through they can Walk through each other. If Hud Event on above its also shown above other Events. Highest ID on Above will be displayed above. You can also use Set Event Location Eventcommand to Put Events on Top of each other. Also tested a Charset made out of 5Events on Top of each other moving synchron. So it depends on the Context.But this goes off Topic.
Your "display events" will require a map position to be placed, and that will affect all other events on the map. But since that map position moves with the player, it cannot be predetermined with the event commands itself.

As a result you'll have a lot of problems to check and determine what will happen if a regular event is at the same position as your display event.

And what will happen if the player gets to the map border and can suddenly approach or even stand on the position for that event?

And a number of additional potential problems...
IF you place an Event in the Top left Corner of the Map,you can calculate always the x zero and y zero screen point of the actual Gamescreen and add the screencoordinate you want to show at. than it just has to be drawn there. worked like that with pictures to map. but events are not placed in pixels they are placed in 0.1 from 32Pixel.

Thats the reason i thought fixing em to map with rgss3 eventcommand set event location every frame  would look buggy while map scroll.

Atleast i asume that at the Moment

Thats why i didnt build to finish and decided to Open this Thread. Hope this somehow helps Andar.
Just use pictures really. You're just complicating things by trying to do this with events
Ok i experimented a little.

I made a paralell Event with a Loop and a 1 Frame wait, to archieve maximum update speed for the Code.

I also made a Event 003 on the Top left Corner of the Map its doing nothing except telling me the Screen X and Y of it self.

And i made a Event 002 as Head Up Display Event.

Than i inserted a Set Eventlocation Eventcommand into the Loop Event which changes Event 002 Position.

moveto(($game_map.events[3].screen_x / 32 * (-1) + 0.5), ($game_map.events[3].screen_y / 32 * (-1) + 0.5))

It gets fluid drawn onto the Gamescreen while Moving, but the rounding errors makes the whole stuff buggy.

So i would need some kind of other way. maybe i have to use module to convert the rest of the pixelcoordinate dividet to 32 into 32/10 steps.

Not sure how to explain this properly in English...^^hmm.

But it shows that it Theoreticly would work 🙂 i supose?
When you program something, you always eventually make it work.

The difference between a good program and a bad program is that one is easier and performing better.

In this case, you're recreating the wheel by hammering the corners of a square. There are already better, easier solutions.

You *can* do it otherwise, but I don't think it's worth the pain.
What do you mean? Do you have examples?

You mean i should take a Ruby learning course and learn how to script Windows and Bitmaps to make my own Pictures?

Than learning more so they get safed properly while game load and safe?

Yeah that would be a Solution. Do i realy need to do that cause of this?

Edit1:

Numbers and Scroll Bars with Pictures work Fine.

But for some stuff Events would be cool. I have also other stuff in mind i could need help with but i dont want to go off topic to much.

Menus oon other Maps with Events also work fine. But this time i need em like i discribed.

Edit2:

We had many dont do it this Way answers, which i aknowledged. But this Topic isnt Solved for me with that answer 🙂 .
The answer has been given several times: use pictures, not events.

That is, if you only want to display something. If you're looking for the system behind it to define what should be displayed, then it's another matter.
Numbers and Scroll Bars with Pictures work Fine.


But for some stuff Events would be cool. I have also other stuff in mind i could need help with but i dont want to go off topic to much.
Then please tell us what "stuff" is.


Making screen-fixed events has a lot of problems due to the way events are integrated with the rest of the engine.


With any "stuff" I can imagine, the use of screen-fixed events is the worst solution possible - but perhaps you have imagined something I didn't think of, so please tell us what you plan to use that for, and we can check if that really would be the best solution.
OK i tested the Eventsolution further.

This Code in a paralell Event  with Loop inside it works nearly acceptable.

Its just alpha code. Inserted in Eventcommand Script on 3rd Command Page.

$game_map.events[2].moveto(($game_map.events[3].screen_x/32.0*(-1)+1),($game_map.events[3].screen_y / 32.0*(-1)+1))But i recogniced that the stepping animation is not working anymore. that means the initial purpose to animate stuff easier isnt given anymore.

I will concentrate on animating Pictures or maybe taking a script tutorial if iam motivated enough 🙂 .

Now atleast we can Name one of the before untold reasons to Focus on Pictures and or Scripting 🙂 .
I make evented HUDs all the time using pictures only, with the help of a script that shows pictures on the screen tied to a variable. I can send you a copy of this script if you'd like.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-fix-event-on-screen.44491/