Gamestudio Links
Zorro Links
Newest Posts
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, bigsmack), 1,667 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 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 | chip programmers | 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