Using the info you all gave me and my gradual understanding of how it all works I managed to get the quest functional.
The script checking if the villagers or raiders are dead is
BEGIN OnDeath set WPMS01.WPMS01RaidersHos to (WPMS01.WPMS01RaidersHos + 1 ) BEGIN OnDeath set WPMS01.WPMS01VillagersHos to (WPMS01.WPMS01VillagersHos + 1 )
if ( GetStage WPMS01 == 40 && WPMS01.WPMS01RaidersHos >= 4 && WPMS01.WPMS01VillagersHos == 0) SetObjectiveCompleted WPMS01 20 1 if WPMS01.WPMS01VillagersHos >= 1 SetObjectiveCompleted WPMS01 20 1 endif
I then modified my raider leader death script so the player gets a different result depending if they saved the villagers.
BEGIN OnDeath if WPMS01.WPMS01VillagersHos >= 1 SetObjectiveCompleted WPMS01 30 1 setStage WPMS01 60 endif if WPMS01.WPMS01RaidersHos >= 4 && WPMS01.WPMS01VillagersHos == 0 SetObjectiveCompleted WPMS01 30 1 setStage WPMS01 50 endifend
I then have the end dialogue check the stage and give the appropriate reward.
The only bit I am unsure about is;
if WPMS01.WPMS01VillagersHos >= 1
SetObjectiveCompleted WPMS01 20 1
endif.
That part means the player let the hostages die and thus failed the bonus objective. I do not want the player to fail the quest, just that objective, can I use something else other than SetObjectiveCompleted to visually represent that in game?
One more thing, is there a tutorial on one time only force greeting? I am thinking of have the raider leader give a few lines before actual combat.
Also, thank you to all those that have replied to my topic, you have all been a great help.