RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[REQUEST] Animations above character...

0 Members and 1 Guest are viewing this topic.

****
Rep:
Level 84
3...2...1...
This may be in the wrong board, I don't know (I hope not).  But does anybody have a script that will make an animation or balloon pop up over your head when you are by something that you can press enter on.  An example would be on Super Mario Galaxy, when you are by a person, an icon pops up over Mario's head that tells you you can talk to them.  It doesn't have to be a script either, just some way to do this.  Thanks much.  Let me know if you need any other info.

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
You could do it with events, but the issue would be how many of these types of events you plan on using per map. Each event that runs that would have to run as a parallel process and if you have too many of those running, your game will lag. But to do it with events, I'd set up a common event that runs as a parallel process that has 2 variables. Variable1=Player X Position, Variable2=Player Y Position. Then in the events that you want to have the balloon pop over your head, you have make a lot of conditionals to check if the player is a couple of tiles away from the event. So each event would have several conditionals checking if the player's X and Y positions are 1 (or 2) tiles right, left, up, or down from the event, if YES, then you make the Balloon Event Command occur then a Wait command for 120 frames or so.

So it'd be like this in each event:



Scenario: Let's say Event001 is at (6,8) on the map.

Event Name: Event001
*Conditional: IF Var[PlayerX] => 4
   >*Conditional: IF Var[PlayerX] =< 8
         > Show Balloon [Player]Exclamation Point
         > ***Wait: 120 Frames
   Else:
Else:
**Conditional: IF Var[PlayerY] => 6
    >**Conditional: IF Var[PlayerY] =< 10
         > Show Balloon [Player]Exclamation Point
         > ***Wait: 120 Frames
    Else:
Else:

NOTES:
*:
  • This conditional and the one just below it are tracking the player's position compared to this specific event's position. Like the scenario states, this event's position on the map is (6,8). X=6, Y=8. In this example, I have it tracking the player's position up to 2 tile away from this event. Two tiles to the LEFT of this event would be X=4, two tiles to the RIGHT of this event would be X=8, two tiles DOWN from this event would be Y=10, and two tiles UP from this event would be Y=6.
  • These two conditionals track the X Coordinates for the player.
  • At first, If the player's X position is equal to or greater than 4, then the statement is true and continues to the next conditional. If the player's X position is then ALSO less than or equal to 8, then the second conditional is true as well. If BOTH conditionals ring true, then your player will get a balloon to pop above his head. (NOTE: That the second conditional is placed INSIDE of the first conditional.)
**:
  • These next two conditionals track the Y Coordinates for the player.
  • At first, If the player's Y position is equal to or greater than 6, then the statement is true and continues to the next conditional. If the player's Y position is then ALSO less than or equal to 10, then the second conditional is true as well. If BOTH conditionals ring true, then your player will get a balloon to pop above his head. (NOTE: That the second conditional is placed INSIDE of the first conditional but NEITHER of these two are placed within any conditional branch tracking the player's X position.)
***:
These are the Wait commands. I noted these just because you need to have these commands. If you don't wait 120 frames or maybe a little less, the balloon will be spammed infinitely over the player's head until the conditions aren't met anymore. 120 frames should be sufficient enough so that the balloon animation pops then ends and then pops again. You can edit this if you need.

Anyways, that's the basics of how to do that. Now, it gets retardedly more complex if you need it to be an NPC or something you need to interact with a lot. You'd have to put a conditional branch underneath each time the balloon animation pops checking if you're pressing the |A| Button. So if you are, then a Self Switch would turn ON taking you to a new page of the event which would be all the stuff you have to have happen if you were to interact with the event like Text Messages or Receiving Items and things.


I could have made this a lot shorter by saying: Don't do this with events.

But I did this anyway because it's possible.

This topic is still in the right place because I recommend a script. I've seen some scripts that do this almost, but I don't know if there are any that just display a Balloon Animation in response to the distance of a certain event. I would mention that I think it'd be easier to have a script made and be user-friendly if an event that needed to have a balloon animation to be named specifically. Like "Event Name: BalloonAnim[2], where 2=how many tiles away from that event that a player would be for a balloon animation to pop above the player's head. Though I would recommend this to always be equal to 1. I can see complications occurring if two events were side by side and both events' conditions were met for the balloons to pop.

I'm done writing lol.