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
  #16  
Old 04-10-2004, 10:17 PM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about
Quote:
Originally posted by Dach
Look, lets say you have an odd number, 3. You need to find the middle of that number, so you do 3/2 which is 1.5, correct? Guess what, an odd number of pixels is going to do the same thing.
That's irresponsible. You should realize that when you do the calculation and use the appropriate calculations to make it an exact pixel coordinate rather than half. Well, on Graal, that's no big deal to leave it that way, as it's going to use the right coordinate for you regardless, but it's just bad to get in the habit of being lazy.

Quote:
Granted I didn't notice that the number was in the middle of a pixel untill you said something, but it's not like I'm wrong.
I never said you were wrong about anything. I was pointing out the fact that you were saying the middle of the player is a half-pixel coordinate.
__________________
Kat
Reply With Quote
  #17  
Old 04-10-2004, 11:05 PM
greeno greeno is offline
Registered User
Join Date: Oct 2001
Location: U.S.A.
Posts: 116
greeno is on a distinguished road
Send a message via AIM to greeno
Quote:
Originally posted by Dach
the position (playerx,playery) is at the top lefthand corner of the player, use playerx+1.5,playery+2 it's not exact (playery+1.96875 is right) but there is hardly a difference so it doesn't matter

onwall is a function

ack, I just noticed, don't use a while loop for that, use a timeout

okay... i'm looking that up in the npc scripting help that comes with graal.... so far i'm understanding it.
__________________
-Stipo Swift-
"My Cat likes string cheese"
Reply With Quote
  #18  
Old 04-11-2004, 08:11 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Quote:
Originally posted by -Ramirez-

That's irresponsible. You should realize that when you do the calculation and use the appropriate calculations to make it an exact pixel coordinate rather than half. Well, on Graal, that's no big deal to leave it that way, as it's going to use the right coordinate for you regardless, but it's just bad to get in the habit of being lazy.


I never said you were wrong about anything. I was pointing out the fact that you were saying the middle of the player is a half-pixel coordinate.
The players' onwall block is located 16 pixels (1 tile) down, and is 31 (an odd number) pixels deep. This information shows that the middle of the player is, in fact, 30.5 pixels (1.96875 tiles) down from playery. I have no idea what you are trying to argue with me about, since I thought I made it blatantly obvious I don't use that number. actually it appears you are spreading your platform, switching from argueing against the possibility that the middle could be a half pixel, and against using such a calculation in script, tut tut tut
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #19  
Old 04-11-2004, 07:32 PM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about
Quote:
This information shows that the middle of the player is, in fact, 30.5 pixels (1.96875 tiles) down from playery. I have no idea what you are trying to argue with me about, since I thought I made it blatantly obvious I don't use that number.
I'm not arguing with you about anything. Everyone on the forums is obsessed with considering everything an argument, aren't they? Anyway, using a half coordinate in a calculation of any kind is going to produce an end result with a half-pixel coordinate anyway without further calculation to round it, so what ARE you talking about? If you don't use it directly in any calculations, what the hell is the point in knowing it? Well, if you were to double it, that would even it out, but um... if you did that, why divide it to begin with?

Quote:
actually it appears you are spreading your platform, switching from argueing against the possibility that the middle could be a half pixel, and against using such a calculation in script, tut tut tut
*doesn't consider this an argument, but whatever*
__________________
Kat
Reply With Quote
  #20  
Old 04-12-2004, 04:30 PM
greeno greeno is offline
Registered User
Join Date: Oct 2001
Location: U.S.A.
Posts: 116
greeno is on a distinguished road
Send a message via AIM to greeno
Goodbye thread....
__________________
-Stipo Swift-
"My Cat likes string cheese"
Reply With Quote
  #21  
Old 11-27-2004, 12:59 AM
myth-simba myth-simba is offline
Registered User
Join Date: Nov 2004
Posts: 565
myth-simba is an unknown quantity at this point
Quote:
Originally Posted by greeno
Hello, I am making a gravity room for my guild house and I was wondering why my script makes people go through objects.... basically I have it make the playery subtract one every .05 seconds, and if the up arrow is pushed, then they go up, but for some reason it makes them go through tiles... I remember doing this with an older version of graal and it worked fine. Did stefan/unixmad change that in a later release?

And I would like to know if anyone can help me
this is my code....

// NPC made by Stipo Swift -Leader- (Turtles)
if (created) {
falling = true;
}

while (falling==true)
{
playery = playery + 1;
sleep .05;
if (keydown(A))
{
playery = playery - 2;
if (playery > 60)
{
playery = playery - 2;
}
}
}

any suggestions?
have you got the gravity script with you? i may be able to help you solve it. i experiment with stuff like that. i made the tiles not be able to walk through once. could u tell me script i may be able to help.
Reply With Quote
  #22  
Old 11-27-2004, 01:01 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Dude, don't post in threads that are more than a couple of weeks old.
__________________
Reply With Quote
  #23  
Old 11-27-2004, 01:52 AM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to VeX_RaT_Boy
I just felt for making a gravity script now...

EDIT: Maybe I should rather call it side-viewed graal?
__________________
-Kjetil Valen
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:01 PM.


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