- Joined
- Jan 13, 2019
- Messages
- 326
- Reaction score
- 120
- First Language
- English
- Primarily Uses
- RMMV
Here's this bird script if anyone wants it, needs yanfly moveroute and event chase and put below, to use I made a movement route to fly randomly with script call and a setting to say it's a bird, also a random script since move route one is different than event settings one. I also remade the sightLock system so it makes enemies leave after x frames even when in sight instead of constantly refreshing unless out of chase conditions.
For the one test event I made it uses this move route.
Script: Random
Script: Random
Script: Random
Script: Random
Script: FlyRand
this._chaseRange = 5
this._chaseSpeed = 5.1
this._seePlayer = false
this._sightLock = 300
this._bird = true
this._returnWait = 200
this._returnAfter = false
Event notetag I have it as <Always Update Movement><mv3d:trigger(0,1)> as an above event with event touch. Only problem I see is there's a bug or something that forces you to use first page as just self switch D and second page with D being an autorun with the actual fight, took me another hour and a half to fix that, otherwise if you just stand still the fight won't trigger and bird will eventually leave. I'm not sure how well it works without through on right now since mv3d seems bugged and you can't walk through the birds without it. Oh and use highest frequency.
And as for the bug it seems to be that you just can't walk under above events at any height right now, doesn't even need z.
Oops said self switch D but somehow it's set to A easy to switch if you want to.
Uploaded new version with D self switch and fixed distance to trigger since changing to Walk on Events seems to have changed it. Also probably better with trigger(0,0). Forgot to turn off through, seems like it lags horribly when chased if the event doesn't have through on or pass(*). So turn it on through if you want the bird to fly over other objects regardless of stair threshold or pass(*) in notetags if you want it to not.
Uhh just realized it lags badly on non birds as well, and with plugin off it still lags, so I guess mv3d broke yanfly event chase player recently. Testing why it seems to have to do with collision, if you turn events to below or pass(*) it won't lag and you don't really need same as for chase events. Actually seems to be both collision and platform, if you turn off both it doesn't lag, if either is on its jittering for me at 30 FPS. But both off with collide(false) or pass(*) work but platform(false),collide(0) don't work. NVM it does work I accidentally wrote collision, it's just collision not platform.
I think I found the problem line in updateChaseMovement.
var direction = this.findDirectionTo($gamePlayer.x, $gamePlayer.y);
If I change it to 2 it doesn't lag, but then it just goes foward over and over, no idea how to fix it at all but it's something to do with that line.
It's definitely the problem if I make a custom move route on an event with just
this.findDirectionTo($gamePlayer.x, $gamePlayer.y);
on repeat I get like 3 fps as soon as I enter the map, doesn't even move the event with it though.
Oops forgot to copy and paste something into plugin so it didn't let it chase again after in last upload.
Also as for this.findDirectionTo($gamePlayer.x, $gamePlayer.y); it is does it in demo even, but if collide(0) it doesn't lag.
Ok for some reason it isn't flying up anymore for me, I didn't change anything over night and settings look the same so I have no idea ATM.
I managed to get it working again, I have no idea why, but somehow overnight
var RNG = Math.floor(Math.random(150) / 10)
stopped working yet I change it to
var RNG = Math.floor(Math.random(15) * 10) / 10
and it works??? Worked yesterday.
For the one test event I made it uses this move route.
Script: Random
Script: Random
Script: Random
Script: Random
Script: FlyRand
this._chaseRange = 5
this._chaseSpeed = 5.1
this._seePlayer = false
this._sightLock = 300
this._bird = true
this._returnWait = 200
this._returnAfter = false
Event notetag I have it as <Always Update Movement><mv3d:trigger(0,1)> as an above event with event touch. Only problem I see is there's a bug or something that forces you to use first page as just self switch D and second page with D being an autorun with the actual fight, took me another hour and a half to fix that, otherwise if you just stand still the fight won't trigger and bird will eventually leave. I'm not sure how well it works without through on right now since mv3d seems bugged and you can't walk through the birds without it. Oh and use highest frequency.
And as for the bug it seems to be that you just can't walk under above events at any height right now, doesn't even need z.
Oops said self switch D but somehow it's set to A easy to switch if you want to.
Uploaded new version with D self switch and fixed distance to trigger since changing to Walk on Events seems to have changed it. Also probably better with trigger(0,0). Forgot to turn off through, seems like it lags horribly when chased if the event doesn't have through on or pass(*). So turn it on through if you want the bird to fly over other objects regardless of stair threshold or pass(*) in notetags if you want it to not.
Uhh just realized it lags badly on non birds as well, and with plugin off it still lags, so I guess mv3d broke yanfly event chase player recently. Testing why it seems to have to do with collision, if you turn events to below or pass(*) it won't lag and you don't really need same as for chase events. Actually seems to be both collision and platform, if you turn off both it doesn't lag, if either is on its jittering for me at 30 FPS. But both off with collide(false) or pass(*) work but platform(false),collide(0) don't work. NVM it does work I accidentally wrote collision, it's just collision not platform.
I think I found the problem line in updateChaseMovement.
var direction = this.findDirectionTo($gamePlayer.x, $gamePlayer.y);
If I change it to 2 it doesn't lag, but then it just goes foward over and over, no idea how to fix it at all but it's something to do with that line.
It's definitely the problem if I make a custom move route on an event with just
this.findDirectionTo($gamePlayer.x, $gamePlayer.y);
on repeat I get like 3 fps as soon as I enter the map, doesn't even move the event with it though.
Oops forgot to copy and paste something into plugin so it didn't let it chase again after in last upload.
Also as for this.findDirectionTo($gamePlayer.x, $gamePlayer.y); it is does it in demo even, but if collide(0) it doesn't lag.
Ok for some reason it isn't flying up anymore for me, I didn't change anything over night and settings look the same so I have no idea ATM.
I managed to get it working again, I have no idea why, but somehow overnight
var RNG = Math.floor(Math.random(150) / 10)
stopped working yet I change it to
var RNG = Math.floor(Math.random(15) * 10) / 10
and it works??? Worked yesterday.
Last edited:
