Forum

> > News > CS2D Beta 0.1.2.2
Forums overviewNews overviewLog in to reply

English CS2D Beta 0.1.2.2

112 replies
Page
To the start Previous 1 2 3 4 5 6 Next To the start

old Re: CS2D Beta 0.1.2.2

Sparty
Reviewer Off Offline

Quote
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.

old sv_sound3

mafia_man
User Off Offline

Quote
user Obviously Exactly Myself has written
@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

old Re: CS2D Beta 0.1.2.2

Alistaire
User Off Offline

Quote
There should be some way to spawn a bullet projectile, and a laser projectile. Not the items.

old Re: CS2D Beta 0.1.2.2

Yates
Reviewer Off Offline

Quote
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).

old Re: CS2D Beta 0.1.2.2

DC
Admin Off Offline

Quote
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.

old Re: CS2D Beta 0.1.2.2

Yates
Reviewer Off Offline

Quote
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).

old Re: CS2D Beta 0.1.2.2

DC
Admin Off Offline

Quote
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.

old Re: CS2D Beta 0.1.2.2

Yates
Reviewer Off Offline

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

old Re: CS2D Beta 0.1.2.2

DC
Admin Off Offline

Quote
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.

old Re: CS2D Beta 0.1.2.2

Yates
Reviewer Off Offline

Quote
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.
edited 1×, last 18.02.13 09:20:25 pm
To the start Previous 1 2 3 4 5 6 Next To the start
Log in to replyNews overviewForums overview