OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: Rytuklis on 01 May 2014, 09:12:59

Title: ARMA II need a little help with interactive cutscene
Post by: Rytuklis on 01 May 2014, 09:12:59
hey, it's been a while!
Guys, how do I make a cutscene like the ARMA II Harvest Red intro? Where the player is controlled by the AI? How do I switch player to an another soldier and how do I hide the previous soldier he was in?

Also

How do I make player for example approach a civilian, then suddenly loose control of his soldier, there is a conversation sequence, and then the player regains the control of his player?
Title: Re: ARMA II need a little help with interactive cutscene
Post by: savedbygrace on 05 May 2014, 00:54:25
Have a copy of the player unit somewhere on the map(same class). Use getdir (http://www.ofpec.com/COMREF/index.php?action=details&id=147&game=All) to get the current azimuth of the player unit, and getpos (http://www.ofpec.com/COMREF/index.php?action=details&id=152&game=All) to grab his position. You can use a fade or just simply create the camera and add a new angle to make the switch with setdir (http://www.ofpec.com/COMREF/index.php?action=details&id=293&game=All) and setpos (http://www.ofpec.com/COMREF/index.php?action=details&id=313&game=All) of the AI(copy) unit and the player unit, setting the player unit where the AI was and the AI where the player was. Play out your cinema with audio, camera angles and AI manipulation. When you're done, just setpos the AI back to its start position and the player unit back to where he was before the scene.

You may have to grab the current primary weapon class (http://www.ofpec.com/COMREF/index.php?action=details&id=252&game=All) and/or backpack class (http://www.ofpec.com/COMREF/index.php?action=details&id=1342&game=All) of the player and add (http://www.ofpec.com/COMREF/index.php?action=details&id=1334&game=All) it to the AI before the scene if there is a chance the player could alter his loadout during the mission. You won't need ammo or anything else since it will just be aesthetic.

To detect a players distance from a specific unit(civy) just use distance command in a slow loop script or trigger if you prefer, with a 3 meter condition......player distance civy <=3 : then execute the script or trigger.
Title: Re: ARMA II need a little help with interactive cutscene
Post by: Rytuklis on 16 May 2014, 16:04:50
I'm sorry but I didn't understand.. This explanation is way too complicated to me, I never was too god with this whole getpos dir and so on thing..
Title: Re: ARMA II need a little help with interactive cutscene
Post by: Rytuklis on 22 May 2014, 15:12:24
Okay, I managed to get the locations of these two units swapped, however, I still don't get how to set my camera to the position which would look first person like?
Title: Re: ARMA II need a little help with interactive cutscene
Post by: savedbygrace on 01 Jul 2014, 02:10:47
The first person view is a camera in and of itself. You will have to destroy your already created camera and then use the switchcamera (http://www.ofpec.com/COMREF/index.php?action=details&id=361&game=All) command on the unit you would like to view first person through. When done with that scene, you'll need to create another camera to continue the cinema.