Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Kinsie

Help with Edge DDF

Recommended Posts

I want to make a "thing" that spawns a randomly-chosen weapon from a certain variety (Eg. Shotguns for a Shotgun-Pickup spawn point), for my weapons mod. However, I don't know if this is possible in DDF. Do I need to use scripting or what?

Please help.

Share this post


Link to post

If you're using 1.27 of EDGE, the DROPITEM pointer in Things.ddf[DDFTHING lump if the DDF is in the wad itself] can work for this particular situation since the random things in question are items, which are usually not solid anyways:

First off, here's an example I used for item spawners of my own, however this will not work effectively with monsters since DROPITEM makes anything spawn with the noclip property[not solid]:

// Special Medikit Spawner [for spawning random 3DR Meditkit types at level startup, as to make things a bit more random]
[MEDIKIT_SPAWNER:8629]
TRANSLUCENCY=0%;
RADIUS=20;
HEIGHT=16;
RESPAWN_EFFECT=ITEM_RESPAWN;

(making the item invisible may not be required, but it's for good measure in case you have some spawners within the view of the player at start of a level and you don't want to see the spawners themselves before they do their work)

STATES(IDLE)=SMED:A:0:NORMAL:JUMP(SMALLMEDI:1,33.3%),
SMED:A:0:NORMAL:JUMP(MEDIUMMEDI:1,50%),
SMED:A:0:NORMAL:JUMP(LARGEMEDI:1);

(JUMP states are important in this code, as they are what allow random selections to occur. Notice how the percentages above the lower ones are small and certain numbers. The first one has 1/3 chance of happening, the second has 1/2 chance of happening, and the last has full chance of happening. This makes it equally possible for all three to be spawned. If a fourth frame is inserted at the top, it's percentage becomes 25%, 100% divided by the reserve number of frame[4 at the very top and 1 at the bottom]. That particular part can seem annoying to some at first, but you'll likely understand soon enough.)

STATES(SMALLMEDI)=MYST:A:0:BRIGHT:DROPITEM(DUKE3D_SMALL_MEDIKIT),#REMOVE;
STATES(MEDIUMMEDI)=MYST:A:0:BRIGHT:DROPITEM(SHADOW_WARRIOR_MEDIKIT),#REMOVE;
STATES(LARGEMEDI)=MYST:A:0:BRIGHT:DROPITEM(DUKE3D_LARGE_MEDIKIT),#REMOVE;

(Notice how the state names are connected to their respective JUMP states[assuming you've never really used the JUMP command before], and the itemname in ()s after DROPITEM is the actual items in which to be spawned. #REMOVE will make the spawner item[not the spawned item] disappear the moment it does it's job, since the frame intervals are all 0 in this case.)

Hope this helps you out on items.

Share this post


Link to post

Yes, if you use DROPITEM(IMP), it'll spawn the Imp, but it will be noclipped like an item usually is, so you'll go through it. I used this for a while and didn't catch onto it for a while. For monsters, spawning attacks in ATTACKS.DDF are your best friend here, instead of using DROPITEM. It's a little more work, but I've been able to make an advanced Icon Cube which can now spawn the enemies I've added into my mods instead of just the old spawncube definitions.

Share this post


Link to post

Before I try, is it possible to make enemies drop a random item spawner without too much trouble?

Share this post


Link to post

Oh, and if someone could show me the ropes on how to use the bounce command, as I wish to make my own shell casings without ripping off code from Immoral Conduct, that'd be cool.

Share this post


Link to post

to make bouncing,make sure in attacks.ddf:

special=bounce,etc;

and you can also have under the casing entry:

bounce_speed=xx;

Then, give your casing a:

(BOUNCE)=CSNG:A:2:NORMAL:MAKEACTIVESOUND(most likely your casing "tinkle"),
CSNG:B:2:NORMAL:BOUNCE_REARM,
CSNG:C:2:NORMAL:NOTHING,
CSNG:D:2:NORMAL:NOTHING,
CSNG:E:2:NORMAL:NOTHING,
CSNG:F:2:NORMAL:NOTHING,
#REMOVE;

If you want to know how make casings stay on the ground for a few minutes, on different randomly-chosen frames, e-mail me.

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
×