Page 1 of 1

Physicals and Python

PostPosted: Wed Nov 05, 2008 1:33 pm
by GPNMilano
Hey, I just noticed something. I'm pretty sure I know the answer, but not the alcscript.

What I want to do is control a physical (a collider) (not in a subworld) with a pythonfile mod. However when I attach the pythonfile mod to the collider in the alcscript, the pythonfile mod doesn't register it, and the collider isn't controlled by the pythonfile mod. I believe this is because the controls for the collider (its type, and the static mesh) are set in the logic panel of blender. I know that the logic panel descriptions overrides the alcscript for an object. So I was wondering what the alcscript for a collider was.

Re: Physicals and Python

PostPosted: Wed Nov 05, 2008 3:14 pm
by Nadnerb
Exactly what kind of "control" are you looking for? I also don't quite understand what you mean when you say you want to 'attach' the pyfilemod to the 'collider'... modifiers are connected to sceneobjects. They can reference things such as physicals in their parameters. (though referencing responders which then message the affected objects is often nicer)

As for alcscript flags which describe physicals, I'm not sure there are any, seeing as this is mostly covered by the logic panel controls...

Re: Physicals and Python

PostPosted: Wed Nov 05, 2008 4:00 pm
by GPNMilano
Nadnerb wrote:Exactly what kind of "control" are you looking for? I also don't quite understand what you mean when you say you want to 'attach' the pyfilemod to the 'collider'... modifiers are connected to sceneobjects. They can reference things such as physicals in their parameters. (though referencing responders which then message the affected objects is often nicer)

As for alcscript flags which describe physicals, I'm not sure there are any, seeing as this is mostly covered by the logic panel controls...


Let me explain. If in blender, I set the fields for a collider in the logic panel. Then create parameters for a pythonfile mod for something simple like a boolean variable to show and hide the the object, (in this case the collider) pyprp overrides the alcscript settings with the logic panel settings. So the pythonfile mod never takes note of the collider upon export, and the collider remains, when it shouldn't, in the age. Understand now? So my question is, to get around this, what are the alcscript parameters to change an object into a collider, opposed to the logic settings that do this.

This doesn't do this with regions though. For instance in a logic panel you must have "type" then "region" etc. a Pythonfile mod referencing this object, will register the object upon export. But for an object with "type" "collider" it does not.

Re: Physicals and Python

PostPosted: Wed Nov 05, 2008 4:20 pm
by D'Lanor
A quick glance at prp_ResManager.py seems to indicate that a simple "type: collider" would work in alcscript. However, that should make no difference to the way the object is handled.

Re: Physicals and Python

PostPosted: Wed Nov 05, 2008 8:58 pm
by Grogyan
GPNMilano wrote:Hey, I just noticed something. I'm pretty sure I know the answer, but not the alcscript.

What I want to do is control a physical (a collider) (not in a subworld) with a pythonfile mod. However when I attach the pythonfile mod to the collider in the alcscript, the pythonfile mod doesn't register it, and the collider isn't controlled by the pythonfile mod. I believe this is because the controls for the collider (its type, and the static mesh) are set in the logic panel of blender. I know that the logic panel descriptions overrides the alcscript for an object. So I was wondering what the alcscript for a collider was.


I have similar plans, but was thinking how they would work in subworlds as animatable objects.

Eg A Boat goes round a circuit, you get on ad the boat takes you away, but you can't climb off till the boat reaches a stopping location