ok, do you want to affect all objects or just the player? or just objects with a certain property?
do you know python?
do you want local winds on each fan? or a global wind?
the script you need will vary depending on what you want, and in some cases there will be no need for python.
as for soft bodies, free soft bodies could be affected by wind, but bge does not support rigging of soft bodies (yet). you could use a simple ragdoll of rigid bodies, an armature and a skinned mesh, or just animate the movement.
here’s a quick script that applyies wind to all objects in a line:
import bge
cont = bge.logic.getCurrentController()
obj = cont.owner
scene = bge.logic.getCurrentScene()
objList = scene.objects
#objects with the property "wind" are affected
#the area that will be affected by wind. x1, y1, z1, x2, y2, z2. for diagonal shapes, more math needs to be involved.
area = [0.0, 10.0, 4.0, 4.0, 20.0, 0.0]
#center of the fan
center = [2.0, 10.0, 2.0]
#direction of the wind, also force
direction = [0.0, 10.0, 0.0]
#the property "fan_on" controls if the fan is on or off
if obj["fan_on"] == True:
windy = [abc for abc in objList if "wind" in abc]
if windy:
for aec in windy:
pos = aec.worldPosition
if pos[0] > area[0] and pos[0] < area[3] and pos[1] > area[1] and pos[1] < area[4] and pos[2] > area[5] and pos[2] < area[2]:
aec.applyImpulse(center, direction, False)
you could also take these values from properties, and even activate the flag objects to play animations.
edit: oops. i forgot something in the script. fixed it.