Page 1 of 1

Final Choice?

Posted: Tue Jun 23, 2009 9:26 pm
by jedimaster745
For those who have played(and completed) the force unleashed, you probably remember the end of the game, where your character must choose whether to attack darth vader or the emporer. and the choice decides the ending of the game.

For those who are experienced scripters, how would i integrate such a choice into a campaign mission? where at the end, the character is given a choice between two targets, and the one who is attacked becomes hostile, and the one who wasnt attacked either just stands there or becomes friendly, and either choice results in victory?

Thanks in advance!

Re: Final Choice?

Posted: Thu Jun 25, 2009 2:54 pm
by Dom380
from my limited know how I would have to say no you could have two different versions of the map or campaign with a different ending

but you should ask someone who knows abit more than me about scripting

Re: Final Choice?

Posted: Thu Jun 25, 2009 4:20 pm
by [RDH]Zerted
jedimaster745 wrote:...the character is given a choice between two targets, and the one who is attacked becomes hostile, and the one who wasnt attacked either just stands there or becomes friendly, and either choice results in victory?...
There are a few ways you can do it. One way is to use event callbacks and see which is damaged first by the human player. If the two targets are initially standing still, another way would be to surround them with regions and whoever the player walks up to first is the enemy.

Re: Final Choice?

Posted: Thu Jun 25, 2009 6:45 pm
by jedimaster745
[RDH]Zerted wrote:
jedimaster745 wrote:...the character is given a choice between two targets, and the one who is attacked becomes hostile, and the one who wasnt attacked either just stands there or becomes friendly, and either choice results in victory?...
There are a few ways you can do it. One way is to use event callbacks and see which is damaged first by the human player. If the two targets are initially standing still, another way would be to surround them with regions and whoever the player walks up to first is the enemy.
How would i make the campaign so that the first one attacked becomes hostile?

Re: Final Choice?

Posted: Thu Jun 25, 2009 7:15 pm
by jangoisbaddest
jedimaster745 wrote:
[RDH]Zerted wrote:
jedimaster745 wrote:...the character is given a choice between two targets, and the one who is attacked becomes hostile, and the one who wasnt attacked either just stands there or becomes friendly, and either choice results in victory?...
There are a few ways you can do it. One way is to use event callbacks and see which is damaged first by the human player. If the two targets are initially standing still, another way would be to surround them with regions and whoever the player walks up to first is the enemy.
How would i make the campaign so that the first one attacked becomes hostile?
You would have Vader and the Emperor on separate teams. These teams would be friendly to everyone at first. When your callback happens to check and see which path the player has chosen, you use SetTeamAsFriend/Enemy functions as appropriate.

The one thing I don't know how to do in this situation is create a branch in the objective structure - that is, how to create two different sequences of objectives based on this choice. However, most things (dialogue, etc) can be controlled by a simple boolean variable (true/false). For example, if you want to create dialogue that says "How dare you choose vader!", make the callback check the variable "IsVaderChosen" (or whatever you want to name it). If true, display the dialogue. If false, display alternate dialogue from vader (ex. "Soon you will perish", or w/e). But regarding the objectives, idk if that's a real hardcode issue or not. Someone with more coding experience should be able to (hopefully) shed some light on that.