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 01-15-2014, 11:40 PM
i8bit i8bit is offline
Registered User
Join Date: Jul 2013
Posts: 146
i8bit is an unknown quantity at this point
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?
Reply With Quote
  #2  
Old 01-15-2014, 11:48 PM
Draenin Draenin is offline
Magnificent Bastard
Draenin's Avatar
Join Date: Dec 2004
Location: Bermuda Triangle
Posts: 6,790
Draenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud of
Send a message via AIM to Draenin Send a message via MSN to Draenin Send a message via Yahoo to Draenin
Shouldn't it just be this.z?
Reply With Quote
  #3  
Old 01-15-2014, 11:52 PM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
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...).
__________________
Quote:
Originally posted by Spark910
Think befreo you type.

Last edited by Torankusu; 01-16-2014 at 02:23 AM..
Reply With Quote
  #4  
Old 01-16-2014, 02:43 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by Torankusu View Post
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
__________________
MEEP!
Reply With Quote
  #5  
Old 01-16-2014, 03:36 PM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
Quote:
Originally Posted by callimuc View Post
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
__________________
Quote:
Originally posted by Spark910
Think befreo you type.
Reply With Quote
  #6  
Old 01-18-2014, 08:09 PM
100Zero100 100Zero100 is offline
Registered User
Join Date: Jul 2006
Posts: 31
100Zero100 is on a distinguished road
putnpc2(0,0,...).z = 5; too - but I wouldn't recommend it.

Some people like it.
__________________
Hi. I'm NaS!
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 06:29 PM.


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