Files

> > CS2D > Lua Scripts > Old Movement
Files overviewCS2D overviewLua Scripts overview

English Old Movement >

10 comments953 b, 586 Downloads

old Old Movement

Heartless Soldier
User Off Offline

Do you remember older cs2d versions where the movement was different to the newest versions?
(When you move in diagonal your player got more speed)

Well, this script simulates that.


To set them just search into the script:

speeddiag = To set the speed at diagonal movement
speedstra = To set the speed at diagonal movement

9 is the default value for speeddiag.
-2 is the default value for speedstra.


DOESN'T WORK WITH NORMAL GAME (PLAYER WITH ID 1 BUGGS IDK WHY :/) IT'S FOR DEDICATED SERVERS. (IF YOU WANT TO USE IT BY NORMAL GAME YOU HAVE TO CREATE A GAME AND MAKE YOU SPECTATOR TO OCUPATE THE ID 1)


Enjoy it and Good luck,

Bye!
Approved by GeoB99

Download Download

953 b, 586 Downloads

Comments

10 comments
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

daris
User Off Offline

good script
I like it!

old

Heartless Soldier
User Off Offline

@Flood: It's perfect. I've already shortened it too. Ill reupload it with yours (if you let me f course)

old

FlooD
GAME BANNED Off Offline

i made a MUCH more efficient version
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--Made by FlooD
--Credits to NasH/N.B.K. for original idea and script.
--My version is just a lot simpler and shorter.
function initArray(m)
	local array = {}
	for i=1,m do
		array[i]=0
	end
	return array
end
px=initArray(32)
py=initArray(32)
addhook("spawn","s")
function s(p)
	px[p]=player(p,"x")
	py[p]=player(p,"y")
end
addhook("move","m")
function m(p)
	local x,y=player(p,"x"),player(p,"y")
	if (x-px[p])==0 or (y-py[p])==0 then
		parse("speedmod "..p.." -2")
	else
		parse("speedmod "..p.." 9")
	end
	px[p],py[p]=x,y
end
I like it!

old

connor34
User Off Offline

DC has right i did it one time my cs2d isnt work anymore

old

Heartless Soldier
User Off Offline

Yes you are right, i made this code a time ago..

old

palomino
User Off Offline

No tabs? Oh my...
I like it!

old

DC
Admin Off Offline

using NO tabs in your code is one of the worst things you can do while scripting/programming

old

FlooD
GAME BANNED Off Offline

lol nash seems pretty cool..
the script itself looks very redundant...
i'm certain that it is possible to shorten the script by at least 50%.
actually, i think you only need 1 if-then-else statement. (i.e. if (movement=straight) then (speedmod stra) else (speedmod speeddiag))
I like it!

old

Heartless Soldier
User Off Offline

Thank you :).
What a coincidence, i started to improve it last week.

old

hundesohn
User Off Offline

lol
not bad
I like it!
To the start Previous 1 Next To the start