News:

One Minute Game Review by The Happy Friar: https://ugetube.com/@OneMinteGameReviews
Also on Rumble: https://rumble.com/c/c-1115371

idTech 4 (aka Doom 3 tech) Discord Server! https://discord.gg/9wtCGHa

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - VGames

#41
Ok I've given the Soul Cube a Gravity Gun ability while in the Zoomed in mode. Press fire to grab. Press alt fire to throw grabbed objects. It all works very well but I cant seem to keep the weapon from wanting to holster and switch back to the last weapon when grabbing stuff. Is there a way to keep the weapon from wanting to switch back to the previous weapon when you press the "fire" key? It'll stay in the zoomed mode and allow you to use the gravity feature as long as you don't zoom out but the instant you zoom out it switches back to the previous weapon.  The hud also displays the previous weapon and 1 round of ammo as soon as you press the fire key while zoomed in. Its like its just waiting for you to zoom out so it can switch back to the previous weapon. Here is my script file. Please help if you can. Also if you can figure out how to allow this gravity gun feature without any ammo having to be available that would be awesome.


/***********************************************************************

weapon_soulcube.script

***********************************************************************/

// blend times
#define SOULCUBE_IDLE_TO_LOWER 4
#define SOULCUBE_IDLE_TO_FIRE 4
#define SOULCUBE_RAISE_TO_IDLE 4
#define SOULCUBE_SPIN_TO_IDLE 0
#define SOULCUBE_IDLE_TO_SPIN 0

#define GG_RANGE 1150 //objects can be captured within this range
#define GG_HOVER 125 //captured objects hover in front of player at this distance
#define GG_AMMO_STRENGTH 10 //one ammo unit strength
#define GG_TARGET_SPEED 1100 //captured objects move to hover position with this speed
#define GG_LAUNCH_TIME 1 //caputred objects drop (after fire button is released) within this time, launch after
#define GG_LAUNCH_SPEED 24000 //captured objects launch away from player (after fire button is released) with this speed
#define GG_KICKBACK_SPEED 30 //player push back after captured object launch
#define GG_LAUNCH_AMMO 5 //ammo units used after captured object launch



object weapon_soulcube : weapon_base {

//entity beam1;
entity gg_owner;
//entity emit;
entity target;

float x;
float y;
float z;
float e;
float z_angle;
float xy_angle;
float target_health;
float justhurt;
float Parmangle;
float ammo_clip;

string target_class;
vector gg_angles;
vector gg_start;
vector gg_end;
vector gg_owner_size;
entity hand_emit;
entity weapon_ent;
entity owner;
float dragging;

vector target_pos;
vector move_dir;
vector push_dir;
float distance;
float frac;
float launch_time;
float current_time;
vector target_size;

float ftime;
float adjustorigin;



void init();
void UpdateShaderParms();

void Lower();
void Raise();
void Idle();
void Fire();
void Gravity();
void Grab();
void Dragging();
void Throw();
void Launch();
void ExitCinematic();

void FireSecondary();
};

void weapon_soulcube::init() {
cacheSoundShader( "player_drag" );
cacheSoundShader( "player_stopdrag" );
cacheSoundShader( "player_startdrag" );
cacheSoundShader( "player_drag_hum" );

weaponState( "Raise", 0 );
}

void weapon_soulcube::UpdateShaderParms() {
setShaderParm( SHADERPARM_MODE, totalAmmoCount() );
}

void weapon_soulcube::Raise() {
weaponRising();
playAnim( ANIMCHANNEL_ALL, "raise" );
while( !animDone( ANIMCHANNEL_ALL, SOULCUBE_RAISE_TO_IDLE ) ) {
UpdateShaderParms();
waitFrame();
}
weaponState( "Idle", SOULCUBE_RAISE_TO_IDLE );
}

void weapon_soulcube::Lower() {
weaponLowering();
playAnim( ANIMCHANNEL_ALL, "putaway" );
while( !animDone( ANIMCHANNEL_ALL, 0 ) ) {
UpdateShaderParms();
waitFrame();
}
weaponHolstered();
waitUntil( WEAPON_RAISEWEAPON );
weaponState( "Raise", 0 );
}

