Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: Stray on August 09, 2013, 03:16:23 pm

Title: Screen-Trembling when beeing damaged (Blizz ABS)
Post by: Stray on August 09, 2013, 03:16:23 pm
I'd need a screen-shake/trembling which occurs when the hero is beeing attacked/damaged.
The power of trembling should depend on the % of HP it took.

Thanks in advance.
Title: Re: Screen-Trembling when beeing damaged (Blizz ABS)
Post by: RoseSkye on August 09, 2013, 04:19:42 pm
Read the manual and use script calls...
Title: Re: Screen-Trembling when beeing damaged (Blizz ABS)
Post by: Zexion on August 09, 2013, 04:37:30 pm
Yeah, you could do this by common event :s
Title: Re: Screen-Trembling when beeing damaged (Blizz ABS)
Post by: Stray on August 10, 2013, 09:19:34 am
I searched for it in the manual, but don't know which script call I use...

I only see
$BlizzABS.actor_deal_damage(party_position, type, operand)
which is for dealing damage, not getting.

Also, making a common event, that would controll every second, if the player got hit... I think it would make the game very buggy.
Title: Re: Screen-Trembling when beeing damaged (Blizz ABS)
Post by: G_G on August 10, 2013, 09:29:50 am
You won't know until ya try it.

Store actors hp in a variable
Then do a conditional branch to see if the actor got hurt
If so, do a screen shake for 2-3 frames. I don't imagine it causing that much lag, it'll just be checking numbers. In fact, if someone were to script this, this is probably how I would go about doing it. Just try it.
Title: Re: Screen-Trembling when beeing damaged (Blizz ABS)
Post by: Stray on August 10, 2013, 10:16:28 am
I already have many parallel processes running on my maps. I try to keep it less now. o:

EDIT:
I tried it. It works, but would a script prevent lagging better?
Title: Re: Screen-Trembling when beeing damaged (Blizz ABS)
Post by: WhiteRose on August 11, 2013, 08:25:25 pm
Quote from: Stray on August 10, 2013, 10:16:28 am
would a script prevent lagging better?


It's simple enough that I would imagine that it doesn't really matter whether it is in a script or in an event - it shouldn't case any significant contribution towards lag in either case. Of course, I haven't actually tested it, so I'm just guessing, but I can't imagine why it would cause any lag. If you see that it does in your testing, though, then we can figure something out. :)