Text and a variable on-screen

I'm looking for something very simple: in my game there's an orc attack in a town you have to defend. There are many orcs wandering through it. The thing is that these encounters are optional but you get rewarded depending on how many you killed. I put a "maybe we should defeat the orcs before we move on" dialogue line, but I think something more obvious would be better. So, what I needed is that during this event a counter will show up in upper right corner that says "Orcs defeated (variable)/10" or something to that effect.


EDIT: I am aware I could do this using pictures, but the lazyman in me still had to ask. 😛
Hmm... you could just make pictures of the numbers then use a show picture command after every fight to show the right image...
Yeah, I know, I was just taking the lazy way out and asking for a script. 😛


But if no one is willing to make it, I suppose I'll end up using pictures in the end.
You can give this tutorial a try too. It's eventing based:
It's like people actually want me to work for this! XD


Thanks for the tutorial, honestly at first sight, it looks exactly like what I'm looking for. I'lll explore it more thoughly. 🙂


EDIT: On a more detailed check this just wouldn't work, since it dissapears if you save and load the game, and I don't want to take that away from the player.


Hmmm I might simply make a show text command after every orc fight if there's no other solution.
You could actually use Yanfly's Gab Window btw...
That's a pretty good idea, I could probably try that.
It's like people actually want me to work for this! XD


Thanks for the tutorial, honestly at first sight, it looks exactly like what I'm looking for. I'lll explore it more thoughly. 🙂


EDIT: On a more detailed check this just wouldn't work, since it dissapears if you save and load the game, and I don't want to take that away from the player.


Hmmm I might simply make a show text command after every orc fight if there's no other solution.

though you want to make pop up text when an orc is killed and they are optional?


the tutorial should be more than enough to make a pop up window showing the kill counts temporary.


having a dynamic counter on the screen running full time can cost you fps drops, so it's not a wise idea to build something like that into your game for a mere sub-event.


[1] create your Orc event encounter enemy


[2] set win and defeat condition, when win, add 1 to a game variable of your choice


[3] display the window temporary printing the variable and the required kill count (you can add pictures/icons here too)


eg


#==================#


| (icon) Orc Killed 12/50 |


#==================#


[4] wait for a few seconds and dispose the window


And that's all you need on each Orc enemy event.


You can do this for quest enemies as well, it's up to you how you use it. 😉
Thanks a lot @MeowFaceI hadn't thought about making it temporary. But I'm already going with @Engr. Adiktuzmiko suggested: Yanfly's gab window. Sorry to have made you post needlessly.
You're welcome!

Original thread: https://forums.rpgmakerweb.com/threads/text-and-a-variable-on-screen.59593/