Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Questions and Comments (two subjects here)

Page: 1 of 1
 MasterSidious
12-31-2003, 10:50 PM
#1
OK, the first topic I want to bring up is my new mod called "conc_modbeta" so far I've gotten the player to spawn with a conussion rifle and be able to shoot without taking up any ammo. Secondary fire doesn't do any damage.

Now, for my questions:
1. How do I make the dll's build into a "Final" folder?
2. How do I make the secondary blast throw ppl farther?
3/4. How can I make it so that no one can pull the Concussion rifle away from the player? (or do you think this is a good thing since players also have a saber or should I get rid of the saber too?)

Thanks in advance.
 MasterSidious
01-01-2004, 6:54 PM
#2
ANYONE?
 Nith Sahor
01-02-2004, 3:35 AM
#3
1. I don't know, 3/4 I can't really explain. As for 2, look in the function G_Damage (in g_combat.c). One of the arguments of that function is the mod int (which stores the "means of death" of the weapon like MOD_SABER) and one of the arguments is the dflags int, which contains different options for the weapon (one of which is the knockback flag). What you have to do is look through the function, find the part where the function checks if the weapon should do knockback - it looks like this:


knockback = damage;
if ( knockback > 200 ) {
knockback = 200;
}
if ( targ->flags & FL_NO_KNOCKBACK ) {
knockback = 0;
}
if ( dflags & DAMAGE_NO_KNOCKBACK ) {
knockback = 0;
}


what you need to do is add in an extra if condition which checks if the mod integer is MOD_CONC and appropriately set the knockback to whatever you want it to be.
 MasterSidious
01-07-2004, 8:08 PM
#4
I did this:
if (CONC_MOD) {
knockback = 10000;
}

And it didn't work All it does is make the program crash after a certain amount of time. Can anyone tell me how to do this right. And BTW I'm starting to think that causing a pushing effect with the concussion rifles secondary is not that good of a thing. ppl would just push everyone else around all the time. Any help would be appreciated :)
 Nith Sahor
01-07-2004, 9:53 PM
#5
Ok, if I'm not mistaken it should be MOD_CONC, but I'm not sure because you're implying that you were able to compile your mod without a problem...

MOD_CONC is an enum (enumerator - kind of like a constant value) and not a variable so there's no point to doing if (MOD_CONC)... because then the code in the block underneath will either always execute or never execute. You need to check if the variable mod which is supplied to the function as an argument is equivalent to MOD_CONC.

Where did you put if (CONC_MOD) ... ? Because if it is before the condition if ( knockback > 200 )... then you need to move it after (otherwise, every time it checks whether knockback is over 200 it will change it to 200, even though you want it to be 10000).

Also, I'd suggest that you go to the bookstore and buy a book on C because you won't get very far without a decent knowledge of C (and you'll have to keep asking questions at these forums, which isn't helpful when there's no one around to answer them).
Page: 1 of 1