[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

Battlefield Modding Tutorials
It is currently Tue Apr 16, 2024 6:15 am

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: Making knife traps [CSM]
PostPosted: Tue Aug 18, 2009 8:26 pm 
Offline

Joined: Sun Jan 18, 2009 12:37 am
Posts: 170
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.


Last edited by samrtguy on Wed Aug 19, 2009 5:39 pm, edited 2 times in total.

Top
 Profile Send private message E-mail  
 
PostPosted: Wed Aug 19, 2009 6:07 am 
Offline

Joined: Tue Nov 27, 2007 7:56 pm
Posts: 1226
[TKO]Twist [G2] : Requesting Youtube video!


Top
 Profile Send private message E-mail  
 
PostPosted: Wed Aug 19, 2009 7:01 am 
Offline
User avatar

Joined: Thu Feb 05, 2009 7:54 pm
Posts: 487
Location: Germany
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!).

_________________
Kampagne XI - Vereinte Achsenmächte


xFire: wgpsenshi


Top
 Profile Send private message E-mail  
 
PostPosted: Wed Aug 19, 2009 1:06 pm 
Offline

Joined: Thu Mar 15, 2007 2:22 pm
Posts: 1253
but still a nice workaround, me like!


Top
 Profile Send private message E-mail  
 
PostPosted: Wed Aug 19, 2009 3:50 pm 
Offline

Joined: Sun Jan 18, 2009 12:37 am
Posts: 170
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).


Top
 Profile Send private message E-mail  
 
PostPosted: Thu Aug 20, 2009 12:10 am 
Offline
User avatar

Joined: Mon Oct 20, 2008 9:25 pm
Posts: 103
Location: Canada

_________________
Image
Pray hard, die fast


Top
 Profile Send private message E-mail  
 
PostPosted: Thu Aug 20, 2009 1:50 am 
Offline

Joined: Sun Jan 18, 2009 12:37 am
Posts: 170
That's ingenious, good find.


Top
 Profile Send private message E-mail  
 
PostPosted: Sat Aug 22, 2009 11:05 pm 
Offline

Joined: Sun Jan 18, 2009 12:37 am
Posts: 170
The same can be done to soldiers, right?


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Group