Screen-Trembling when beeing damaged (Blizz ABS)

Started by Stray, August 09, 2013, 03:16:23 pm

Previous topic - Next topic

Stray

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.
I'm very grateful to you all for your great help.

RoseSkye


Zexion


Stray

August 10, 2013, 09:19:34 am #3 Last Edit: August 10, 2013, 09:22:41 am by Stray
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.
I'm very grateful to you all for your great help.

G_G

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.

Stray

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?
I'm very grateful to you all for your great help.

WhiteRose

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. :)