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 03-31-2005, 04:04 PM
Raelyn Raelyn is offline
the Professional.
Raelyn's Avatar
Join Date: Sep 2003
Location: Zormite
Posts: 964
Raelyn will become famous soon enough
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
__________________
*Don't let the door hit you on the way out.*
Reply With Quote
  #2  
Old 03-31-2005, 04:31 PM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
doing_it_yourself();
Reply With Quote
  #3  
Old 03-31-2005, 04:42 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Probably using something that detects blocking tiles!
Hint: onwall and onwall2.
Reply With Quote
  #4  
Old 03-31-2005, 04:57 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
lol, seriously, if you dont even know about onwall and onwall2 you wont be able to make a gravity script.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #5  
Old 03-31-2005, 06:06 PM
Raelyn Raelyn is offline
the Professional.
Raelyn's Avatar
Join Date: Sep 2003
Location: Zormite
Posts: 964
Raelyn will become famous soon enough
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. >.>
__________________
*Don't let the door hit you on the way out.*
Reply With Quote
  #6  
Old 03-31-2005, 06:08 PM
Raelyn Raelyn is offline
the Professional.
Raelyn's Avatar
Join Date: Sep 2003
Location: Zormite
Posts: 964
Raelyn will become famous soon enough
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.
__________________
*Don't let the door hit you on the way out.*
Reply With Quote
  #7  
Old 03-31-2005, 06:09 PM
Raelyn Raelyn is offline
the Professional.
Raelyn's Avatar
Join Date: Sep 2003
Location: Zormite
Posts: 964
Raelyn will become famous soon enough
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.
__________________
*Don't let the door hit you on the way out.*
Reply With Quote
  #8  
Old 03-31-2005, 06:12 PM
Evil_Trunks Evil_Trunks is offline
Evil
Evil_Trunks's Avatar
Join Date: Dec 2004
Posts: 391
Evil_Trunks is on a distinguished road
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
__________________

Reply With Quote
  #9  
Old 04-01-2005, 04:37 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
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.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #10  
Old 04-01-2005, 09:32 PM
falco10291029 falco10291029 is offline
BEst User EVER!
Join Date: Apr 2004
Posts: 1,186
falco10291029 is on a distinguished road
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.
__________________
BEst Insult ever: If I had a dollar for every brain you DIDNT have, i'd have one dollar!
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 03:32 AM.


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