Dateien

> > CS2D > Lua Scripts > Old Movement
DateiübersichtCS2D-ÜbersichtLua Scripts-Übersicht

Englisch Old Movement >

10 Kommentare953 b, 587 Downloads

alt 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!
Zugelassen von GeoB99

Download Download

953 b, 587 Downloads

Kommentare

10 Kommentare
Zum Anfang Vorherige 1 Nächste Zum Anfang

Logge dich ein!

Du musst dich einloggen, um selber Kommentare verfassen zu können!Einloggen

alt

daris
User Off Offline

good script
Ich mag es!

alt

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)

alt

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
Ich mag es!

alt

connor34
User Off Offline

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

alt

Heartless Soldier
User Off Offline

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

alt

palomino
User Off Offline

No tabs? Oh my...
Ich mag es!

alt

DC
Admin Off Offline

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

alt

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))
Ich mag es!

alt

Heartless Soldier
User Off Offline

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

alt

hundesohn
User Off Offline

lol
not bad
Ich mag es!
Zum Anfang Vorherige 1 Nächste Zum Anfang