Dateien

> > CS2D > Lua Scripts > Barbed Wire Lua (Y.A.T.E.S)
DateiübersichtCS2D-ÜbersichtLua Scripts-Übersicht

Englisch Barbed Wire Lua (Y.A.T.E.S) >

21 Kommentare2 kb, 498 Downloads

alt Barbed Wire Lua (Y.A.T.E.S)

Rainoth
Moderator Off Offline

In short, a more realistic barbed wire.

I remembered the stereotypical "crawl under the barbed wire" scene from many movies and it was odd how CS2D doesn't handle it that way. So I made it do it.

Here's how it works:
If you run through a barbed wire, you'll sustain damage.
If you walk through a barbed wire, you won't sustain damage.

In other words, trade off speed to prevent injury or sustain injury to get to your goal faster.

You still damage the barbed wire if you walk through it. I am unsure if I should count this as a desired or undesired effect.

Installation >


Hopefully this will be useful.

P.S. I can include a bunch of pictures of me near barbed wires if you guys are into that

Cheers,
user Rainoth
9× editiert, zuletzt 28.11.16 17:54:03
Zugelassen von Sparty

Download Download

2 kb, 498 Downloads

Kommentare

21 Kommentare
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

Logge dich ein!

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

alt

Mami Tomoe
User Off Offline

Now that I think about it, I would like to see a bunch of pictures of you near barbed wires...
Ich mag es!

alt

Rainoth
Moderator Off Offline

@user Pseudon:
Interesting idea, I'll consider it.

alt

Pseudon
User Off Offline

The barbed wire shouldn't be damage when you walk through it as you should be touching no barbs walking carefully, right?

Nothing special, and too simple... but would work even better when having fields of barbed wire in a custom map, with a custom story etc. that requires a certain path to be followed and this could be a nice mini puzzle here and there.

I would've rather made a new "custom entity", with new effects and image. This is a good idea and can be developed further, but I can bet it won't happen.
Ich mag es!

alt

douglasmiguel7
User Off Offline

very good... congrats bro
Ich mag es!

alt

GeoB99
Moderator Off Offline

Neatly written and great idea.
Ich mag es!

alt

Powermonger
User Off Offline

This should do the trick:

addhook("movetile","barbed_movetile")
function barbed_movetile(id,x,y,walk)
     if object(objectat(x,y),"type")==2 and walk == 0 then
          if player(id,"health")>10 then
               parse("sethealth "..id.." "..player(id,"health")-10)
          else
               parse("customkill "..player(object(objectat(x,y),"player"),"name").." Barbed Wire "..id)
          end
     end
end

Damages 10 when moving to the tile (not constantly moving inside the tile).
I believe this is what VADemon meant...?

EDIT: Although, movetile hook doesn't support parameter walk, so this doesn't work...
Ich mag es!
1× editiert, zuletzt 04.12.16 18:20:25

alt

Rainoth
Moderator Off Offline

@user VADemon: It may be 1 damage but that 1 damage is applied many times. Each tile has 32 pixels so depending on how you move (and you normally don't move in straight lines when fighting), you can actually suffer more than 20 damage per tile.
In other words, if you're smart about pathing (like say you walk on the edge of barbed wire), you'll lose 2-3 hp, compared to boldly walking across it and losing 20 or more.

alt

VADemon
User Off Offline

@user Rainoth:
Currently the player suffers only 1 damage, that's not noticable even in normal game modes.
You can repair the damage caused to barbed wires with cs2d cmd damageobject so they are damaged only 5-10% otherwise a player can destroy barbed wires with too much ease.
Ich mag es!

alt

Yates
Reviewer Off Offline

Y.A.T.E.S support 10/10
Ich mag es!

alt

Rainoth
Moderator Off Offline

@user VADemon: Elaborate please.
If a player walks through the wire, he'll STILL suffer roughly half the damage he'd normally do and the wire will suffer half the damage too.
If a player runs through the wire, it'll work like it currently does in the script.
Did I understand it correctly?
Not sure how to respond, I liked the idea of bypassing the barbed wires by moving more slowly. I guess I could create an option to work both ways depending on what the host prefers.

P.S. Made it possible to use this as a plugin with Y.A.T.E.S.

alt

Mami Tomoe
User Off Offline

hi all i like
Ich mag es!

alt

VADemon
User Off Offline

Yeah I think the wire shouldn't take any damage and the player should take maybe 50% of the damage, so it's a more balanced trade-off.
Simple and cool idea.
Ich mag es!

alt

xsiN
User Off Offline

I don't see the screenshots so you forced me to test it myself.

Looks decent enough for a like.
Ich mag es!

alt

Mora
User Spielt CS2D

lel, with a screenshoot i get full idea :d
oky, this is a nice one thing :d even maybe kinda imb. Anyway sadly that it damages. I can quickly remove a wire when move at the edge of tiles.
Here take a like
Ich mag es!

alt

ohaz
User Off Offline

Neat idea
Ich mag es!

alt

kerker
User Off Offline

Good!
Ich mag es!

alt

Jite
User Off Offline

cool.
Ich mag es!

alt

Rainoth
Moderator Off Offline

@user xsiN: Lmao. Okay √
Here you go
IMG:https://sc-cdn.scaleengine.net/i/625499591219c6fe6c134f7474a245af.png

alt

xsiN
User Off Offline

Screenshots please
Ich mag es!
Zum Anfang Vorherige 1 2 Nächste Zum Anfang