Forum

> > News > CS2D Beta 0.1.2.2
ForenübersichtNews-ÜbersichtEinloggen, um zu antworten

Englisch CS2D Beta 0.1.2.2

112 Antworten
Seite
Zum Anfang Vorherige 1 2 3 4 5 6 Nächste Zum Anfang

alt Re: CS2D Beta 0.1.2.2

Sparty
Reviewer Off Offline

Zitieren
Sorry for the OT, but I wouldnt call user DC lazy. beside he made cs2d (which we know that) And did everything to make *his game better. which he did.

alt sv_sound3

mafia_man
User Off Offline

Zitieren
user Obviously Exactly Myself hat geschrieben
@user Infinite Rain: I was also hoping for sv_sound3.


You can use this "fake" sv_sound3 function though.
1
2
3
4
5
6
7
8
9
10
11
12
13
function dist(x1, y1, x2, y2)
	return math.sqrt((x2 - x1) ^ 2 + (y2 - y1) ^ 2)
end
function sv_sound3(x, y, radius, sound)
	local _, i
	for _ i in pairs(player(i, "table")) do
		if not player(i, "bot") then
			if dist(x, y, player(i, "x"), player(i, "y")) <= radius then
				parse("sv_sound2 " .. i .. " \"" .. sound .. "\"")
			end
		end
	end
end

alt Re: CS2D Beta 0.1.2.2

Yates
Reviewer Off Offline

Zitieren
Return value for attack and possibly for attack2 while you're at it. I don't want people to swing, shoot or do anything for that matter. So basically no bullets or melee swing attacks would occur on return 1.

This function can combined with spawnprojectile along with Alistaire's idea to create new weapons people cry on these forums about.

Example: You stop the rocket launcher from shooting an RPG and instead let it shoot a laser instead. There, you just created a super duper awesome epic low ammo weapon for your disposal.

Plus if this were to be done, I just solved three problems for you (Mine, Alistaire's & kids).

alt Re: CS2D Beta 0.1.2.2

DC
Admin Off Offline

Zitieren
Hooks with a way to stop then (return) in events which are executed instantly (attack/attack2) and without delays are technically hardly possible. The client would have to wait for the server response for every single shot. It would lag noticeably and it would suck hard. Not possible with the return system. Otherwise I would have implemented this a long time ago already because it's an obvious thing.

alt Re: CS2D Beta 0.1.2.2

Yates
Reviewer Off Offline

Zitieren
But doesn't CS2D check the ammo and stop the person from shooting if none on the attack hook? And even if it didn't you would still be able to stop it the way CS2D stops it if no ammo.

Or am I completely insane? (Don't answer that).

alt Re: CS2D Beta 0.1.2.2

DC
Admin Off Offline

Zitieren
The server checks the ammo. Of course. But the visual effect on the clientside is rendered instantly. So if you use an infinite ammo hack it will look like it works as client. It actually doesn't because the server doesn't accept and forward the shots.

Lua scripts run on the server though. Impossible to stop the client from rendering the shot effects because they appear instantly. There is no time for the server to receive the shot message, to parse the Lua script and to send a message like "hey stop, there is a return! don't shoot!". Well at least impossible using the return system.

Of course there could be a command which disables attacking but it wouldn't work with the attack/attack2 hook and the return value of it because I would have to delay everything to make that work.

alt Re: CS2D Beta 0.1.2.2

Yates
Reviewer Off Offline

Zitieren
So it's basically impossible to stop any weapon from doing what it does as it would need a delay and turn into shit?

alt Re: CS2D Beta 0.1.2.2

DC
Admin Off Offline

Zitieren
Congratulations. You understood why there is no weapon scripting in CS2D / why original weapon behaviors can not be changed using purely server-sided Lua scripts.

alt Re: CS2D Beta 0.1.2.2

Yates
Reviewer Off Offline

Zitieren
Woo! Beers on me, lads.

Edit: Does the attack hook still get called even if you have no ammo? - I could work around yours and my problem by setting ammo if this would be added (Or is added, not sure). Then create my own ammo using Lua and bam, I still have a super duper awesome epic weapon. Seems legit; but for it to work my first question must be a yes.

Edit 2: I suddenly and only just now noticed this is not the ideas thread. And now I feel stupid.
1× editiert, zuletzt 18.02.13 21:20:25
Zum Anfang Vorherige 1 2 3 4 5 6 Nächste Zum Anfang
Einloggen, um zu antwortenNews-ÜbersichtForenübersicht