[XP] "Inspect" Event Animation

Started by Jaiden, October 01, 2018, 11:14:56 pm

Previous topic - Next topic

Jaiden

October 01, 2018, 11:14:56 pm Last Edit: September 04, 2021, 02:42:04 pm by Jaiden
"Inspect" Event Animation
Authors: Jaiden, KK20
Version: 2.0
Type: Event Feature
Key Term: Environment Add-on

Introduction

Do you want to indicate that an event can be interacted with using a nifty animation? This is the script for you! Similar to how most games have some sort of a "press to interact" indicator, this script displays an animation when the player is facing events you've marked for "inspection".

Features

  • Easy to select which event / event page to display on
  • Animation displayed is customizable
  • Should be reasonably compatible with most scripts

Screenshots

Gif example using a custom animation:
Spoiler: ShowHide


Demo

(N/A)

Script
Hosted on Github


Instructions

Instructions are in the script, but it is as simple as putting a comment with "\inspect_event" in the event page you want the animation to display on. Note that the default animation used, "EM Exclamation" plays a sound every time it is looped. I suggest creating a new, silent animation and setting its ID in the configuration.

Compatibility

This script aliases the Game_Map, Game_Event, Game_Character and Sprite_Character classes. This will not be compatible with any scripts that heavily re-write those classes.

Credits and Thanks

  • KK20 for helping with 90% of this
  • Everyone else in the Discord server for helping out and/or dealing with my ramblings

Author's Notes

This is my first script. I figured I'd make a contribution back to Chaos Project since this community has been so helpful in my game's development. Hopefully this script treats someone else just as well!

Credit for this script isn't required, but greatly appreciated, with the exception of redistribution. If you post this script elsewhere, please link back to this original post.

Jaiden

Updated to v1.1; fixed a bug where the map wasn't refreshing correctly and the animation wouldn't always display.

Blizzard

Now you're a real scripter. First you had to fix your own broken code, it's kind of a ritual. >_>
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Jaiden

Updated to v2.0
Now you can specify what directions the animation displays! Also, KK20 fixed all the bugs and bad logic :)