Real-Time Scaling?

I was wondering if there was any way to scale an object in real-time without IPOs, with a property, on all-three axis’? (axiss… axies… axises…)
I’m sorta thinking about doing a game involving scaling… and any advice/help would be greatly appreciated.

Thanks in advance.

Also… How do you make a signature?

Don’t mind the bullocks.

Yes, you can do this using the object’s scaling property (obj.scaling = [X-axis scaling, Y, Z]).

Thank you!
I’m not familiar with the language of the snake… but I think I’ll be able to figure it out.

But IPO wouldbe the simplest solution ;).

In property mode you can control the IPO with a property.

I made this .blend using object.scaling to create a basic health bar, originally it was going to be used in a video tutorial.

Maybe it can server as a practical use example of the scaling property, which in this file it is controlled by a property. Same results as IPO in this case, but it seems a bit easier to control and modify.

healthbar_v2.blend (92 KB)

“health” property is set to 100, decreased by 5 when space is pressed.

scale = obj['health']/100
obj.scaling = [scale, 1, 1]

The signature you can make by going into your profile view (click your name at the top), then click on ‘Private Messages’ - Edit Signature will appear on the left, for some reason. I think the option’s kind of broken - its placement never made sense to me, but this method works, so…

The only reason I didn’t want to use the property-controlled-IPO is because I’m becoming more familiar with Python, and thought it’d make for a more streamlined approach.
I’ll check out your .blend later today.

Thanks to both of you guys (and/or girls… trying not to offend anyone…)

Also… on a slightly unrelated note, is there a way to “get” an objects speed, then assign it to a property?

obj['prop'] = obj.getLinearVelocity()

If you want the velocity to show in a property in the debug info, you could do something like this:

obj['prop2'] = str(obj.getLinearVelocity())

since lists can’t be displayed in the debug info, it will need to be a string.

@Riyuzakisan I keep getting a"obj is not defined" error… should I be using it as part of a larger script? I assume it’s for 2.57

Thanks in advance

Before Riuzakisan’s code, use

from bge import logic
cont = logic.getCurrentController()
obj = cont.owner

to make it work. This is Blender 2.57 code, by the way.

Just thought I’d ask a question similar to the first one in the same thread (in hindsight, I should have asked them simultaneously, but AI hadn’t thought of it at the time… and I couldn’t find the thread on it at the time.)

Anyway, Thanks for the code SolarLune!

Oh… Um… can I get a blend with the object velocity script… I’m not sure how to set it up… Thanks!