![]() |
slippery ice script help
Hello,
I'm trying to create a script to make ice, but im having trouble getting started.. :( I'm trying to learn it on my own but I'm wondering if someone could maybe just get me started on the right path. thanks everyone! ~Munkypuff |
Quote:
|
Here's a starting point:
PHP Code:
|
An ice-skating script works best in this way: you have two velocities, X and Y. From there, you add to the X and Y velocities depending on the movement of the player. If they're moving left, subtract X velocity, if they're moving right, add to the X velocity. Do the same for up/down and the Y velocity. It's important to allow these velocities to go into the negatives as well. If the player is not moving, move both X and Y velocities toward 0(until they reach 0).
That's about the gist of it. There is also wall-detection and such. |
Quote:
Should do: PHP Code:
|
Gambet's code is more efficient, but if you're new to scripting you should stick to the simpler one I provided.
|
Quote:
|
Quote:
|
Quote:
|
Orrrrr... he can look at both scripts and see how one translates to the other, in an easier way of understanding and learning.
|
The examples posted above do not do exactly the same thing, but if conciseness translated well to efficiency, then
PHP Code:
PHP Code:
|
Quote:
|
Graal ice scripts never made sense to me. You don't gain speed walking across ice in real life
|
Quote:
|
Quote:
|
Quote:
|
Quote:
I once programmed ice that made sense (to me), where walking normally has absolute friction. If you start on the ice, it is hard to get your speed up because you're walking on ice. It is also hard to stop on ice (it uses friction equations). If you start on land and step on ice, you start with the walking velocity and slow down as you slide across the ice (more friction). Friction rules. Exercise in mind... |
Or you could make everyone extremely irritable and just make it so you trip,fall, and slide uncontrollably on your back every few seconds.
At least thats how my ice adventures are :( |
Sorry it took me so long to reply. Thank you all for your help. I did want something like Kristi is describing. I agree that it makes no sense that you would increase speed on ice. (unless you had ice skates) well maybe I'll do both. one with iceskates and one without :D I will let you know when I've completed my script so you guys can tell me if I'm an idiot or not :P BTW I'm a She ;)
thanks again! |
I hate ice scripts its annoying.
|
I was going to post about how LttP did have Link increase speed, but I realize now you're talking about those Graal ice scripts that make the player start flying across the screen(or at least I think that's what you're talking about). I haven't seen one of those in a long time, though.
0:48 in and you'll see how link gains speed gradually(but still fairly fast) when he starts his walk. Ice on LttP was actually dreadful, and one of the experiences I hated. Especially trying to work your way into doorways and the stairs. |
Quote:
Granted that isn't truly accurate but it does illustrate something more accurate then graal ice |
I still say a script that makes you fall over if you run to fast would be the most accurate.
|
| All times are GMT +2. The time now is 02:32 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.