Skurge

Archtross Dev
Regular
Joined
Jul 12, 2015
Messages
1,363
Reaction score
327
First Language
English
Primarily Uses
N/A
Hello everyone, I've been working hard on making city trams/monorails etc for my project that are set up above streets in certain areas, To mix in the realism- I'm seeking a plugin that can help make the player's screen shake depending on how distant the source is coming from- sort of like 3D audio.

So for example if your player feels the vibrations of an incoming train- the shaking gets stronger and when passing it's strength declines. I've looked around for a plugin like this but can't find any leads as I think no one has developed one yet.
 

Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,957
First Language
English
Primarily Uses
RMMV
Sounds like you're after the kind of proximity scripts/plugins that are usually used for audio. Did you use that term in your searches? If not, give it a go - might come up with something useful.
 

continuumg

Regular
Regular
Joined
Oct 27, 2016
Messages
71
Reaction score
46
First Language
English
Primarily Uses
Yes, you could use that plugin. Have the event that you want to cause the shaking be a parallel process event with the following script

Code:
var x = THIS-EVENT-ID-HERE;
if (Proximity.inprox(x,8,false)) {
var pow = 0
var spe = SHAKE-SPEED-HERE
for (var i = 9; i > 0; --i) {
if (Proximity.inprox(x,i,false)) pow = (9-i);
}
$gameScreen._shakePower = pow;
$gameScreen._shakeSpeed = spe;
$gameScreen._shakeDuration = 5;
}
 

Skurge

Archtross Dev
Regular
Joined
Jul 12, 2015
Messages
1,363
Reaction score
327
First Language
English
Primarily Uses
N/A
Little trouble with this one, it keeps mentioning a problem with "x" but I don't know what it's referring to.

var means variables? I do not know since I am not intending to use variables or unsure if it's required to.

Say If I wanted to have the event proximity to activate at a distance of 8 squares on all angles with power and speed both at 9 with the duration of 60 how would you mark that?
 

continuumg

Regular
Regular
Joined
Oct 27, 2016
Messages
71
Reaction score
46
First Language
English
Primarily Uses
Well that would be a little simpler than my previous code, which had the power increase as you get closer, starting at power 1 nine spaces away, and ending at power 9 one space away. I think. I didn't actually test it.
Say the event had an id of 002.
The following would be the code for your example
Code:
if (Proximity.inprox(2,8,false)) {
$gameScreen._shakePower = 9;
$gameScreen._shakeSpeed = 9;
$gameScreen._shakeDuration = 60;
}
 

Skurge

Archtross Dev
Regular
Joined
Jul 12, 2015
Messages
1,363
Reaction score
327
First Language
English
Primarily Uses
N/A
I figured out how to configure the previous script thanks to looking at your newest one, which I actually do prefer the original one.
However there seems to be a problem in regards to movement, the script only wishes to work if movement is conducted via autonomous movement commands rather than move route commands on the event's page. I'm not sure how to get around this with the autonomous movement as I intend to have the event's path use a variety of other commands that autonomous movement cannot produce involving things such as set event event location for a prime example. What would your advice be?
 

continuumg

Regular
Regular
Joined
Oct 27, 2016
Messages
71
Reaction score
46
First Language
English
Primarily Uses
I could probably write you up an extension for that plugin so you can set the shake up using event notes or comments :)
It'll have to wait until tomorrow though.
 

Skurge

Archtross Dev
Regular
Joined
Jul 12, 2015
Messages
1,363
Reaction score
327
First Language
English
Primarily Uses
N/A
I could probably write you up an extension for that plugin so you can set the shake up using event notes or comments :)
It'll have to wait until tomorrow though.
That would be extremely helpful! thank you! :)
 

Skurge

Archtross Dev
Regular
Joined
Jul 12, 2015
Messages
1,363
Reaction score
327
First Language
English
Primarily Uses
N/A
This works amazingly well, very simplistic execution too- I can't wait to fix up 3D audio to go with this!
Thanks for your help for making this possible! Defiantly earning a spot in the credits!
 

Latest Threads

Latest Profile Posts

I've been so lazy about doing art but I finally decided to buckle down and get some work done on the party!

aa312ffbcd667933.png

3d554012e96e4526.png
SallyFaceTest.png
Testing the first face in battle!
ScreenShot_9_20_2023_6_58_43.png
been working on my intro off and on for a while. I finally like it lol. it took me redoing it like 4 times to get to this point. I think it set's up things a lot better now.

Forum statistics

Threads
134,683
Messages
1,249,677
Members
177,415
Latest member
vigneshwaran
Top