void weapon_soulcube::Idle() {
float count;

weaponReady();

count = 8 + sys.random( 8 );
while( 1 ) {

count--;
if ( count <= 0 ) {
playAnim( ANIMCHANNEL_ALL, "spin" );
count = 8 + sys.random( 8 );
} else {
playAnim( ANIMCHANNEL_ALL, "idle" );
}
while( !animDone( ANIMCHANNEL_ALL, 0 ) ) {
UpdateShaderParms();
if ( WEAPON_LOWERWEAPON ) {
weaponState( "Lower", SOULCUBE_IDLE_TO_LOWER );
}
if ( WEAPON_ATTACK && !isLowered() && !BUTTON_ZOOM ) {
weaponState( "Fire", SOULCUBE_IDLE_TO_FIRE );
}
if ( BUTTON_ALTFIRE && !isLowered() && !BUTTON_ZOOM && ( ammoAvailable() > 0 ) ) {
weaponState( "FireSecondary", SOULCUBE_IDLE_TO_FIRE );
}
if ( BUTTON_ALTFIRE && !isLowered() && ( !ammoAvailable() ) ) {
weaponState( "Lower", SOULCUBE_IDLE_TO_LOWER );
}
if ( BUTTON_ZOOM && ( ammoAvailable() > 0 ) ) {
weaponState( "Gravity", SOULCUBE_IDLE_TO_SPIN );
}
if ( BUTTON_ZOOM && ( !ammoAvailable() ) ) {
weaponState( "Lower", SOULCUBE_IDLE_TO_LOWER );
}
waitFrame();
}
}
}

void weapon_soulcube::Fire() {
WEAPON_START_FIRING = true;
playAnim( ANIMCHANNEL_ALL, "fire" );

while( !animDone( ANIMCHANNEL_ALL, 0 ) ) {
UpdateShaderParms();
waitFrame();
}

WEAPON_START_FIRING = false;
weaponHolstered();
}

void weapon_soulcube::FireSecondary() {
WEAPON_START_FIRING = true;
playAnim( ANIMCHANNEL_ALL, "fire" );

launchProjectiles( 0, 0, 0, 1.0, 1.0 ); // don't launch any projectiles, we need this to fire off the soul's ammo
$player1.fireProjectile( "projectile_SKspawner", getJointPos(1), $player1.getViewAngles() );

WEAPON_START_FIRING = false;
weaponHolstered();
}

void weapon_soulcube::Gravity() {

float gg_trace;
string target_name;
dragging = 0;

weaponReady();
while ( !WEAPON_RELOAD && BUTTON_ZOOM ) {
if ( WEAPON_ATTACK ) {
//ammo_clip = ammoInClip();
gg_owner = getOwner();
gg_start = gg_owner.getWorldOrigin();
gg_owner_size = gg_owner.getSize();
gg_start_z = gg_start_z + (gg_owner_size_z - 6);
gg_angles = gg_owner.getViewAngles();
z_angle = gg_angles_x * -1;
xy_angle = gg_angles_y;
z = sys.sin(z_angle) * GG_RANGE;
e = sys.cos(z_angle) * GG_RANGE;
y = sys.sin(xy_angle) * e;
x = sys.cos(xy_angle) * e;
gg_end_x = x + gg_start_x;
gg_end_y = y + gg_start_y; //  //CONTENTS_PROJECTILE|
gg_end_z = z + gg_start_z;
gg_trace = sys.tracePoint(gg_start, gg_end, CONTENTS_CORPSE|MASK_MONSTERSOLID|CONTENTS_RENDERMODEL, gg_owner);
target = sys.getTraceEntity();
target_class = target.getKey("spawnclass");
//target_health = target.getHealth();
target_name = target.getName();
//sys.print( "Class: " + target_class + "\n" );

if (target_class == "idAFEntity_Generic" || target_class == "idAFEntity_WithAttachedHead" || target_class == "idAI" || target_class == "idPlayer" || target_class == "idExplodingBarrel" || target_class == "idMoveable" || target_class == "idMoveableItem") {
weaponState( "Grab", SOULCUBE_IDLE_TO_SPIN );
}
}
waitFrame();
}
weaponState( "Idle", SOULCUBE_SPIN_TO_IDLE );
}

void weapon_soulcube::Grab() {

float th;
justhurt = 0;
adjustorigin = 0;

weapon_ent = gg_owner.getWeaponEntity();

playAnim( ANIMCHANNEL_ALL, "idle" );

sys.setSpawnArg( "model", "hand_glow_drag.prt" );
sys.setSpawnArg( "origin", target.getOrigin() );
hand_emit = sys.spawn( "func_emitter" );

//startSoundShader( "player_startdrag", SND_CHANNEL_ANY );
startSoundShader( "player_drag", SND_CHANNEL_ANY );


launch_time = (sys.getTime() + GG_LAUNCH_TIME);

if ( target_class == "idAI" || target_class == "idPlayer" ) { //just hurt monsters if their not dead yet
if ( target.getHealth() > 0 ) {
justhurt = 1;
//emit.setOrigin( '0 0 32' );
//startSoundShader( "player_startdrag", SND_CHANNEL_ANY );
playAnim( ANIMCHANNEL_ALL, "idle" );

target.allowMovement( false );
// useAmmo( 5 );
while ( WEAPON_ATTACK ) {
// sys.radiusDamage( target.getOrigin(), self, gg_owner, gg_owner, "damage_oneshot", 1.0 );
th = target.getHealth();

//SHOW THE MONSTERS HEALTH IN THE METERS
// setShaderParm( 2, (th / 750 ));

ftime = sys.getTime() + 0.1; //pain every 0.3 seconds
while ( ftime > current_time ) {
current_time = sys.getTime();
hand_emit.setWorldOrigin(weapon_ent.getJointPos(weapon_ent.getJointHandle( "Barrel" )));
waitFrame();
}
if ( target.getHealth() < 1 ) {
justhurt = 0;
weaponState( "Dragging", 1 );
}
waitFrame();
}
stopSound( SND_CHANNEL_ANY, false );
target.allowMovement( true );
}
}

if ( justhurt != 1 ) {
weaponState( "Dragging", 0 );
}

hand_emit.remove();
weaponState( "Gravity", 4 );
}

void weapon_soulcube::Dragging() {
// ammo_clip = ammoInClip();
// if ( ammo_clip < 1 ) {
// hand_emit.remove();
// weaponState( "Reload", 2 );
// }

dragging = 1;
// weapon_ent.setSkin( "skins/gg_active" );
// useAmmo( 1 );
while ( WEAPON_ATTACK ) { //following math continously calcs hover & captured object positions
gg_start = gg_owner.getWorldOrigin();
gg_owner_size = gg_owner.getSize();
gg_start_z = gg_start_z + (gg_owner_size_z - 6);
gg_angles = gg_owner.getViewAngles();
z_angle = gg_angles_x * -1;
xy_angle = gg_angles_y;
z = sys.sin(z_angle) * GG_HOVER;
e = sys.cos(z_angle) * GG_HOVER;
y = sys.sin(xy_angle) * e;
x = sys.cos(xy_angle) * e;
gg_end_x = x + gg_start_x;
gg_end_y = y + gg_start_y;
if (  target_class == "idAFEntity_WithAttachedHead" || target_class == "idAI" || target_class == "idPlayer" ) {
gg_end_z = z + gg_start_z + 16;
} else {
gg_end_z = z + gg_start_z;
}

target_pos = target.getWorldOrigin();

move_dir = gg_end - target_pos; //direction from captured object towards hover postion
distance = sys.vecLength(move_dir);

setShaderParm( 2, 0.02 + (distance / 60) + sys.random(0.05) );

move_dir = sys.vecNormalize(move_dir);
frac = (distance / GG_HOVER);
target.setLinearVelocity(move_dir * frac * GG_TARGET_SPEED); //move captured object towards hover position

hand_emit.setWorldOrigin(weapon_ent.getJointPos(weapon_ent.getJointHandle( "barrel" )));

if ( BUTTON_ALTFIRE && !isLowered() ) {
stopSound( SND_CHANNEL_ANY, false );
weaponState( "Throw", 0 );
}
waitFrame();
}

current_time = sys.getTime();
setShaderParm( 2, 0.01 );

stopSound( SND_CHANNEL_ANY, false );

waitFrame();
dragging = 0;
hand_emit.remove();
// weapon_ent.setSkin( "" );

weaponState( "Gravity", 4 );
}

void weapon_soulcube::Throw() {

// ammo_clip = ammoInClip();
// if ( ammo_clip < 3 ) {
// stopSound( SND_CHANNEL_ANY, false );
// hand_emit.remove();
// weaponState( "Idle", 2 );
// }
// useAmmo( 3 );

// weapon_ent.setSkin( "" );
hand_emit.remove();
startSoundShader( "player_stopdrag", SND_CHANNEL_ANY );

push_dir = gg_start - target_pos;
push_dir = sys.vecNormalize(push_dir);
playAnim( ANIMCHANNEL_ALL, "Idle" );
if ( target_class == "idExplodingBarrel" || target_class == "idMoveable" || target_class == "idMoveableItem") {
target.setLinearVelocity(push_dir * (GG_LAUNCH_SPEED/20) * -1);
} else {
target.setLinearVelocity(push_dir * (GG_LAUNCH_SPEED/1.5) * -1); //objects such as monsters get a higher speed due to higher mass
}
gg_owner.setLinearVelocity(push_dir * GG_KICKBACK_SPEED);

ftime = sys.getTime() + 1; //hold pain for 1.5 seconds
while ( ftime > current_time ) {
current_time = sys.getTime();
sys.radiusDamage( target.getOrigin(), self, gg_owner, target, "damage_gravitygun", 2.0 );
setShaderParm( 2, 0.01 + sys.random(0.02) );
waitFrame();
}
weaponState( "Gravity", 3 );
}



void weapon_soulcube::Launch() {
launchProjectiles( 1, 0, 0, 1.0, 1.0 );
}

void weapon_soulcube::ExitCinematic() {
weaponState( "Idle", 0 );
}


#42
How do u make the screen look like you're looking through a scope? Like what are the commands for pulling this off? I know where to put it in the weapon script but what are the commands that I should look into using to pull this off?
#43
id Tech 4 Scripting / Railgun
June 12, 2015, 09:30:11 AM
Anybody ever make a projectile like this? Was wondering what all goes into making a proper Railgun projectile.
#44
Could somebody please help me write some simple code for a character script file that makes him stand in one spot and shoot monsters that come along. I've tried so hard to modify scripts that belong to characters that do just this but they never attack. I'm not as good as I thought going into this idea. Please help if you can. I got the def stuff figured out but AI is so hard for me.
#45
id Tech 4 Mods / Small Mech addon
June 05, 2015, 03:18:17 PM
Has anybody ever created usable vehicles in a Doom 3 mod? I was thinking of adding something like this to Doom 3 where u could jump into a mech that was small enough to walk in the same places that the player could. And before it was destroyed the player could jump out before it blew up and killed him. Of course he could exit the mech too if he wanted. It would need a new hud when being used and the primary fire button would fire machine guns and the secondary fire would fire missiles. I was thinking of porting over that mech that was in Quake 4 and then shrinking it down a bit so that it could fit in the Doom 3 maps better. That way it could go where the player can go but at a slower pace. Anybody ever add vehicles?  Am I biting off to much? Should I just back away from this? My mod is fairly difficult by design and I think this would be a nice addition to help out the player here and there.
#46
Ok here's my idea and if somebody could do this for me it would sure take a huge load off of me.

I want to add the Spider Mastermind to the game but I want it to appear after you kill the Cyberdemon and I want the fight to happen on the same map but with a few changes. Basically when you kill the Cyberdemon you watch him get killed by the Soul Cube and after it closes the Hell Hole instead of the cutscene cutting away to the part where the marines cut open that door the game goes back to a new scene where the Spider Mastermind spawns in at the opposite end of the arena from the way you came in there. And maybe you get a shot of the Marine standing there with a little fear on his face. I'm sure this can be done with existing animations. Then maybe you hear Betruger shout out something as the camera goes back to first person and the fight starts. The Hell Hole which is now closed up can be walked on by you and the boss to add to the arena and maybe a few more health and ammo pickups are spawned in some where in the arena to help you out. Maybe around the center of the arena. After you kill the Spider Mastermind about 5 to 10 seconds goes by before the screen goes black and then the cutscene where the marines are cutting through that metal door starts and the rest of the ending cutscene plays as normal.

Any takers? 
#47
Does anybody have the model and animations for the Spider Mastermind in this video?

https://m.youtube.com/watch?v=UTxyHbh-tzE

I tried the links but no good.
#48
How would I go about making the timescale command slow down and warp the in game sound. I've always hated how the sound doesn't slow down along with the frame rate when using timescale command. So I'd like to know how to fix this. I didn't know where to post this because I wasn't sure if it could be done via scripts or source code.
#49
I've got this secondary attack for the BFG in my Perfected Doom 3 mod that releases big green orbs that move very slowly and basically act as turrets that attack monsters using the laser currents that flow from the normal BFG projectile as it flies across a room. Anyways I noticed that the orbs will only attack monsters that were already present when the turret orb was launched. If the turret orb has been launched and then a monster appears or spawns in the orb will not attack them. How can I fix this problem. I'm sure it has something to do with the seeking code for projectiles. Because my primary attack for the BFG releases extra small orbs along with the primary projectile that vary in number depending on how much u charged up the BFG before firing. And these smaller orbs wont seek an enemy unless you were aiming right at somebody when u fired the gun. I hope u guys understand what I'm saying and asking.
#50
What's the easiest way to remove the drool pouring out of the hell knights mouth?
#51
Since it doesn't look like I'll be getting any help to make some animations for some of the weapons in Doom 3 what is the easiest way to get into animating for this game? Does a free version of Blender work for Doom 3? Everybody I know personally that has made animations for it uses Max 9. I don't have the cash for that and I don't want to be a pirate so how can I make animations for free?
#52
id Tech 4 Needs Help / animator needed
September 03, 2014, 05:54:16 PM
I'm looking for somebody to make a few weapon melee animations for my Doom 3 mod. I just need a melee animation for the minigun, rocket launcher, and BFG. Nothing flashy just a simple animation where the player swings the weapon as if he's melee'ing a baddy. Also I need a looping animation for the soul cube. I wanted to take that animation where the soul cube spins in place with its blades out when its idol for too long and make that its melee animation. I want the soul cube to spin in place constantly when u press the melee button so that it can be used to chop up nearby enemies. Thank u.
#53
Haunting of Deck 12 / Perfected Doom 3
September 02, 2014, 09:11:26 AM
Here's a link to help you keep up with the latest on Perfected Doom 3:

http://www.moddb.com/mods/perfected-doom-3-version-500
#54
Is it possible to call upon the timescale command from within a monsters animation either in its def or script file? If so how do you call it? I've tried but had no luck.
#55
Strutt your stuff! / Perfected Doom 3
August 19, 2014, 11:34:26 AM
Here's a link to help you keep up with the latest on Perfected Doom 3:

http://www.moddb.com/mods/perfected-doom-3-version-500
#56
id Tech 4 Mods / Looking for a mod
August 19, 2014, 09:46:57 AM
At the doom3world.org forums somebody had posted about a mod they were making for doom 3 that added melee attacks for all of the weapons. I know there was a link to download the mod but now it's gone. I'm currently doing the same thing for Perfected Doom 3 and I have melee animations for almost all of the weapons except for the rocket launcher, minigun, and BFG. My animator has run out of time and cannot make the animations for these guns. Please help if u can. I just need the name of the mod or its author. Thanks.