Hi,
Here is a new GameLogic that is laying around on my disc for quite a while. As there was a request for such thing, I removed the dust, polished it and now it is here.
Models are from the contributors of AddAThing - OutdoorItems.
[INDENT]The Switcher
[/INDENT]Runs on 2.49 and 2.5x.
What is it good for?
Quite simple: The switcher switches through a list of objects.
Setup:
E.g. you want to switch through multiple cameras
- Apply some logic when to switch (e.g. Keyboard sensors),
- trigger the switchers methods which set up and activate
- a Scene Actuator in “Set Camera” mode.
You can activate multiple actutators.
You can activate multiple actuators on multiple objects.
It switches from the currently set acutaors parameter.
The objects to switch through can be tagged with a property e.g. “camera”. This name must be the value of property “property” at the switcher object.
Please have a look at the Demo file for the Python code and multiple examples. I hope it is not to confusing. Check the AAREADME how to run the demo, see the in-game text for more.
Tested actuators are:
- Camera actuator
- Scene actuator “Set Scene”
- Parent actuator “Set Parent”
- TrackTo actuator
Example in detail:
Switcher object
Properties:
string property “property” value: “camera”
Logic Bricks:
Keyboard “Q” -> Python Module “Switch.next” -> Scene Actuator “Set Camera”
Keyboard “A” -> Python Module “Switch.prev” -> the same actuator
Cameras to be switched to
Properties:
“camera” - type and value do not matter
I hope you can use it.
I know the Demo file looks a bit complicated. If you need help … ask
Monster
Attachments
SwitcherDemo_.blend (922 KB)