[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
Battlefield Modding Tutorials BFMODS :: View topic - Making knife traps [CSM]
Battlefield Modding Tutorials BFMODS
https://battlefieldmodding.com/ssm/phpBB3/

Making knife traps [CSM]
https://battlefieldmodding.com/ssm/phpBB3/viewtopic.php?f=4&t=5186
Page 1 of 1

Author:  samrtguy [ Tue Aug 18, 2009 8:26 pm ]
Post subject:  Making knife traps [CSM]

I'm sure this has been attempted before, but I'll explain the concept anyway. Let's say you want to make "knife-traps" in a close-quarters map, preferably in a tunnel, where a player would have to dodge knives or other obstacles coming at him from the surrounding walls. It's pretty easy with the method I'll describe, and if you have a good knowledge of the distance system in Battlefield 1942 and of how objects spawn and "live", this will be a breeze for you. Only problem is the time it takes depending on the distance and path you want your object to cover.

Create an object spawn template for the knife. I hope you know how it is done, as it is one of the most basic concepts of modding, especially with WYSIWYG (What You See Is What You Get) editors such as Battlecraft 1942 or Editor42.

A) Create that new object spawner, and call it, say, "moveable statics". You're going to change the "TimeToLive" setting, which is in seconds, to 0.1 (a tenth of a second). Notice that if you set the time to live setting high, the movement of the object in time will look very choppy, that's why the smallest time to live is the better option here. The "TimeToSpawn" settings can be edited to your liking. I have it set to 60 seconds, for continuous movement.

B) Place the new spawner you've made in your map at a strategic ambush location. Remember, the shorter the distance, the better. Say your object has to cover a distance of 10 "Battlefield" meters on the x axis (east and west), which is the first number that appears on the position coordinates (x/y/z). Create a copy of the spawner you just made, placing it 0,1 "meters" in front of the first spawner you've placed while keeping the other coordinates (in this case "z" and "y") the same as the original. So if the position of the first spawner was 50/100/200, the next spawner would be 50.1/100/200, the third, 50.2 and so on, until you've reached 10 "meters", so 100 spawners. This should make the object move from point A to point B on the axis you've chosen very smoothly, as it covers 0.1 "meters" in 0.1 seconds. This gives us a velocity of one meter per second. You can even lower these numbers to your liking to make everything smoother, but the smaller the distance, the more spawners you will have to make for the same distance.

C) At this stage, the knife still cannot kill you. You need to find the barbwire code that makes your health drop when you go through it (is it located in the objects.rfa, extract it and search for it, it's probably in "Props" or "Buildings", "stebarbwire"), copy it to the knife's code in Handweapons/Knife Allies/Axis (depending on which knife you edited) and tweak that code so a contact with the knife is an instant death in one or two shots.

This hasn't been tested yet, feel free to test it and report any bugs/glitches with this workaround.

Author:  [TKO]Twist [ Wed Aug 19, 2009 6:07 am ]
Post subject:  Re: Making any statc object move in all directions/angles

[TKO]Twist [G2] : Requesting Youtube video!

Author:  Senshi [ Wed Aug 19, 2009 7:01 am ]
Post subject:  Re: Making any statc object move in all directions/angles

Pretty nice workaround, but accompanied by heavy glitches, I'd guess. For one a hundred spawners spawning in 10 seconds causes a tremendous perfomance impact (not only FPS, but especially network traffic!).

Author:  freddy [ Wed Aug 19, 2009 1:06 pm ]
Post subject:  Re: Making any statc object move in all directions/angles

but still a nice workaround, me like!

Author:  samrtguy [ Wed Aug 19, 2009 3:50 pm ]
Post subject:  Re: Making any static object move in all directions/angles

Problem is, this can only be done to PCOs and handweapons such as knives I think. And putting the scaled plank inside the knife doesn't work since it's a static and therefore cannot die (it would stay in the same place), therefore the knife would have no collision physics, but would still be able to kill you. I have yet to try if this works.

**EDIT**
Well it seems the handweapons need to be PCOs for this to work (but PCOs you can't enter and that have no hud icon at all).

Author:  Coroner47 [ Thu Aug 20, 2009 12:10 am ]
Post subject:  Re: Making knife traps [CSM]


Author:  samrtguy [ Thu Aug 20, 2009 1:50 am ]
Post subject:  Re: Making knife traps [CSM]

That's ingenious, good find.

Author:  samrtguy [ Sat Aug 22, 2009 11:05 pm ]
Post subject:  Re: Making knife traps [CSM]

The same can be done to soldiers, right?

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/