Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   put NPC at z value (https://forums.graalonline.com/forums/showthread.php?t=134269005)

i8bit 01-15-2014 11:40 PM

put NPC at z value
 
PHP Code:

 temp.npc this.level.putNPC2(player.xplayer.y"");
 
temp.npc.join("test"); 

How do you specify what z value the NPC is placed?

Draenin 01-15-2014 11:48 PM

Shouldn't it just be this.z?

Torankusu 01-15-2014 11:52 PM

PHP Code:

 temp.npc this.level.putNPC2(player.xplayer.y"");
 
temp.npc.join("test");
 
temp.npc.value//change the word value to the correct numerical value of the z axis you want it on 

You should take note, however, that if you place it on a Z coordinate (ex. z = 5) on something that is not a terrain map or level, it will actually LOOK like it's being placed at a y axis lower than the player's y (MORE towards the top of the screen / above the player...).

callimuc 01-16-2014 02:43 PM

Quote:

Originally Posted by Torankusu (Post 1725178)
PHP Code:

 temp.npc this.level.putNPC2(player.xplayer.y"");
 
temp.npc.join("test");
 
temp.npc.value//change the word value to the correct numerical value of the z axis you want it on 

You should take note, however, that if you place it on a Z coordinate (ex. z = 5) on something that is not a terrain map or level, it will actually LOOK like it's being placed at a y axis lower than the player's y (MORE towards the top of the screen / above the player...).

except its a gani, then the shadow should stay at 0 while all other sprites are moving up

Torankusu 01-16-2014 03:36 PM

Quote:

Originally Posted by callimuc (Post 1725191)
except its a gani, then the shadow should stay at 0 while all other sprites are moving up

Hm my original post did say that about animations but I guess I accidentally deleted it in an edit.

I felt I should include the detail incase he gets it to place, sets a z, but cant actually tell its above 0

100Zero100 01-18-2014 08:09 PM

putnpc2(0,0,...).z = 5; too - but I wouldn't recommend it.

Some people like it.


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

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