![]() |
Legend movement preview
A preview of the script I plan to use for the movement. There will be variations for speed, and the distance you travel after you let go of the button (for flying and other vehicles) but this is a general idea of what it will be like. It's pretty smooth, but I'm working on it even better. Also, this is in GS1 just so you can test it off line. What do you think?
PHP Code:
|
hot
wait wtf it's like buggy if i press left sometimes it goes right and starts bouncing and **** x_X! |
Yeah I know, there are some bugs. For left/right, try to keep the mouse in the same spot, and don't get to close. Also, I wouldn't press up or doan and left/right at the same time. I'm still working on this ;)
|
Well, I hope you can pull off a bugless serversided movement system. This current version has plenty of problems.
|
Quote:
|
I think I'm going to make it edit your direction when you get cose to an edge that might make you shake. The current version is clientside, but it'd be a similar script serverside.
The math+smoothness is what I'm going for here |
Quote:
|
Quote:
Anyway, have a much more complex system now, in gs2, with variable speed and 'drift' (the amount of time you comtinue in the same direction after you have pressed the button, this is for use with different vehicles, or terrain, such as ice, space, mud, etc). |
Oh, by a glance at the code, I take it that this is the topdown shooter server you told me about? Sounds really fun, when will the server be playable to the public?
Btw, I was working on a 360 degree car system with fine collision (sliding across walls too) detection. Ill post part of it for people to use. Its GS1 thought because I test it out in the editor (just an excuse to not learn GS2). If anyone wants me to, I can post an edited one that allows straifing (and moving forward at same time). NPC Code: |
Yea, I have a lot of good movement functions down in GS2 if you'd want to convert. Definitely makes it a lot easier. movedx (with wallcheck) movedy (with wallcheck) moveobj(tiles,dx,dy,object). tiles being an array of tiletypes to be considered walls. The trick is to add up the amount of distance you'd want to move in terms of x and y as separate variables and then putting it in the function. These functions can be integrated onto any existing movement system as well (won't make you go through walls unless your other movement is fundamentally flawed)
http://graal.net/snippet/detail.php?type=snippet&id=88 A few variables you'd want to define in your weapon NPC containing this script though (people often forget to). this.offx (offset from natural x value of character/object to the point where you want to block) this.offy (offset from natural y value of character/object to the point where you want to block) this.w (width of the area being blocked) this.h (height of the area being blocked) you can change these if you want to do multiple movements of an object in the same script. |
| All times are GMT +2. The time now is 10:45 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.