I have a similar one and can't figure out how to solve that.
It is in regard with the sf25b i created, the model is finished and i am trying to make the panel look like the real one.
There's a lever on the panel that opens a ventilation shaft in front of the canopy.
by pressing a key the ventilation opens/closes, that's happens with a small nasal script.
But the lever on the panel does not.
Vice versa, when the lever is clicked it moves, but the ventilation not.
Here are the nasal and the xml codes:
nasal:
- Code: Select all
var toggle_ventilation = func {
ventilation = aircraft.door.new ("/controls/ventilation/",1);
if(getprop("/controls/ventilation/position-norm") > 0) {
ventilation.close();
} else {
ventilation.open();
}
set:
- Code: Select all
<key n="100">
<name>d</name>
<desc>Toggle Air Ventilation</desc>
<binding n="0">
<command>nasal</command>
<script>sf25b.toggle_ventilation()</script>
</binding>
</key>
lever xml:
- Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<path>lever.ac</path>
<animation>
<type>translate</type>
<object-name>lever</object-name>
<property>/controls/ventilation</property>
<interpolation>
<entry><ind>0.0</ind><dep>0.0</dep></entry>
<entry><ind>1.0</ind><dep>0.03</dep></entry>
</interpolation>
<axis>
<x>1</x>
<y>0</y>
<z>0</z>
</axis>
</animation>
<animation>
<type>pick</type>
<object-name>lever</object-name>
<action>
<button>0</button>
<binding>
<command>property-toggle</command>
<property>/controls/ventilation</property>
<min>0</min>
<max>1</max>
<wrap>0</wrap>
</binding>
</action>
</animation>
</PropertyList>
Attached is an image.
Any suggestions will be appreciated.
PS: Two questions, not related to the topic:
1. The model is way over 10000 vertices, it's about 17000. Is that ok?
2. I created some new instruments, the textures are 512x512, should i convert them to 256x256?
Cheers.