control

define player chcracter

value

as: |startPosition|map|

atributes

  • * startPosition [point|vector]
  • * shotSource [point|vector]
  • * targetBhone [String]
  • * armedBhone [String]
  • * armedTransform [transform]
  • * disArmedBhone [String]
  • * disArmedTransform [transform]
  • * disArmedTransform [transform]
  • pickWeapon [Boolean:false]
  • cameraSide [Float:0.25f]
  • cameraHeight [Float:1.65f]
  • cameraHeight [Float:1.65f]
  • cameraMaxDistance [Float:5f]
  • cameraMaxMinDistance [Float:2.5f]
  • cameraMinDistance [Float:1f]
  • acelerationSpeed [Float:1f] //m/s2
  • acelerationRotate [Float:10f] //degrees/s
  • walkSpeed [Float:1.5f] //m/s
  • runSpeed [Float:3f] //m/s
  • jumpSpeed [Float:2f] //m/s
  • runToJumpSpeed [Float:3.75f] //m/s
  • colisionRadius [Float:0.5f] //meter
  • frameWindow [Float:0.25f] //sec
  • heightDown [Float] 0.8f
  • heightUp [Float] 1.4f
  • *1 bhoneSkin [bhoneSkin]
  • *2 weapon [weapon]
  • *3 shot [shot]
  • map [map[]]
  • item [item[]]
  • animation [animationTransform[]]
  • colision [colisionp[]]

nodes

control

  • hit([Float]) remove life //%
  • kill()
  • heal([Float]) add life //%
  • #[location] location() player location

Examples

control(startPosition: _point(x:-4.923f,y:4.003f,z:-0.399f),
        shotSource:_point(x:-0.033f,y: 1.301f,z: 0.588f),
        targetBhone:"jnt3", disArmedBhone:"jnt30", armedBhone:"jnt24",
        armedTransform:_transform(x:-0.07f, y:-0.01f, z:0.04f,
                                  rotX:75f, rotY:-13f, rotZ:-84f),
        disArmedTransform:_transform(x:-0.1f, y:-0.1f, z:-0.1f,
                                     rotX:103f, rotY:0f, rotZ:4f)){
    shot( appearance:shotMat, clip:"data/amy/sounds/shot.wav" )
    bhoneSkin(appearance:_appearance(texture:"data/amy/amy.png"),
              bhoneFile:"data/amy/amy.bon",
              skinFile:"data/amy/amy.skn" ){
        frame("data/amy/keys/stand.ang", name:"STAND");
        // ...
    };

    weapon(){
        model(file:"data/amy/pistol/pistol.mod",
              appearance:_appearance(texture:"gun.png"));
    };
};