Python used in Freedom Force

W

Wayne Folta

I don't know if it's been discussed since the game came out a while
ago, but I was looking through some temp files that were installed with
the game Freedom Force (a very fun game) and the scenarios are
programmed in Python! (This is on the Mac, but I assume it also used
Python on the PC.)

An example of the code is:

def OnPowerup(object, hero):
if (object == 'powerup5'):
speakNoCB('minute_man', 'MISSPCH_1_MM_12')
elif (object == 'powerup1') or (object == 'powerup6'):
speakNoCB('minute_man', 'MISSPCH_1_MM_11')
Object_SetAttr(object, 'used', 1)
UpdateTrainArrow(object)

def OnInterrogation(char, hero):
print 'OnInterrogation'
Object_SetAttr(char, 'used', 1)
UpdateTrainArrow(char)
# kill(char)


:
:

# chase
def startChase(event):
startPatrol('runfciv', 3, run = 1, priority = ai.goal.PRI_HI)
addMoveGoal('thugb16', Get_ObjectPos('runfciv'), fn =
'continueChase')

def continueChase(event):
addMoveGoal('thugb16', Get_ObjectPos('runfciv'), fn =
'continueChase')

def endChase(event):
clearGoals('runfciv')
speakNoCB('runfciv', 'MISSPCH_1_F1_02')
 
B

BW Glitch

Wayne said:
I don't know if it's been discussed since the game came out a while ago,
but I was looking through some temp files that were installed with the
game Freedom Force (a very fun game) and the scenarios are programmed in
Python! (This is on the Mac, but I assume it also used Python on the PC.)

Yes, it does.
An example of the code is:
[snip]

Careful with that... I was also surprised. The mods written for FF are
also in Python. It feels great that the game I like most uses Python. :D

--
Glitch

http://andres980.tripod.com/

Sow the seeds of fear and victory is yours.
-- Iguanus (G1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top