Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Lobo

EDGE help!!

Recommended Posts

I have a little problem with DDF and I was wondering if anyone out there can help me out.

I want to have two weapons which have the exact same sprites but have two different attacks. Weapon_A shoots bullets and Weapon_B shots rockets.
The problem is that I want to change weapons WITHOUT seeing the RAISE and LOWER animation you get when you change from one to the other. The idea is to trick the user into thinking that it's the same weapon.

Originally, I tried to use a single weapon with a secondary attack but that doesn't work because the AMMOTYPEs are different: this means that when bullets run out I lose the weapon, even though the ammo for the secondary attack isn't empty.

It's kinda hard to explain but I hope you catch the drift :)

Share this post


Link to post

You can set the weapon up and down frames to 0 to make them switch really fast, but the problem is that they go all random-like, so you'll probably have to tap on the button quickly to switch.

I still have yet to get it to switch and not switch to something else quick as of now..

Share this post


Link to post

SEC_AMMOTYPE
[special]
Like AMMOTYPE but for the secondary attack.

copied straight from the ddf docs

Share this post


Link to post

You can also have sec_reload and stuff, so you can make the secondary attack reload after, say, 3 shots.

Share this post


Link to post

Yeah, I know all that stuff about the secondary attack but that doesn't answer my question. I already said I tried to have a primary attack(AMMOTYPE bullets) and a seconadry attack(rockets) but the problem is that as soon as you run out of either type of ammo you lose the weapon.

Any other suggestions?

Share this post


Link to post

Don't worry folks I got it! Thanks for your suggestions.

Here's the code:

[M16]
AMMOTYPE=BULLETS;
AMMOPERSHOT=1;
AUTOMATIC=TRUE;
BINDKEY=5;
PRIORITY=6;
KICK=0.04;
ATTACK=M16_BURST;
SEC_AMMOTYPE=ROCKETS;
SEC_AMMOPERSHOT=1;
SECOND_ATTACK=PLAYER_MISSILE;
SEC_AUTOMATIC=TRUE;
SOUND1=M16;

STATES(UP)=M16G:A:1:NORMAL:RAISE;

STATES(DOWN)=M16G:A:1:NORMAL:LOWER;

STATES(READY)=M16G:A:1:NORMAL:READY;

STATES(ATTACK)=M16G:A:1:BRIGHT:SHOOT,
M16G:A:1:BRIGHT:FLASH,
M16G:A:1:BRIGHT:EJECT(M16_SHELL_SPAWN),
M16G:A:1:BRIGHT:REFIRE;

STATES(FLASH)=M16G:B:2:BRIGHT:LIGHT2,
M16G:C:2:BRIGHT:LIGHT1,
M16G:A:1:BRIGHT:LIGHT0,
M16G:A:1:BRIGHT:LIGHT0,#REMOVE;

STATES(SECATTACK)=203G:A:8:BRIGHT:SEC_FLASH,
203F:B:3:BRIGHT:SEC_SHOOT,
203F:C:3:BRIGHT:NOTHING,
203F:D:3:NORMAL:NOTHING,
203G:A:0:NORMAL:REFIRE;

STATES(SECFLASH)=NULL:A:3:BRIGHT:LIGHT1,
NULL:A:2:BRIGHT:LIGHT2,
NULL:A:0:NORMAL:LIGHT0,#REMOVE;

Share this post


Link to post

That's where I got the above code from Tobester:)

It's still not perfect because now I have the opposite problem: when I run out of the primary ammo I lose the weapon, even though I've got secondary ammo!!

The only solution I can come up with is to use infinite ammo for the primary attack... :(

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×