copy property problem

Is it possible monster to use copy property to copy a property of a another cubes property that is different from the one on the cube with the copy property actuator.Is it possible to code that in python in the blender game engine.

The Property actuator allows to copy the value of a property from another object.

E.g.
Object A with Property “alpha” value “I’m an alpha value”
Object B with Property “beta” value “I’m a beta value”

At Object A you activate a PropertyActuator Mode:Copy; Property:alpha; Object:B; Property: beta.
After that you get “I’m a beta value” in property alpha of object A.

If you need it the other way around you have to use Python.

If you dynamically want to use another object to copy from, you need Python too. You can even use the Python code I send to you at the other thread. It fills the actuators “object” attribute. Beside the trackToActuator it belongs to the PropertyActuator too.

IO hope this is what you meant

Attachments

trackHighestValue_III.blend (74.2 KB)

Dont target properties that are set to zero and use propertyName,propertyName0,
propertyName1,propertyName2 etc to target propertys from lowest to highest that i put in?Do you know what i mean or no?This is going to be for an rts game where you order allies to attack one enemy after the other that you tell them to.I wish that properties could be placed in a state engine.

It is possible. This is (as described in the other thread) the duty of a command pipeline.

This can be a simple FIFO-storage, like a list, a class or even a string with comma separated values.

I suggest a list because it is the simplest solution. Lets see if I can prepare an example…

Will you be finished with it today or tommorow? You can finish it tommorow if you like.

So you want to have some different types of enemies that have different priorities to be tracked to.
Rather than telling the AI which objects these are, have each object know it’s own “attackability”
Then the AI script can go through and get a list of objects ordered by distance+attackability value.
Then you pick the one with the lowest value to track to.

It is best to use numerical values for things, like angles, distances, attack rating, health and add/subtract/multiply them all together to get a “best” target. This means the AI makes a more fluid and realistic choice, and avoids lots of if statements.
If you want an example of this, then have a look at my AI programming snippets in the resource section (in particular the getBestToTrackTo loop)

I want what i said.

It takes a bit longer than I thought. The pipeline alone is not the problem but the context (putting values into the pipeline, dealing with the values) makes it quite complex…

If plossible it would be good if it could use the steering actuator set to pathfollow as well.

The usage of the steering actuator will be a task of the further implementation… :slight_smile:

Okay monster.

Hi 3D solar system builder, still no luck. It is currently a mess of logic. It looks like spagetti-code. I do not think this is what you want or what you can use in any form.

As said the basic is simple (it is just a list) the problem is to apply it to a logic without “overdesign”.

You can still work on it and make it simple.But this is what i was doing with the blend you gave me i highlighted the robots i made that i am programming with the visiblity actuator.I am going to use agoose’s script that uses the steering actuator and it goes to the nearest property which will be the nearest enemy or cover. I will switch between the two scripts via the state actuator.I will use pathnodes from other blends that i find so the cubes with the property enemy can follow the pathnodes using the script from the blend.Would you like to see the blend when i am done?

Hi 3D solar system builder.


I finally finished a demo.

It does not only contains a pipeline (which is just a list), it also contains a quick and dirty selection system and a context manager.

I think you’ll see it is not that easy to stick this features together.

It will take some time to document the concept.

Edit:

  • just in case you do not recognize it:

with left mouse button (hold it) you get a context menu. With releasing the mouse button you select the entry under the system mouse cursor.

Attachments

CommandPipeline_ContextBuilder+.blend (141 KB)