I've got some new problems with my source code... Although my rifle is fully functional, I have encountered some new problems:
When I use the all guns/keys/fullhealth cheat, I can not get the rifle. How do I modify the cheat so it does give me the rifle?
Also, if I pick up the rifle before I get the chaingun, I get the chaingun also. How do i fix that?
This is more of a minor problem, but if I shoot any of the guns, sometimes they sounds won't play at all. Same goes with enemies. They sometimes won't play sounds. How do I fix this?
Dr. Chainsaw- 09-12-2005
Yeah just ignore me! :evil: The sound thing. That is not really a problem. I get that playing loads of other people's mods. It's nothing to worry about!!!!! :x :x
Oh and the Chaingun pickup thing;
http://www.btinternet.com/~belowe/weaponcollection.htm
Hair Machine- 09-12-2005
And to answer your cheat question, open the WL_PLAY.C file and to a search for 'MLI'. You should find a line that says "// SECRET CHEAT CODE: MLI"
Below this goes all the stuff that happens when you press that key combo. So, for example, "GiveWeapon (wp_chaingun);" will give a chaingun (and because of the way this function works, all the guns weaker than it). Either edit this to make it give your rifle, or, if you implemented the tutorial Chainsaw just showed you, set "int rifle" - or whatever you called it - to 1 in the same place.
That should fix it.
Dr. Chainsaw- 09-12-2005
If you did that and used the tutorial I gave, when you use the MLI cheat will it just give you the rifle and not the chaingun?
Hair Machine- 09-12-2005
Hmm.. actually, it would only give the Chaingun and the Rifle. So you'd need to put:
GiveWeapon(wp_pistol);
GiveWeapon(wp_machinegun);
GiveWeapon(wp_chaingun);
GiveWeapon(wp_rifle); // change to suit
to get ALL weapons if you enabled Joe's tutorial.
lizardcommando- 09-12-2005
Yeah just ignore me! :evil: The sound thing.
About the sound thing, the reason why I am concerned is that in my unedited source version, the sound plays. But in the edited source version, it doesn't play the weapom sound most of the time.
Well, I added the SMG into the game, but I can't see the pickup sprites, therefore, I can't use it. Also, I tried the cheat, but I didn't get the rifle and the smg along with the rest of the guns.
I followed that tutorial that was posted with the guns. I also had to combine the new weapons tutorial by Deathshead. But the damn thing still won't work though. :evil:
I don't know what I'm doing wrong...
EDIT:Ok, I looked at the code and I think I may have figured out the problem, but now when i try to compile it, I get these errors:
undefined symbol 'bo_rflbullets1'
duplicate case
undefined symbol 'bo_smg1'
duplicate case
NOTE: rflbullets is the name of the item. It's not a mispelling.
The ':' would be highlighted as the problem. This problem occurs in wl_act1. What does this mean?
Hair Machine- 09-15-2005
Did you remember to define the bo_ item sprite in Wl_def.h? Just search for bo_ and add it on the end if not. That's all I can think of right now. :)
lizardcommando- 09-15-2005
Hmm, I think I did. I'll go check right now.
Oh and here's the rest of the errors I got as well:
(it also includes the first ones I mentioned earlier)
Error WL_ACT1.C 114: Undefined symbol 'SPR_RFLBULLETS1'
Error WL_ACT1.C 114: Declaration syntax error
Error WL_ACT1.C 114: Unexpected }
Error WL_ACT1.C 114: Declaration terminated incorrectly
Error WL_ACT1.C 119: Unexpected }
Error WL_ACT1.C 181: Constant expression required
Error WL_ACT1.C 181: Duplicate case
Error WL_ACT1.C 183: Undefined symbol 'bo_smg1'
Error WL_ACT1.C 183: Duplicate case
Error WL_ACT1.C 188: Expression symbol
EDIT: Yeah, I did just that. I added in the bo_ stuff in wl_def.h, but it's still giving these following errors.
Hair Machine- 09-16-2005
Oh dear lord... you seem to have missed something; either a semicolon at the end of a command line, a comma, or you've been messing around with the curly brackets. To fix this you'll need to know about C++ syntax, or just look at how the rest of the (working) code is written and try to figure out where you went wrong. This can be a pain in the ass. *ouch*
Anyway, look for ; , and { or } in the wrong places, and it'll definitely be something in WL_ACT1.C. I suggest looking around lines 100-114.
lizardcommando- 09-16-2005
Well, here's some of the coding from WL_ACT1. I still can't find the errors or anything in it :evil:. Maybe you can find out what's wrong with it.
// WL_ACT1.C
#include "WL_DEF.H"
#pragma hdrstop
/*
=============================================================================
STATICS
=============================================================================
*/
statobj_t statobjlist[MAXSTATS],*laststatobj;
struct
{
int picnum;
stat_t type;
} statinfo[] =
{
{SPR_STAT_0}, // puddle spr1v
{SPR_STAT_1,block}, // Green Barrel "
{SPR_STAT_2,block}, // Table/chairs "
{SPR_STAT_3,block}, // Floor lamp "
{SPR_STAT_4}, // Chandelier "
{SPR_STAT_5,block}, // Hanged man "
{SPR_STAT_6,bo_alpo}, // Bad food "
{SPR_STAT_7,block}, // Red pillar "
//
// NEW PAGE
//
{SPR_STAT_8,block}, // Tree spr2v
{SPR_STAT_9}, // Skeleton flat "
{SPR_STAT_10,block}, // Sink " (SOD:gibs)
{SPR_STAT_11,block}, // Potted plant "
{SPR_STAT_12,block}, // Urn "
{SPR_STAT_13,block}, // Bare table "
{SPR_STAT_14}, // Ceiling light "
#ifndef SPEAR
{SPR_STAT_15}, // Kitchen stuff "
#else
{SPR_STAT_15,block}, // Gibs!
#endif
//
// NEW PAGE
//
{SPR_STAT_16,block}, // suit of armor spr3v
{SPR_STAT_17,block}, // Hanging cage "
{SPR_STAT_18,block}, // SkeletoninCage "
{SPR_STAT_19}, // Skeleton relax "
{SPR_STAT_20,bo_key1}, // Key 1 "
{SPR_STAT_21,bo_key2}, // Key 2 "
{SPR_STAT_22,block}, // stuff (SOD:gibs)
{SPR_STAT_23}, // stuff
//
// NEW PAGE
//
{SPR_STAT_24,bo_food}, // Good food spr4v
{SPR_STAT_25,bo_firstaid}, // First aid "
{SPR_STAT_26,bo_clip}, // Clip "
{SPR_STAT_27,bo_machinegun}, // Machine gun "
{SPR_STAT_28,bo_chaingun}, // Gatling gun "
{SPR_STAT_29,bo_cross}, // Cross "
{SPR_STAT_30,bo_chalice}, // Chalice "
{SPR_STAT_31,bo_bible}, // Bible "
//
// NEW PAGE
//
{SPR_STAT_32,bo_crown}, // crown spr5v
{SPR_STAT_33,bo_fullheal}, // one up "
{SPR_STAT_34,bo_gibs}, // gibs "
{SPR_STAT_35,block}, // barrel "
{SPR_STAT_36,block}, // well "
{SPR_STAT_37,block}, // Empty well "
{SPR_STAT_38,bo_gibs}, // Gibs 2 "
{SPR_STAT_39,block}, // flag "
//
// NEW PAGE
//
#ifndef SPEAR
{SPR_STAT_40,block}, // Call Apogee spr7v
#else
{SPR_STAT_40}, // Red light
#endif
//
// NEW PAGE
//
{SPR_STAT_41}, // junk "
{SPR_STAT_42}, // junk "
{SPR_STAT_43}, // junk "
#ifndef SPEAR
{SPR_STAT_44}, // pots "
#else
{SPR_STAT_44,block}, // Gibs!
#endif
{SPR_STAT_45,block}, // stove " (SOD:gibs)
{SPR_STAT_46,block}, // spears " (SOD:gibs)
{SPR_STAT_47}, // vines "
//
// NEW PAGE
//
#ifdef SPEAR
{SPR_STAT_48,block}, // marble pillar
{SPR_STAT_49,bo_25clip}, // bonus 25 clip
{SPR_STAT_50,block}, // truck
{SPR_STAT_51,bo_spear}, // SPEAR OF DESTINY!
#endif
{SPR_STAT_26,bo_clip2}, // Clip "
{SPR_RIFLE,bo_rifle}, // rifle
{SPR_RFLBULLETS1,bo_rflbullets1}, // RiFLeBULLETS mgunclip
{SPR_RFLBULLETS2,bo_rflbullets2}, // RiFLeBULLETS pouches
{SPR_SMG,bo_smg1}, // SMG
{-1} // terminator
;
/*
===============
=
= InitStaticList
=
===============
*/
void InitStaticList (void)
{
laststatobj = &statobjlist[0];
}
/*
===============
=
= SpawnStatic
=
===============
*/
void SpawnStatic (int tilex, int tiley, int type)
{
laststatobj->shapenum = statinfo[type].picnum;
laststatobj->tilex = tilex;
laststatobj->tiley = tiley;
laststatobj->visspot = &spotvis[tilex][tiley];
switch (statinfo[type].type)
{
case block:
(unsigned)actorat[tilex][tiley] = 1; // consider it a blocking tile
case dressing:
laststatobj->flags = 0;
break;
case bo_cross:
case bo_chalice:
case bo_bible:
case bo_crown:
case bo_fullheal:
if (!loadedgame)
gamestate.treasuretotal++;
case bo_firstaid:
case bo_key1:
case bo_key2:
case bo_key3:
case bo_key4:
case bo_clip:
case bo_25clip:
case bo_machinegun:
case bo_chaingun:
case bo_food:
case bo_alpo:
case bo_gibs:
case bo_spear:
case bo_rifle:
case bo_rflbullets1:
case bo_rflbullets2:
case bo_smg1:
laststatobj->flags = FL_BONUS;
laststatobj->itemnumber = statinfo[type].type;
break;
}
laststatobj++;
if (laststatobj == &statobjlist[MAXSTATS])
Quit ("Too many static objects!\n");
}
/*
Hair Machine- 09-20-2005
Found it. I believe the problem is that you've got
{SPR_SMG,bo_smg1}, // SMG
{-1} // terminator
;
when in fact you should have
{SPR_SMG,bo_smg1}, // SMG
{-1} // terminator
}; // notice the curly bracket?
There may be more, but I hope not!
lizardcommando- 09-20-2005
I added it, but for some reason, it's still giving me the same errors... :x
I'm going to try that Wolf17 program to see if I can make my weapons.
If that doesn't work... I'm gonna hate myself for doing this, but I'll try to recruit someone to do the coding...
EDIT: I tested out that Wolf17 program, and all I gotta say is that it's pretty good. I just wish you could add more frames and add in enemies or items, but it's good for what it has so far. I used it to test out the SMG's and it's looking good. Unfortunately, it isn't what I was looking for. That is, it's not doing the stuff I want to do.
There's only one thing to do... I guess it's time to recruit a coder...
So anyone want to help me code in the guns and a new enemy?
Dr. Chainsaw- 09-21-2005
Maybe you have a problem with your compiler
Forumer™ is Voted #1 Free Forum Hosting provider
Build your own community today with the largest message board hosting company.