Results 1 to 4 of 4

Thread: UserAction

  1. #1
    Staff Sergeant
    Join Date
    Dec 15 2003
    Location
    Alicante - Spain
    Posts
    201
    I'm trying to make a working siren for a police car, and make the siren start the animation with an user action in the menu.

    The animation works (when the wheels are moving) but i cant made the action be show in the game. i have tryed with animationsource class and useractions class in config.cpp


    a picture of the vehicle.

    http://www.ffaa.es/archivos/media/fotos/sirenasGC.jpg

    thanks in advance.


    \"VADE ET TU FAC SIMILITER\" - Ve tú y haz lo mismo.
    \"PACTA SUM SERVANDA\" - Los pactos hay que cumplirlos.
    \"SI VIS PACEM, PARA BELLUM\" - Si quieres la paz, preparate para la guerra

    Mod Fuerzas Armadas -> www.ffaa.es

  2. #2
    There are a couple of examples of user actions here:

    http://www.flashpoint1985.com/cgi-bin....2;st=15

  3. #3
    Staff Sergeant
    Join Date
    Dec 15 2003
    Location
    Alicante - Spain
    Posts
    201
    Author of the Thread
    Thanks.

  4. #4
    Staff Sergeant
    Join Date
    Dec 15 2003
    Location
    Alicante - Spain
    Posts
    201
    Author of the Thread
    ok, I finally make the action be show in the player menu, but now, I have a problem with the animation, it only last a couple of seconds.

    This is the code for the anim.
    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> class Animations
    {
    //sirenas
    class LuzSirenaDerecha
    {
    type=&#34;rotationY&#34;; // always &#34;rotation&#34;
    source=&#34;sirenas&#34;;
    selection=&#34;SirenaDerCono&#34;; // the name of the moving object
    axis=&#34;SirenaDerEje&#34;; // the name of the axis
    memory=1;
    sourceAddress=&#34;loop&#34;;
    minValue=0;
    maxValue=1;
    angle0=0 // the start angle
    angle1=&#34;rad + 360&#34;; // the end angle, in radians &#40;= degrees/57.3 = degrees * 180/p&#41;
    };
    class LuzSirenaIzquierda
    {
    type=&#34;rotationY&#34;; // always &#34;rotation&#34;
    source=&#34;sirenas&#34;;
    selection=&#34;SirenaIzqCono&#34;; // the name of the moving object
    axis=&#34;SirenaIzqEje&#34;; // the name of the axis
    memory=1;
    sourceAddress=&#34;loop&#34;;
    minValue=0;
    maxValue=1;
    angle0=0 // the start angle
    angle1=&#34;rad -360&#34;; // the end angle, in radians &#40;= degrees/57.3 = degrees * 180/p&#41;
    };
    };
    //Fin sirenas[/QUOTE]

    this one, the code for the useraction.
    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
    class AnimationSources
    {
    class sirenas
    {
    source = &#34;user&#34;;
    animPeriod = 1;
    initPhase=0;
    };
    };
    class UserActions
    {
    class SirenaOn
    {
    displayName=&#34;Poner sirena&#34;;
    position=&#34;SirenaIzqLuz&#34;;
    onlyforplayer=1;
    radius=4;
    condition = &#34;this animationphase &#34;&#34;LuzSirenaDerecha&#34;&#34; &#60; 0.5&#34;;
    statement = &#34;this animate &#91;&#34;&#34;LuzSirenaDerecha&#34;&#34;, 1&#93;;this animate &#91;&#34;&#34;LuzSirenaIzquierda&#34;&#34;, 1&#93;;&#34;;
    };
    class SirenaOff
    {
    displayName=&#34;Quitar Sirena&#34;;
    position=&#34;SirenaIzqLuz&#34;;
    onlyforplayer= false;
    radius=4;
    condition = &#34;this animationphase &#34;&#34;LuzSirenaDerecha&#34;&#34; &#62; 0.5&#34;;
    statement = &#34;this animate &#91;&#34;&#34;LuzSirenaDerecha&#34;&#34;, 0&#93;;this animate &#91;&#34;&#34;LuzSirenaIzquierda&#34;&#34;, 0&#93;;&#34;;
    };
    };
    [/QUOTE]

    whats wrong ? i would like that the animation plays until i say stop... thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •