My hero starts flying? WHY?!

Posted By: MGS

My hero starts flying? WHY?! - 10/27/02 15:10

Hello, everybody.

To start with, I haven't got any answer to my question in the Beginners forum, so I really hope that anyone would be experienced enough here to help me. I would appreciate any hint.

I have the following problem: I'm trying to study one of the code snippets (game templates) from our beloved AUM - air combat game where a player shoots helicopters with a rocket. I have modified a couple of things like helicopters generation and player data indication, but what I don't like at all is how the sky looks. It's simply terrible - that sky cube with standard animated sky texture.

I have found one very nice sky sphere with a texture on "Terminal 26" website and wanted to replace that awful sky cube with that nice sky sphere. I didn't change anything else - I swear.
You know what happens now? When I start my level, my hero simply starts slowly floating into the air! Getting higher and higher, verdammt noch mal! Really surprising, because the only thing that I've changed was deleting the cube and inserting that sphere into my level. I HAVEN'T changed player movement code anyhow. Here is how it looks like:

code:
action player_moves
{
player = me;
my.health = 100;
my.invisible = on;

my.enable_impact = on;
my.enable_entity = on;
my.event = player_event;

while (my.health > 0)
{
vec_set (camera.pos, my.pos);
camera.tilt += 20 * mouse_force.y * time;
camera.pan -= 20 * mouse_force.x * time;
my.pan = camera.pan;
my.tilt = camera.tilt;
player_speed.x = 15 * (key_w - key_s) * time - 0.5 * recoil;
player_speed.y = 10 * (key_a - key_d) * time;
vec_set (temp, my.x);
temp.z -= 1000;
trace_mode = ignore_me + use_box;
player_speed.z = -trace (my.x, temp);
move_mode = ignore_you + ignore_passable;
ent_move(player_speed, nullvector);

wait (1);
}
}

Please, could anyone tell me what could be the reason for such a ridiculous model behaviour?
Posted By: Anonymous

Re: My hero starts flying? WHY?! - 10/28/02 03:40

In the manual it says something about setting your Z axis movement to 0.

Keeps your character from moving up or something...
Posted By: MGS

Re: My hero starts flying? WHY?! - 10/28/02 03:48

Thanks for a hint, but it couldn't have been so simple - I would have guessed it... [Wink] Unfortunately, when I'm setting my Z-axis speed explicitely to 0, my char still can fly up when I point with my mouse targetting cursor into the air and then press "forward". I need someone, who could see the reason underneath these ridiculous sympthoms...
Posted By: Whirabomber

Re: My hero starts flying? WHY?! - 10/28/02 07:52

Dumb question: Are you in preview mode?
Posted By: MGS

Re: My hero starts flying? WHY?! - 10/28/02 14:32

Nope. I'm not in preview and not in Fly Through. Just a normal script run. Once again - the most funny thing is that with cube it runs without any changes perfectly! Technically speaking - what's the difference between a sky cube and sky sphere? There must be something that script needs from sky cube and it's not finding in sky sphere...
Posted By: Realspawn

Re: My hero starts flying? WHY?! - 10/28/02 18:46

Make sure the character is placed in MED right

Make sure it has the right animation frames

Sometimes scaling the model is a solution
Posted By: Anonymous

Re: My hero starts flying? WHY?! - 10/29/02 00:38

Yeah, this sounds like your model is in some geometry. You will start floating if that happens.

Make your sphere passable and make sure your character isn't "in" anything.

-Jeff
Posted By: MGS

Re: My hero starts flying? WHY?! - 10/29/02 05:35

I don't know how I can check it, guys - I'm not changing anything in the model position on the stage. I just try it out with the cube - it works. Then I delete sky cube with awful texture, and replace it with sky sphere - then my hero starts "floating". That's all. It is not very likely that my player is "stuck" in some geometry, etc. The sphere is hollow. Standard sky taken from "Terminal 26" site... Really frustrating. [Frown]

Well, it really looks like I'll have to go on using those sky cubes. I would appreciate any advice on improving the look of my sky on a standard sky cube, though...
Posted By: Anonymous

Re: My hero starts flying? WHY?! - 10/29/02 06:34

Hmm, I had this exact problem before and I remedied it by using an .mdl sphere with "My.passable = On" in it's action.

Remove your sky box again, bring in your sky sphere and attach this action to it.

Action SkyTest{
My.passable = on;
}

See if that works.
Posted By: MGS

Re: My hero starts flying? WHY?! - 10/29/02 14:52

Sorry, Jeff, it's still not working. Really really strange. You have seen my movement code and read all my explanations - I ONLY replace cube with sphere. Here, I made two screenshots so that you get a picture of what's happening:
1). Normal behaviour - SKY BOX (CUBE)
2). Floating in the air - SKY SPHERE
Posted By: Anonymous

Re: My hero starts flying? WHY?! - 10/29/02 21:43

Yup, I read it. That's why I am so suprised. Sorry, I am not sure what to say. [Frown]

-Jeff
Posted By: Doug

Re: My hero starts flying? WHY?! - 10/30/02 05:27

Please reply to the same topic in Beginner forum.
© 2024 lite-C Forums