Whats Normal About "Action Command"

Posted By: manic7creations

Whats Normal About "Action Command" - 07/03/07 18:33

Does your player or character do all of their animations when you use the "ACTION COMMAND", is this stuff normal for the "ACTION COMMAND"?
Posted By: MrCode

Re: Whats Normal About "Action Command" - 07/03/07 19:07

Eh?

Do you mean when a model runs through all its animations when there's no action attached to it?

You have to give the model some kind of action behavior in order to stop the animations.
Posted By: manic7creations

Re: Whats Normal About "Action Command" - 07/03/07 22:16

Does my model post to do any kind of animations with this code or not, But my character moves and is animated the whole time with the code below. I have 3DGS 6.6V. Or is there a bug in 3DGS? or Whats What?


/////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////

var video_mode = 7; // 800x600 pixels
var video_depth = 32; // 32 bit mode



////////////////////////////////////////////////////////////////////

string W1_wmb = <W1.wmb>;

////////////////////////////////////////////////////////////////////


function main()
{
fps_max = 30;
level_load (W1_wmb);
wait (3);
camera.x = -12; //set a static position for the camera
camera.y = 740;
camera.z = -2361;
camera.pan = 90; // set the correct orientation for the camera
camera.tilt = -20; // using its pan and tilt angles
}

action cbabe
{
my.fat = off; // the first 3 lines of code
my.narrow = off; // enable the new
c_setminmax(my); // collision detection system used by A6.2 or newer versions
while (1)
{




// move the car using absolute_speed
if (key_cuu == on) // press and hold the "Up" arrow key to move the car
{
c_move(my, nullvector, vector(0, 4, 0), glide);
camera.y += 500;
}
if (key_cud == on) // press and hold the "Down" arrow key to move the car
{
c_move(my, nullvector, vector(0, -4, 0), glide);
camera.y -= 500;
}
if (key_cul == on) // press and hold the "Left" arrow key to move the car
{
c_move(my, nullvector, vector(-4, 0, 0), glide);
camera.x -= 1;
}
if (key_cur == on)// press and hold the "Right" arrow key to move the car
{
c_move(my, nullvector, vector(4, 0, 0), glide);
camera.x += 1;
}





//rightr
if (key_d == on)
{
my.pan += 1; // increase the pan angle of the car
}



if (key_a == on)
{
my.pan -= 1; // decrease the pan angle of the car
}





if (key_space == on) // press and hold the "Space" key to move the car
{
c_move (my, vector(4, 0, 0), nullvector, glide);
}










wait (1);
}
}


//////////////////////////////////////////////////////////////////////////
Posted By: Joey

Re: Whats Normal About "Action Command" - 07/03/07 22:46

o.O your model won't have animations with this code, but i'm still not quite sure what you were intending to ask. could you make it a little bit clearer?

joey.
Posted By: manic7creations

Re: Whats Normal About "Action Command" - 07/03/07 23:09

Joey, My model does have animations with the code, "but does it post to" with to code sample I provided. I thought you have to program them individual actions individualy right????????????
Posted By: Joey

Re: Whats Normal About "Action Command" - 07/03/07 23:17

correct me but i'm not seeing any code line which animates a model in your sample. normally you're doing that through ent_animate or the like. you're moving it, that's correctly, but i'm pretty sure that's not the point for you posting here. i still don't understand your cited words. what do you mean with "but does it post to" with to code sample? your code doesn't animate the model, if that's what you're asking for. normally, you have to write code for it, that's also correct... but i'm not thinking this'll lead to anything.

i'm really going to help you if i just understood your question... sorry!

joey.
Posted By: manic7creations

Re: Whats Normal About "Action Command" - 07/04/07 01:23

"your code doesn't animate the model, if that's what you're asking for. normally you have to write code for it, that's also correct"

That is what I am looking for out of you.
Posted By: MrCode

Re: Whats Normal About "Action Command" - 07/04/07 01:40

Code:

var walk_speed;
var breath_speed;
var jump_speed;

...

if(key_cuu== on)
{
c_move(my,vector(6 * time_step,0,0),nullvector,glide);
ent_animate(my,"walk",walk_speed,anm_cycle);
walk_speed+= 7 * time_step;
}
else
{
ent_animate(my,"stand",breath_speed,anm_cycle);
breath_speed+= 3 * time_step;
}
if(key_cud== on)
{
c_move(my,vector(-6 * time_step,0,0),nullvector,glide);
ent_animate(my,"walk",walk_speed,anm_cycle);
walk_speed+= -7 * time_step;
}
if(key_cul== on)
{
my.pan+= 10 * time_step;
}
if(key_cur== on)
{
my.pan-= 10 * time_step;
}
if(key_j== on)
{
c_move(my,vector(0,0,15 * time_step),nullvector,glide);
ent_animate(my,"jump",jump_speed,anm_cycle);
jump_speed+= 14 * time_step;
}



Kinda the long way, but this is from an old script of mine, so it's very basic.

But that's how you can walk around with animations (if you already have "jump", "walk", and "breath" as animation scenes).

Hope that clears things up.
Posted By: manic7creations

Re: Whats Normal About "Action Command" - 07/04/07 14:44

Mr Code, I am saying that my compiler doesn't run the code the way it post to.
© 2024 lite-C Forums