Again whith the slowmotion thing

Hi :smiley: .I have a question about slowmotion(Im kinda a slo-mo fan :expressionless: ).Is it possible to make the game run smoother when the slowmotion is on(when the slowmotion is realy slow , the game is running kinda sharp like flashy or something…you know what i mean :slight_smile: ?So , is it possible???

i dont know a way to do that sorry :frowning:

Thats sad :frowning: .But thanks anyway NOR J :smiley: !

no problem Eduard :slight_smile:

The reason the slowmotion is jumpy is because all it’s doing is suspending and then restoring and then suspending and then restoring the scene rapidly. That means the game pauses for a frame, then goes for a frame, pauses for a frame, goes a frame, and so on. To make it smooth you’d have to find a way to lower the physics of everything, cut all current forces in half, slow gravity’s effect by half, and everything. I don’t know how you’d go about doing this, other than python, but i’m sure it’d be possible, just a really hefty script.


Hmm ,in a .blend file the game runns smoother :-? .Can i make the exe file go that smooth or atleast a bit like in the .blend?

i dont know. If you use the way Pooba said it should go smooth in the .blend and the .exe i think.

Yeah,I guess so.Thanks guys :smiley: !

If you create all motions actuators in a python script, you can easely acces those values and change them with another python script. But how? Figure that out, I’ve always the idea how to do, but most of the times I can’t get it to work because of lag in python knowledge. :-?

Maybe someone can create a Python script to do this for us. Hmmf.

I’m not a python expert bu i think i saw a tecniche of making slowmotions effects on AlleyFighter. Insted of suspend and restore a scene the script uses a property called gamespead. I didn’t see any subjet on this in the forum.
Had anyone tested it?

i cany find the AlleyFighter.blend annymore, cany someone give a .blend?
I think it isent slow motion in the AlleyFighter game, i think it is just slow armature-actions. But i havent seen in the .blend file yet

i cany find the AlleyFighter.blend annymore, cany someone give a .blend?

Grab the file here:

i think it is just slow armature-actions. But i havent seen in the .blend file yet

I don’t think your rigth. Take a look at the Actions script. It has a part that looks like this:

if (not hasattr(ob,"gamespead")):
	ob.gamespead = 1.0

def HandleSpead():
	sen = co.getSensor("sen_spead")
	if sen.isPositive():
		for body in sen.getBodies():
			ob.gamespead = eval(body)
			print eval(body)

As you can see, the sen_spead sensor is a message sensor the carries the spead value. I couldn’t repeat the same behavier of AlleyFighter in another testing blender file, but as i sad i’m not a python expert!

i think you are right maniac :slight_smile: .

Hi again :smiley: .So did anyone figure out the alley fighter slow-mo thing?(at first i thought the same NOR J thought about the slow armatures,but maybe it IS slowmotion and we wont have to suspend scenes and stuff - would be a nice way to do slowmotion on single objects :slight_smile: )

you could make a good slowmotion game using properties and messages, but it would require alot more work

every moving object would need a property “slowmo” set to 0 or 1 (on or off)

connect a key to alternate btwn sending 2 messages “setslowon” and “setslowoff”

and for say an object like a bullet, make 2 motion actuators for both cases, slowon and slowoff

for armature animations, you could duplicate your animation use the “s” key to scale the animation so its longer and play that instead. you could also connect the action actuator to a property to control the speed without duplicating “actions”

unfortuneatly there willl prob still be a few probs, like gravity (which may be changed with python??)

Gravity can be increased or decreased by changing “Grav” in the Mist/Stars/Physics tab of the World Buttons. No need for Python.

NOR.J wrote:

I think it isent slow motion in the AlleyFighter game, i think it is just slow armature-actions. But i havent seen in the .blend file yet

Well, i think you were right NOR.J.

I found out the AlleyFighter slowmotion trick. Here it is:

Just add a time property called ‘time’ and a float property called ‘frame’
to the object you want to make the slowmotion. Atention, this will work with IPOs and Actions.

Add an ‘Always’ sensor to the object and link it to a ‘Python’ controller. In this Python controller just put the name of the script with this code:

co = GameLogic.getCurrentController()
ob = co.getOwner()
se = co.getSensor("speed")
ac = co.getActuator("Run")


if (not hasattr(ob, "gamespeed")):
	ob.gamespeed = 1.0

if se.isPositive():
	for body in se.getBodies():
		ob.gamespeed = eval(body)
time = ob.time * ob.gamespeed
print time
ob.time = 0

ob.frame = ob.frame + time * FRAMESPEAD

if ob.frame >= end_frame_of_your_animation:
	ob.frame = 1


The speed sensor is a message with the value of the speed. Use 0.25. This is a greate value.

scaling the action is a good tecniche , but i still prefer this one ineedanewbi

I’v tried this in the ‘rungirlrun.blend’ file and it worked fine!!!

I tried this script, but couldn’t get it to work. I if understood correctly an object with an IPO or Actions need a time property called ‘time’ and a float called ‘frame’, with an always sensor running this script, and i did this and counldn’t get it to work. Do you need certian name for the sensors or controllers (this seems implied in the script), and anything else?

I had a go at this slow mo and think i’m on to something check it out

and yes the link will work :expressionless: