News:
SMF - Just Installed!
Welcome,
Guest
. Please
login
or
register
.
AnthraxBio
Return to Castle Wolfenstein
Coding Tutorials
Destroyable Dynamite
« previous
next »
Pages:
[
1
]
Author
Topic: Destroyable Dynamite (Read 281 times)
SkreamerVirii
Administrator
Full Member
Posts: 133
Destroyable Dynamite
«
on:
September 03, 2008, 11:17:22 PM »
In this tutorial I will explain how to make destroyable dynamite so that you can use the dynamite for many things such as a booby trap a last defense and and instant explosion
So let us begin
Open up g_missile.c and locate this part of the code
// dynamite is shootable
// JPW NERVE only in single player
if (g_gametype.integer == GT_SINGLE_PLAYER) {
bolt->health = 5;
bolt->takedamage = qtrue;
bolt->die = G_MissileDie;
}
else {
bolt->health = 5;
bolt->takedamage = qfalse;
}
Now change it to this
// dynamite is shootable
// JPW NERVE only in single player
if (g_gametype.integer == GT_WOLF) {
bolt->health = 5;
bolt->takedamage = qtrue;
bolt->die = G_MissileDie;
}
Your Done!!!
Compile and play as an engineer set the dynamite on the ground back up enough to not take any damage and use your gun to blow it up
Here is a little additional feature that fretn added
i added a piece of code that only a sniper can destroy a dynamite ... i guess that's more interesting for teamplay
here is the code:
line 542 of g_missile.c you find:
void G_MissileDie( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod ) {
if (inflictor == self)
return;
self->takedamage = qfalse;
self->think = G_ExplodeMissile;
self->nextthink = level.time + 10;
}
change it to:
void G_MissileDie( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int damage, int mod ) {
if (inflictor == self || !attacker->s.weapon == WP_SNIPERRIFLE)
return;
self->takedamage = qfalse;
self->think = G_ExplodeMissile;
self->nextthink = level.time + 10;
}
compile the shit and run the game ...
if you want you can put it in your tutorial with my name under it :-))))
fretn
GOOD JOB!!! fretn
My next tutorial will be on adding weapons to player classes
«
Last Edit: September 03, 2008, 11:24:35 PM by SkreamerVirii
»
Logged
MagicOPromotion
Newbie
Posts: 7
Destroyable Dynamite
«
Reply #1 on:
May 26, 2009, 03:49:42 PM »
Yes there should be more destroyable buildings and objects. The crap they put as destroyable targets in BHD is laughable to say the least. We need to destroy trucks, helos, hummvees and buildings.
Logged
XRumer 5.0 Palladium: best promotion software
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Project 46 Teaser Screenshots
-----------------------------
=> Screenshots
-----------------------------
Help Wanted!!! Need a job??? Want to show off your skills?!?! Sign Up Today!!! Help Win 50,000 Dollars!!! Money Talks !!! Bullshit Walks!!!
-----------------------------
=> My Resume
=> Team Sign Up and the Application Process. It's 50,000 dollars!!! Are You Serious??? Its ONE (1) Year of HARD WORK!!!
=> A Trusted Advisor/Assistant
=> Film Director
=> Storyboard Artist
=> Camera Man
=> Shipping Leader
=> Scripting Leader
=> UnrealScript Editor
=> Kismet and Matinee Editor
=> Modeling Leader
=> 3d Modelers
=> Art Leader
=> Material Editor
=> Audio Leader
=> Musical Score Composer
=> Sound Fx Creator
=> Single Player Game Designer
=> Gameplay Editor
=> Physics Designer
=> Map Editor
=> Terrain Editor
=> Map Makers
=> Scene Decorators
=> Multiplayer Game Designer
=> Character Designer
=> Weapons Designer
=> Mini Games Designer
=> Reality Checker
=> Game Historian
=> Quality Assurance Manager
=> Alpha Testers
=> Ps3 Engineer
=> Texture and Material Creator
-----------------------------
50,000 Dollar Sign Up!!!
-----------------------------
=> Sign Up Here!!!
-----------------------------
Tools and Utilities - all open source or free to use.
-----------------------------
=> 3d Modeling Programs
=> Image Modification Programs
=> Scripting Programs
-----------------------------
Voice Over Auditions
-----------------------------
=> Sign Up Here!
-----------------------------
Machinimation 2 Videos
-----------------------------
=> Videos
-----------------------------
Quake 3
-----------------------------
=> Q3Prime
=> Coding Tutorials
-----------------------------
Return to Castle Wolfenstein
-----------------------------
=> Coding Tutorials
=> the Third Reich Mod
-----------------------------
Doom 3
-----------------------------
=> Insanitus Extremus Mod
-----------------------------
Quake 4
-----------------------------
=> Strogg Fortress Mod
-----------------------------
Unreal 3
-----------------------------
=> Screenshots
-----------------------------
Halflife 2
-----------------------------
=> Screenshots
-----------------------------
3d Models
-----------------------------
=> Screenshots
-----------------------------
Short Stories by Me
-----------------------------
=> Creation
=> Define Tom
=> Fallen
=> The Power of Poe
=> Frosty the Snowman Remix
=> WAR
-----------------------------
Weekly Newsletter SignUp
-----------------------------
=> Sign Up Here!
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Powered by SMF 1.1.6
|
SMF © 2006-2008, Simple Machines LLC
Loading...
Free SMF 1.1.5 Forum Theme
by
Tamuril
. © 2008.