Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (Dico), 16,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Movement Interaction #204110
04/26/08 18:42
04/26/08 18:42
Joined: Oct 2007
Posts: 42
Minnesota, USA
Techd Offline OP
Newbie
Techd  Offline OP
Newbie

Joined: Oct 2007
Posts: 42
Minnesota, USA
Good Day \:\) Would someone do me the honor of converting this code from Pappenheimer Signature MI Tutorial movement interaction tut to A6 Please. I keep getting these errors.

my._temp bad keyword or unknown parimenter.
 Code:
DEFINE _state_stand, 1;
DEFINE _state_innocent, 2;
DEFINE _state_walk, 3;
DEFINE _state_turn, 4;
DEFINE _state_ugly, 5;

DEFINE _height, skill27;

var fall_speed = 17;

action follower2
{
my._state = _state_stand;
while (player == null) { wait(1); }
while(1)
{
you = null;
trace_mode = ignore_me + ignore_models;
if (my._height > 5)
{
my._animframe += time * fall_speed;
ent_cycle ("fall", my._animframe); 
}
else
{
vec_set (my._vel_x, nullvector);
temp = trace(my.x, player.x);
if (you != null)
{ 
if (you.transparent == on)
{
trace_mode += ignore_you;
temp = trace(my.x, player.x);
}
}
if (temp != 0) 
{ 
my._animframe += time * stand_speed;
ent_cycle("stand", my._animframe); 
my._state = _state_stand;
}
else 
{
vec_set (temp, nullvector);
temp.x = 1;
vec_rotate (temp, player.pan);
vec_set (my._temp, my.x);
vec_sub (my._temp, player.x);
if (vec_dot(temp, my._temp) > 0) 
{ 
my._animframe += time * innocent_speed;
ent_cycle("innocent", my._animframe); 
my._state = _state_innocent;
}
else 
{ 
vec_set (temp, player.x);
vec_sub (temp, my.x);
vec_to_angle(my._angle, temp);
if ((abs(ang(my._angle - my.pan)) < 5) 
  || ((abs(ang(my._angle - my.pan)) < 20) 
          && (my._state != _state_turn)))
{
if ((vec_dist (my.x, player.x) > 150) 
   || ((vec_dist (my.x, player.x) > 100) 
         && (my._state != _state_ugly)))
{
my._animframe += time * walk_speed;
ent_cycle("run", my._animframe);
vec_set (temp, nullvector);
temp.x = follow_speed;
vec_rotate (temp, my.pan);
vec_set (my._vel_x, temp);
my._state = _state_walk;
}
else
{
my._animframe += time * ugly_speed;
ent_cycle("uglysmile", my._animframe); 
my._state = _state_ugly;
}
}
else
{
my._animframe += time * turn_speed;
ent_cycle("walk", my._animframe); 
my.pan += time * t_speed 
    * sign(ang(my._angle - my.pan));
my._state = _state_turn;
}
}
}
}
vec_set (temp, my.x);
temp.z -= 4000;
trace_mode = ignore_me + ignore_passable + use_box;
my._height = trace (my.x, temp);
if (my._height > 0) { my._vel_z = -5; } 
else { my._vel_z = -my._height; }
vec_set (temp, my._vel_x);
vec_scale (temp, time);
move_mode = glide;
ent_move (nullvector, temp);
wait(1);
}
}


Thank You! This will increase my workflow


Life is what you make it just like Games!
Re: Movement Interaction [Re: Techd] #204111
04/26/08 18:47
04/26/08 18:47
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Just add:
 Code:
DEFINE _temp, skill28;

Underneath the _height definition.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1