Freedom Force Forums > Scripting Forum
EZscript, Oh behave yourself!
qazwsx:
Ok so I'm trying to give consequences to the player's decisions and naturally you can decide to behave badly. Some whipped on something like this(unfinished):
--- Code: ---Story: Morlock Massacre
Encounter: Hurt
Type: Custom
Actions: Rivals start at distance, Timed Encounter
Allies: x
Rivals:bacchite_extra
Marker: Hurt
Time: 4 seconds
Start Cutscene:
Rival moves to Ally
Cinematic Camera on Ally to Rival
Rival plays animation stunned
Ally turns to Rival
Ally says, "What is it child, are you hurt?!"
Rival says, "Ple.. Please... help.. the others..."
Rival plays animation fall
Timer Expired cutscene:
Fade for 0 seconds
Ally says, "Get her medical attention immediately!"
Rival is destroyed
Unfade for 2 seconds
Encounter: Investigate
Type: Chat
Allies: x
Map: cityfreedom
Marker: Investigate
Chat Cutscene:
Hero turns to Ally
Ally turns to Hero
Cinematic Camera on Hero to Ally
Hero says, "Professor, did she make it?."
Cinematic Camera on Ally to Hero
Ally says, "I'm afraid not, tragically. But we must now concentrate on what can still be done"
Ally says, "Before her passing, I was able catch a glimpse of a bystander who saw her being chased. He was entering a building which resembled a.. top hat. Find out what you can."
Hero says, "On it professor."
Encounter: Interrogate
Type: Simple Choice
Allies: gangster
Map: tophat
Choice1: Ask nicely
Choice2: Act like a female no no place
Next: If Ask nicely: Choose 1 from Spill the beans, Ignored
Next: If Act like a female no no place: Fight
Primary Objective: "Investigate the incident"
Start Cutscene:
Camera on Ally
x says telepathically, "That's him."
End Cutscene:
Cinematic Camera on Hero to Ally
Hero says, "Excuse me"
--------------------------------------------Choices--------------------------------------
Encounter: Spill the beans
Type: Cutscene
Allies: gangster
Map: tophat
Bonus: 50 prestige and 25 xp
Next: Manhole
Start Cutscene:
Cinematic Camera on Hero to Ally
Ally says, "They came that way from the city, guy was a large hairy bastard."
Hero says, "Appreciate it."
Ally says, " Don't mention'"
Start Cutscene:
Cinematic Camera on Hero to Ally
Ally says, "They came that way from the city, guy was a large hairy bastard."
Hero says, "Appreciate it."
Ally says, "Yeah just leave me alone freak."
End Cutscene:
Hero says, "Professor, I suspect this may have been Sabertooth's doing"
x says telepathically, "Yes, that seems quite likely. However it might be a bit soon to conclude that as fact."
x says telepathically, "I want you to find out more."
Hero says, "You read my mind"
Encounter: Ignored
Type: Simple Choice
Allies: gangster
Map: tophat
Choice1: Ask nicely again
Choice2: Threaten
Next: If Ask nicely again: Choose 1 from Ignored, Lie
Next: If Threaten: Choose 1 from Spill the beans, Fight, Lie
Start Cutscene:
Cinematic Camera on Hero to Ally
Ally says, "Scram, yer freak"
Start Cutscene:
Cinematic Camera on Hero to Ally
Ally says, "Scram"
Start Cutscene:
Cinematic Camera on Hero to Ally
Ally says, "frell off"
Start Cutscene:
Cinematic Camera on Hero to Ally
Ally says, "Sod off female no no place"
Start Cutscene:
Ally says, "."
Start Cutscene:
Hero says, "..."
Start Cutscene:
Hero says, "."
Start Cutscene:
Hero says, ".."
Encounter: Lie
Type: Cutscene
Allies: gangster
Map: tophat
Next: Goosechase
Start Cutscene:
Cinematic Camera on Hero to Ally
Ally says, "She came that way east. Freak."
Encounter: Goosechase
Type: Wait
Map: tophat
Next: Ignored
Primary Objective: "Investigate"
Minimum Time: 6 seconds
Maximum Time: 12 seconds
Encounter: Fight
Type: Custom
Actions: villains fight heroes, allies fight villains, Allies Fight Heroes, Allies Start At Distance, Villains Can Be Interrogated
Map: tophat
Villains: gangster
Allies: Security, Security
Primary Objective: "Get him to talk without causing any more trouble" for 0 prestige and 30 xp
Next: If Allies Saved: Manhole
Next: If Allies defeated: Lose
Alert Cutscene:
Cinematic Camera on Hero to Villain
Villain says, "Why you little! I'll have your head for this!"
Hero says, "You can try, bud, die tryin'."
Banter Cutscene:
Ally says, "Oy we cannot have that behaviour in this establishment! Leave it out!"
Interrogation Cutscene:
Cinematic Camera on Villain
Villain says, "Alright alright! What do you want from me?!"
Hero says, "You saw a ragged girl being chased. Who and what!?"
Villain says, "it was a large hairy bloke and they came that way from the city, that's all I know I swear to god.
Hero says, "Swear to me!!!"
Villian says, "I swear! I swear!"
Ally says, "I insist you desist or we're calling the cops!"
Hero says, "I was just about to leave. heh... I've had my fun."
End Cutscene:
Hero says, "I think this is Sabertooth's handiwork."
x says telepathically, "Yes, get out of there and make sure without doing any more damage"
Hero says, "Soree"
Encounter: Manhole
--- End code ---
Would it work so the player would get in trouble for murdering bouncers? Oh and how about the use of the "banter" cutscene? Will it play midway through the fight and is there a way to control when? Lastly is it possible to have a script where attacking civs in the city will get you shot at? Cheers!
M25:
You can certainly have different story branches based on the outcomes of an encounter. Look at the documentation and you'll see which endings are available for each encounter type and you can set up the story using those.
Banter cutscenes are played at random intervals during an encounter. There's no way to control exactly when or which one is played. They are meant to be random color.
You can play a cutscene when someone is KO'd, such as
Villian KO Cutscene:
...
thug_with_gun KO Cutscene:
...
For the civilians, you could fake it by setting up the map so that civilians spawn at certain places, and then use an encounter to check if they are hurt. I would put some markers named 'civilian1', 'civilian2', etc. on the map to control where the civilians pop up.
Encounter: Leave the Civ Alone
Type: Custom
Actions: villain stops at two-thirds health
Villains: civilian_male
Marker: civilian
Next: Cops Investigate Heroes
Villains stop Cutscene:
Civilian says, "Help! These so-called heroes are attacking me!"
You can run that encounter more than once, at the same time, to have multiple civilians.
Encounter: Start Civilians
Type: None
Next: Leave the Civ Alone, Leave the Civ Alone, Leave the Civ Alone
qazwsx:
lol :thumbup: Genuis! Would running many of them strain the cpu though? I'm really starting to get the hang of ezscripting but I still can't make the freeroam start after another. Nothing happens if you click on "mission briefing"(I've even tried adding a briefing cutscene), and there's no way out of the base screen. Does the base screen's map need to be a seperate map from the map which you start on?(that's what you did with your sample) If so, how do you transition from the base_map to the "start map"? Cheers mate.
qazwsx:
O and one more minor question, is there a cutscene command to have the characters Kayoed? If I play the fall animation they get back up again before the next action. Sorry I know this must rather tedious, it'll die off soon I promise :lol:
M25:
An example.... If you have a base called hideout, and you want to move to a map called mycity, you need the following:
Three directories: one called hideout, one called mycity, and one called freeroam.
The hideout map needs to have a marker called base_map, a marker called mapname_hideout, and a marker called to_mycity
The mycity map needs to have a marker called mapname_mycity, and a marker called to_hideout
Inside Missions/freeroam/mission.py change the starting map to 'hideout'.
Encounters don't take a lot of cpu time until they are actually running (the hero gets close enough to activate it), so having several on the map at once shouldn't be too much of a problem.
You can ko a character in a cutscene by using 'is killed'
Villain is killed
You can completely remove a character from the map by using 'is destroyed'
Navigation
[0] Message Index
[#] Next page
Go to full version