Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Gravity scripting (https://forums.graalonline.com/forums/showthread.php?t=58355)

Raelyn 03-31-2005 04:04 PM

Gravity scripting
 
Ok, I have a question about how people usually make gravity levels. What's the best way to write the detection of the blocking tiles? o.o

Rick 03-31-2005 04:31 PM

doing_it_yourself();

Skyld 03-31-2005 04:42 PM

Probably using something that detects blocking tiles!
Hint: onwall and onwall2.

coreys 03-31-2005 04:57 PM

lol, seriously, if you dont even know about onwall and onwall2 you wont be able to make a gravity script.

Raelyn 03-31-2005 06:06 PM

Quote:

Originally Posted by coreys
lol, seriously, if you dont even know about onwall and onwall2 you wont be able to make a gravity script.

omfg, lawl, serious lee, if they are not included in the function list then I wouldn't realise they existed!!!!1111oneone.one

I hate gscript. >.> I mean, of all the proprietary languages I have been tormented with, gscript is the worst. >.>

Raelyn 03-31-2005 06:08 PM

Quote:

Originally Posted by Rick
doing_it_yourself();

Did I say "lawl, omfg, leet gaiz, rite me a script for gravity spar liek stuff, y0!!!!11oneone.one"?

No, I don't think I did, I think I asked for explanation of how the wall detection was done.

Raelyn 03-31-2005 06:09 PM

Quote:

Originally Posted by Skyld
Probably using something that detects blocking tiles!
Hint: onwall and onwall2.

Thank you, I didn't realise such a thing existed.

Evil_Trunks 03-31-2005 06:12 PM

my gravity script keeps moving the player the minimum possible distance (0.0625 tiles) and checking if they will run into a wall if they move. once they hit a wall or go the required fall distance for that loop through they stop moving

you need to check the bottom of the player, there are like 5 x locations I check, I think, to make sure its not possible to fall through a tile

coreys 04-01-2005 04:37 PM

onwall is in commands.rtf
also Ace2869(or whatever the number is, he created the newbie scripters bible) has an updated commands.rtf on his site (i forget what it is) that has everything.

falco10291029 04-01-2005 09:32 PM

Mine does a for loop and checks all of the tiles between the player and where he'll be next timeout to see if anything is blocking, and if so, it makes the downward velocity 0. Bad thing is that this sometimes causes a "bounce" on large falls.


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

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