English Barbed Wire Lua (Y.A.T.E.S) icon

19 comments
27.11.16 11:21:04 pm
like 13 like it!
2 kb, 21 Downloads
Rainoth
Moderator
Offline Off
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
edited 9×, last 28.11.16 05:54:03 pm
ok This file has been reviewed and approved by Sparty (27.11.16 11:38:44 pm)

Comments

19 comments
Goto Page
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in
31.12.16 06:42:27 pm
like I like it!
Up
Pseudon
User
Offline Off
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.
06.12.16 07:26:40 pm
like I like it!
Up
douglasmiguel7
User
Offline Off
very good... congrats bro
30.11.16 03:07:12 pm
like I like it!
Up
Fraizeraust
Moderator
Offline Off
Neatly written and great idea.
28.11.16 08:44:17 pm
like I like it!
Up
VADemon
User
Offline Off
@user Rainoth: @user Powermonger: Oh, I thought that it's based onTile. Sorry ^_^*
28.11.16 06:51:13 pm
like I like it!
Up
Powermonger
User
Offline Off
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...
edited 1×, last 04.12.16 06:20:25 pm
28.11.16 06:37:50 pm
Up
Rainoth
Moderator
Offline Off
@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.
28.11.16 06:29:55 pm
like I like it!
Up
VADemon
User
Offline Off
@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.
28.11.16 05:53:12 pm
like I like it!
Up
Yates
Reviewer
Offline Off
Y.A.T.E.S support 10/10
28.11.16 05:30:39 pm
Up
Rainoth
Moderator
Offline Off
@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.
28.11.16 04:40:08 pm
like I like it!
Up
SlowPoke101
User
Offline Off
hi all i like
28.11.16 03:22:52 pm
like I like it!
Up
VADemon
User
Offline Off
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.
28.11.16 11:27:41 am
like I like it!
Up
My Life For Dubstep
User
Offline Off
I don't see the screenshots so you forced me to test it myself.

Looks decent enough for a like.
28.11.16 11:16:24 am
like I like it!
Up
Mora_rus
User
Offline Off
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
28.11.16 10:46:07 am
like I like it!
Up
ohaz
User
Offline Off
Neat idea
28.11.16 10:45:50 am
like I like it!
Up
kerker
User
Offline Off
Good!
28.11.16 07:43:48 am
like I like it!
Up
Jite
User
Offline Off
cool.
28.11.16 01:52:46 am
Up
Rainoth
Moderator
Offline Off
@user My Life For Dubstep: Lmao. Okay √
Here you go
IMG:https://sc-cdn.scaleengine.net/i/625499591219c6fe6c134f7474a245af.png
28.11.16 01:40:01 am
like I like it!
Up
My Life For Dubstep
User
Offline Off
Screenshots please
28.11.16 12:18:14 am
like I like it!
Up
Salad Fingers
Super User
Offline Off
Beautiful baby

Shut up and take my like!
To the start Previous 1 Next To the start