^ Because this is old pre-lite-c AUM code it is not a pointer at all or for a fact a vector.

Old A5 code I started with. var could be used as a var[3] and accessed with the (dot)xyz

Click to reveal..
Code:
action deadly_spider

{

    var spider_speed;

    var in_front;

    my.enable_entity = on;

    my.enable_impact = on;

    my.event = hurt_them;

    while(1)

    {

       spider_speed.x = 8 * time; 

       spider_speed.y = 0;

       spider_speed.z = 0;

       spider_speed *= time;

       in_front.x = my.x + 40 * cos(my.pan);

       in_front.y = my.y + 40 * sin(my.pan);

       in_front.z = my.z;

       if (content(in_front) == content_solid)

       {

          my.skill40 = my.pan;

          my.skill41 = 30 + random(90);

          while (my.pan < my.skill40 + my.skill41) // rotate 30..120 degrees

          {

             my.pan += 5 * time;

             wait (1);

          }

       } 


       else // free to move

       {

          ent_cycle("run", my.skill20); // play the "run" animation

          my.skill20 += 10 * time; 

          my.skill20 %= 100; // loop 

          move_mode = ignore_passable; // ignore passable entities

          result = ent_move (spider_speed, nullvector);

          if (result == 0) // got stuck?

          {

             spider_speed.x *= -1; // then reverse the movement direction

             my.skill40 = my.pan;

             my.skill41 = 30 + random(90);

             while (my.pan < my.skill40 + my.skill41) // rotate 30..120 degrees

             {

                 my.pan += 5 * time;

                 ent_cycle("run", my.skill20); // play reversed "run" animation

                 my.skill20 -= 10 * time; 

                 my.skill20 %= 100; // loop 

                 move_mode = ignore_passable; // ignore passable entities

                 ent_move (spider_speed, nullvector);

                 wait (1);

             }

            spider_speed.x *= -1; // restore the initial speed

         }

     }

    wait (1);

 }

 wait (1);

}


http://www.coniserver.net/coni_users/web...2_3_3_3_2_2.htm
AUM 42 !!!!

A5 and older code is in on way a simple direct conversion like A6 and pre-lite-c A7 code.

Funny back then lite-c was insane to me, but now that I look back in my mind, WDL was insane !!

Mal

Last edited by Malice; 11/13/15 16:08.