ive got 2 questions...

i was just wondering, how do you acheive forced based damage, and, is it possible to have a thing that like… stops time while you press down a cirtain button? like the prince of persia: sands of time or whatever it is called game? like that type of thing… i thank you if you could help me… but if you cant and reply anyway… i thank you for your replies :smiley:


for the stop time thingie, just broadcast a message (leave the name field blank on a message actuator to have it broadcast to all objects).

like have a message called Stoptime

Every dynamic object, and your bots/monsters/whatever, will need to have a property … lets call it “Stoptime”, at default we want it off, so make the property into an intager, and set it to 0.

When dynamic objects get a message “Stoptime” have it set the property “Stoptime” to 1

then use a property sensor that looks for the property "stoptime to be “1”, then simply use a very small value in the LinV +z global axis, with a motion actuator, something like .0001.
This will make things totally stop in mid air.

you can do the same thing for your bots… have them looking for the message, and if a property is switched on, then they stop their animation, and get a LinV +z global .0001.

it wont be exactly like stopping time, because when you resume, the dynamic objects will not have the same velocity, or trajectory as they had when time stopped… they will just fall to the ground.

I bet with python you could get the velocity when it stopped time, then give it a bit of a push when it resumed time. But that is a bit out of my league.

rather than saying stop time, just have some way that your player casts forcefields on things that you freeze. Then you would not have to make any velocity calculations.
Call it a Stun spell, or a forcefield or something… (dont forget to add cool forcefield special effects to the things that get stopped)

well, that is my idea, I bet there are other ways to do it too :smiley:

wow… that was a fast reply Mmph!. didnt take as long as i thought it would… but what about making force based damage? or maybe realistic velocity increases… i found an equasion in my math book for that… but its at school… and im not much of a python person so i wouldnt be able to do that myself… ittl take a while before i get to that level :smiley:

I wouldn’t suggest Mmph’s method for stopping time, because it clears speeds, and when time is resumed again, noting would be moving. it’s also a bit of a waste to save linear velocity to properties, 'cause it’d take 3 props per object. and the big problem: there is no way to get rotational velocity, and I doubt stopping it would be very possible.

but, there’s a magical function in python called suspendDynamics(), which basically pauses the physics engine for that object. I don’t really have the time to go into detail on how to use it, but I doubt it’s that complicated, and if you can’t do it somebody else might be kind enough to show you how.\

[edit] oh yeah, use restoreDynamics() to (surprise) restore dynamics when you want to unfreeze time

Hmm, thats cool. But if you dont use py, could you use the constraint actuator 3 times to constrain all movement to 0 for each axis when the key is pressed?

Or use suspend scene and then another scene to do whatever, the resume scene?

ok… ive got the whole suspendDynamics() and resumeDynamics() thing but im trying to figure out a script to work with it… and i almost got it but i just cant get the last line of code right…
heres the code so far for resuming time…

import GameLogic as g
import Rasterizer as r
if property(time = 2)

ok… the sensor TurnTimeOn is (just as it sais) a sensor that turns time back on (just the down arrow) the second sensor If2 is a property sensor so that once that the property time equals 2 and i press the down arrow it subtracts one from it and that it only works when it equals 2… to simplify, it means that if the property time equals 2 and i press down, it will resume time and subtract one from the property. to turn time off i just change the corresponding sensors and the sensor # and the resumeDynamics() to suspendDynamics() oh yeah, also the sensors are attached to a python controller. get it? mmk now i was wondering what was wrong with the last line. (im not a very big programmer, still pretty noobish in the programming feild :D) id like the help wth this…


anyone got an answer?

Don’t you need to use functions like

somewhere in the script to get object properties

so your script would be like this

import GameLogic as g
import Rasterizer as r
if o.time=2

I don’t know where you got get.sensor, I didn’t need them to check properties. I also don’t know too much about python so it may or may not work.

On the last line just tab it after deleting the empty space before it, I can’t seem to tab a line when editing a post.

thnx ill try that. now someone just needs to answer my other question. :smiley: (is it possible to acheive force based damage in BGE?)

hmm never mind… i just cant get it to work… python is confusing to me :frowning:

its restoreDynamics()

oh… i guess i wrote it down wrong… lol srry

oh yeah and i wont be able to make many more posts this week because of some technical difficulties with my computer (im usign my moms computer) and i wont be able to use blender because i completely formatted my computer and tried to reinstall evrything but i dont have inernet so i cant reinstall evrything… soo c u again sometime next week (when my uncle is coming down with some equipment to fix my personal computer) :smiley: