Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-21-2002, 05:52 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
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
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #2  
Old 05-21-2002, 06:09 AM
Neonight Neonight is offline
where da wmdz at
Neonight's Avatar
Join Date: Jun 2001
Location: Windsor, Illinois
Posts: 3,665
Neonight is on a distinguished road
Send a message via AIM to Neonight
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)
Reply With Quote
  #3  
Old 05-21-2002, 06:14 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
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?
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #4  
Old 05-21-2002, 06:16 AM
Neonight Neonight is offline
where da wmdz at
Neonight's Avatar
Join Date: Jun 2001
Location: Windsor, Illinois
Posts: 3,665
Neonight is on a distinguished road
Send a message via AIM to Neonight
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)
Reply With Quote
  #5  
Old 05-21-2002, 06:28 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
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.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #6  
Old 05-21-2002, 06:33 AM
Neonight Neonight is offline
where da wmdz at
Neonight's Avatar
Join Date: Jun 2001
Location: Windsor, Illinois
Posts: 3,665
Neonight is on a distinguished road
Send a message via AIM to Neonight
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
Reply With Quote
  #7  
Old 05-21-2002, 06:41 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
hmmm

that looks like it would just set a value for z. Does that pertain to the NPC's Z-Axis though?
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #8  
Old 05-21-2002, 11:19 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Ummmm...
setz is for terrain, not for npcz...
don't worry about z axis yet man...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #9  
Old 05-22-2002, 02:37 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
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.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #10  
Old 05-22-2002, 05:07 PM
Spanko Spanko is offline
Squeaker of Soles
Spanko's Avatar
Join Date: Nov 2001
Location: The Netherworl...lands
Posts: 1,366
Spanko is on a distinguished road
Send a message via ICQ to Spanko Send a message via AIM to Spanko Send a message via Yahoo to Spanko
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.
__________________

ICQ: 125283920
MSN: [email protected]
AIM: Squeax0r
Squeaker seems unable to access the forum using this account.. tis a sad day.
Now with occasional Asuka flavour! Ooops a bit too much...
Asuka should be king of Dustari!

"Y'know, some days even my lucky rocketship underpants don't even help."
Reply With Quote
  #11  
Old 05-22-2002, 10:52 PM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
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!
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #12  
Old 05-23-2002, 02:44 AM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
umm

I tried it. Doesnt work for me .

Maybe my version is outdated. I'm gonna go see if there is a new dl.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #13  
Old 05-23-2002, 02:46 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Wait...

The z axis is a specefic point of elevation on the terrain ?
Reply With Quote
  #14  
Old 05-23-2002, 05:42 PM
Spanko Spanko is offline
Squeaker of Soles
Spanko's Avatar
Join Date: Nov 2001
Location: The Netherworl...lands
Posts: 1,366
Spanko is on a distinguished road
Send a message via ICQ to Spanko Send a message via AIM to Spanko Send a message via Yahoo to Spanko
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.
__________________

ICQ: 125283920
MSN: [email protected]
AIM: Squeax0r
Squeaker seems unable to access the forum using this account.. tis a sad day.
Now with occasional Asuka flavour! Ooops a bit too much...
Asuka should be king of Dustari!

"Y'know, some days even my lucky rocketship underpants don't even help."
Reply With Quote
  #15  
Old 05-23-2002, 08:42 PM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
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
__________________
Who has time for life these days?
Reply With Quote
  #16  
Old 05-23-2002, 10:08 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Projectshifter
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
3d terrains work off of files called gmaps, which can be made by using a program called the terrain generator
A gmap is basically like a HUGE level, even though they are made up of levels, when you load a gmap, its like loading one extremely big level
Reply With Quote
  #17  
Old 05-23-2002, 10:34 PM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
umm

OK, what you all are saying is that there is no actual Z-Axis for NPCs??

If there isn't, then I'm going to have to rescript my whole weapon... .
Wont be hard, but i figured it would be a lot less laggier with the new shoot command...but alas, lol.

If there isnt a way to raise NPCs...then why have an angle and z height in the params. The only thing it would be able to hit would be a player .
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #18  
Old 05-24-2002, 10:45 AM
Gohan43331 Gohan43331 is offline
Registered User
Join Date: Jan 2002
Posts: 87
Gohan43331 is on a distinguished road
Send a message via AIM to Gohan43331
Re: Re: The Z-Axis

Quote:
Originally posted by Neonight

Jagen:
<setz stuff>
I'm trying this on a screenshot of a G2k2 level, and here's the script:

NPC Code:

if (playerenters) {
playerx=30;
playery=30;
playerz=0;
timeout = .05;
}
if (timeout) {
message #v(playerz);
timeout = .05;
}
if (playerchats) {
setz 30,30,3,3,0,1,2,3;
updateterrain;
}



Yet, it still doesn't work...it's always equal to 0...Is there some other command to start the setz?
__________________
Reply With Quote
  #19  
Old 05-24-2002, 08:36 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
umm, did you even load the gmap? how can you set the heights of a terrain without even loading one
Reply With Quote
  #20  
Old 05-25-2002, 04:56 AM
Er1c Er1c is offline
Registered User
Er1c's Avatar
Join Date: Mar 2001
Location: Chicago, IL
Posts: 791
Er1c is on a distinguished road
NPC Code:
z = height_you_want;



It only works on LOADED gmaps, though.
__________________
Eric Kraft
Reply With Quote
  #21  
Old 05-25-2002, 05:10 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
Re: The Z-Axis

Quote:
Originally posted by mikepg
playerz = ect
its ETC not ECT!
Reply With Quote
  #22  
Old 05-25-2002, 05:19 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Well no. You can set the z axis, but it doesn't matter, z axis doesn't matter if you don't load a gmap...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #23  
Old 05-25-2002, 06:24 PM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
uh

No, im pretty sure it ect, as opposed to etc.

Either way...
I need a G map just to set ONE Npc's z-height?

That is really dumpy.
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #24  
Old 05-26-2002, 10:21 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
=D it 'tis indeed. Also if you wish to work with playerz, you should do things like get some gmaps and play around, its not really tough...well most of it.
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #25  
Old 05-27-2002, 01:50 AM
Gohan43331 Gohan43331 is offline
Registered User
Join Date: Jan 2002
Posts: 87
Gohan43331 is on a distinguished road
Send a message via AIM to Gohan43331
Lol...i used a screenshot of one of the start levels and used the gmap and "changed" it a little in the editor and saved it.

Now i have two gigantic mountains in that level... :-/
__________________
Reply With Quote
  #26  
Old 05-27-2002, 02:09 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Gohan43331
Lol...i used a screenshot of one of the start levels and used the gmap and "changed" it a little in the editor and saved it.

Now i have two gigantic mountains in that level... :-/
replace the start gmap with this one, you shouldn't edit gmaps because the client doesnt redownload them
Attached Files
File Type: gmap start.gmap (51.1 KB, 152 views)
Reply With Quote
  #27  
Old 05-27-2002, 06:14 AM
Gohan43331 Gohan43331 is offline
Registered User
Join Date: Jan 2002
Posts: 87
Gohan43331 is on a distinguished road
Send a message via AIM to Gohan43331
Hehe...thanks... Maybe i'll make a backup of it and rename the files inside it
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:54 AM.


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