[Trigger] Character death cinematic

Status
Not open for further replies.
Level 5
Joined
Aug 18, 2013
Messages
85
I have always made cinematics that were fixed to a certain position. But I want a cinematic that can happen anywhere. That means if the hero dies in a certain place. The cinematic will take place there.

The problem is I don't think it's possible to have the complex action or camera angles.

I want a character to do a leap and attack another hero in the cinematic.

Is there a way that the game can place the killer of the dying hero 100 paces away from where the dying hero was killed? So he can leap and attack from there?
 
Level 2
Joined
Aug 10, 2010
Messages
17
I don't really understund what you want but 100 paces sounds a bit long for a leap.

The cinematic can be done if you lock the camera on the hero, then you can rotate it and do whatever you want with it.
 
Level 5
Joined
Aug 18, 2013
Messages
85
Also a hero could be facing any direction. How do I trigger it so it actually faces the hero. Rotating isn't good enough because I won't know ahead of the time where the unit will be looking when it's dying
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,283
Also a hero could be facing any direction. How do I trigger it so it actually faces the hero. Rotating isn't good enough because I won't know ahead of the time where the unit will be looking when it's dying
Using mathematics. Compute the facing using the inverse tan operation (arctan). GUI gives you something to do this using locations.

To get the cinematic to work properly you need to search for suitable positions of the units nearby. You also want to avoid low angle shots as those might clip into geometry of the terrain or decorations. If you fail to find such positions (say its very crowded or just a poorly pathable area of the map) you need to have some default "perfect" setup to use.

Being dynamic is good and all but people would prefer something bug free. As such try your best to find suitable placements (you can iteratively scan entire areas if you want!) however if none is found you need to fall back to a safe positioning, even if it is nowhere near where you want.

You are wondering into pretty unknown territory here so unfortunately we cannot give you much help as far as implementation goes. There is a reason why most commercial games use statically scripted cinematic rather than dynamic ones.

Fundamentally you will need placement searching routines to find suitable positions for the cinematic actors. If such a position cannot be found you either need to improvise (an alternative sequence using routines which are more likely to succeed) or default to a fail safe (statically positioned, cinema perfect).

The sort of routines you will include finding suitable actor locations, finding suitable camera angles, finding actor locations factoring in camera angles, finding camera angles or actor locations without obstructions etc.
 
Status
Not open for further replies.
Top