Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   The Z-Axis (https://forums.graalonline.com/forums/showthread.php?t=29613)

mikepg 05-21-2002 05:52 AM

The Z-Axis
 
Ok, I know how to set a player's z (playerz = ect), but I have no Idea how to set an NPC's z coordinate!

z is stored as a normal variable (like i, a, m, n...).
npcs[i].z doesnt work either.

there is one command I am curious about, but i think it has to do with gmaps... setz real,real,real,real,real,real,real,real;

Is there a way to set an NPC's z?

And what exactly does setz do, because it's not explained in newfeatures, or listed anywhere that I know of.

Thanks for your help :)


~War Lord Mgp2

Neonight 05-21-2002 06:09 AM

Re: The Z-Axis
 
Quote:

Originally posted by mikepg


And what exactly does setz do, because it's not explained in newfeatures, or listed anywhere that I know of.


Jagen:
setz x,y,width,height,a,b,c,d; sets the height of the positon at the x and y your choose, a b c d are the heights of the corners,
after you use setz, use updateterrain (kindof like updateboard)

mikepg 05-21-2002 06:14 AM

yay
 
Thank you for your help. I will Try these out.

But, basically what you are saying, this is for the tiles themselves, not the npcs? correct?

Neonight 05-21-2002 06:16 AM

Re: yay
 
Quote:

Originally posted by mikepg
Thank you for your help. I will Try these out.

But, basically what you are saying, this is for the tiles themselves, not the npcs? correct?


Jagen:
yes, it sets the actual height of a part of a terrain (it only works when a terrain has been loaded I think)

mikepg 05-21-2002 06:28 AM

well...
 
I dont have any terrain to upload, lol...and, my main question hasnt been solved yet :(.

The Z axis for NPCs...is there one? If so, how do you set it?

Thanks though, Jagen.

Neonight 05-21-2002 06:33 AM

Re: well...
 
Quote:

Originally posted by mikepg
I dont have any terrain to upload, lol...and, my main question hasnt been solved yet :(.

The Z axis for NPCs...is there one? If so, how do you set it?

Thanks though, Jagen.


Jagen:
NPC Code:


if (playerchats&&startswith(z,#c)) {
z=strtofloat(#e(2,-1,#c));
}



That should work fine, just say z then a number

mikepg 05-21-2002 06:41 AM

hmmm
 
that looks like it would just set a value for z. Does that pertain to the NPC's Z-Axis though?

Saga2001 05-21-2002 11:19 AM

Ummmm...
setz is for terrain, not for npcz...
don't worry about z axis yet man...

mikepg 05-22-2002 02:37 AM

well
 
The reason I want to know how to change an NPCs axis is because of the shoot command.

To make that go above walls on a non terrain type levels, you have to set the z above 3, and the NPC will not be triggered unless it's at the same z height.

So, that is why I need to know ;).

would updating the terrain change the height of the NPC that rests on it?

Thanks.

Spanko 05-22-2002 05:07 PM

Re: well
 
Quote:

Originally posted by mikepg
The reason I want to know how to change an NPCs axis is because of the shoot command.

To make that go above walls on a non terrain type levels, you have to set the z above 3, and the NPC will not be triggered unless it's at the same z height.

So, that is why I need to know ;).

would updating the terrain change the height of the NPC that rests on it?

Thanks.

Just try it, dagnabbit.

Saga2001 05-22-2002 10:52 PM

Re: Re: well
 
Quote:

Originally posted by Spanko
Just try it, dagnabbit.
<3

Its not a hard command, dang, its described in newfeatures2002.txt, duh!

mikepg 05-23-2002 02:44 AM

umm
 
I tried it. Doesnt work for me :(.

Maybe my version is outdated. I'm gonna go see if there is a new dl.

nyghtGT 05-23-2002 02:46 AM

Wait...

The z axis is a specefic point of elevation on the terrain ?

Spanko 05-23-2002 05:42 PM

You can also sort of simulate it by just subtracting the height you want from the NPCs Y and then customly drawing the shadow at it's actual location, though it'd normally still block at the new space you put it, and the 3d terrain likes messing that up.
Another easier way would just making a new gani, though that'd still be a pain since I believe variable sprite locations per frame still aren't possible.

Anyway the subtracting from y trick does work for showimg, which is quite handy.

Projectshifter 05-23-2002 08:42 PM

o_O! I've used a Z axis b/4 in Geometry, but didn't realize it could be used in Graal. I noticed that G2k2 seemed to have 3d terrain. That is SUPER leet0, i'm gonna have to try that out... hrm... should the terrain file just be a gif of any size, or does a 3d terrain file need to take up an entire level?? I'll have to get some GATs I know to make some so I can play around with it. Bring a whole new look to Anarchy!
---Shifter


All times are GMT +2. The time now is 06:50 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.