Lazer Posted December 23, 2003 I'm taking a little time to come back and catch up on some of the things I DON'T know yet (doom wise) so I decided to start messing around with EDF. It's really easy it seems but I'm having one problem. I'm trying to make a STRAIN like Demon Lord. I already have the sprites for it (it's dark/greyscale with red slime on hands). Now, I wanna make it throw red slime projectiles too. How would I do this? I already defined the new projectile and monster, I just don't know how I'm going to make it throw this new object. I'm guessing with a codepointer but how do I create one which will act like Bruisattack but tell it to throw the new projectile versus the old green one? Out of all the documentation I've read I see no mention of declaring new codepointers so I'm getting kinda confused. 0 Share this post Link to post
deathbringer Posted December 23, 2003 Apparently EDF is like DDF, but with a harder-to-read c++-like syntax, but basically you need to make the red slime attack in your attacks file (call it something like LORD_FIREBALL), and change the hell lord's RANGE_ATTACK to the attack you made and then...thats it Well, maybe EDF actually does it in a completley different way, but thats how i'd do it for EDGE 0 Share this post Link to post
Mordeth Posted December 24, 2003 First, define your new projectile by copy & plasting the original Baron projectile Thingtype, and changing BaronShot to eg. BaronRedShot. Change its spawn/death frame from S_BRBALL1 / S_BRBALLX1 to eg. RED_BALL1 / RED_BALLX1 using the sprite RBAL instead of BAL7. Note how the dehacked number of your new projectile must be unique and be 10000+. Doomednum is not neccessary because projectiles are not spawned at the start of a map.# Declaring the projectile thingtype BaronRedShot { spawnstate = RED_BALL1 seesound = firsht deathstate = RED_BALLX1 deathsound = firxpl speed = 983040 fastspeed = 1310720 radius = 6.00000 height = 8.00000 damage = 8 flags = NOBLOCKMAP|NOGRAVITY|DROPOFF|MISSILE|TRANSLUCENT flags2 = NOCROSS dehackednum = 10000 # <- attention! } # BaronRedShot frames, using the sprite RBAL* instead of BAL7* frame RED_BALL1 { cmp = "RBAL|*|T|4|*|@next" } frame RED_BALL2 { cmp = "RBAL|1|T|4|*|@prev" } frame RED_BALLX1 { cmp = "RBAL|2|T|6|*|@next" } frame RED_BALLX2 { cmp = "RBAL|3|T|6|*|@next" } frame RED_BALLX3 { cmp = "RBAL|4|T|6" } # ... and don't forget to declare RBAL spritenames += { "NULL", "RBAL" } Then you go use the new codepointer "MissileAttack"... so the 'action' is MissileAttack, and you use the dehacked number (this case 10000, or maybe "thing:BaronRedShot" works, too) of the projectile to use and make the follow-through action the normal baron scratch. You'd still need to code the new Baron though... I'm not going to write that all down because i'm dead tired ;) BTW, wasn't there an example 'mattack' text file included in the docs? That made an Imp shoot 3 homing fireballs, mancubus-style. And you can even adjust the Z height of the projectile... handy to use for big-sized monsters to prevent their projectiles from seemingly appearing from between their legs o_O 0 Share this post Link to post
Lazer Posted December 24, 2003 Thanks but I figured that part out by myself. The real problem now is that he disappears when he throws the red ball. I don't think I'm doing it right.frame S_BOS3_ATK1 { cmp = "BOSS|4|*|8|FaceTarget|@next"; dehackednum = 2015 } frame S_BOS3_ATK2 { cmp = "BOSS|5|*|8|FaceTarget|@next"; dehackednum = 2016 } frame S_BOS3_ATK3 { cmp = "BOSS|6|*|8|"; dehackednum = 2017 }Those are the attack frames I have for it.framedelta { name = S_BOS3_ATK3 action = MissileAttack // This is a parameterized codeptr args = { 301, 0 } // These are the parameters }I put that after since if I try to put S_BOS3_RUN1 in the S_BOS3_ATK3 action (which is trying to make it go to S_BOS3_RUN1 next) it gives me an error. So how would I tell it what to do next after the missle attack? Actually better yet how would I get it to melee instead just like the BruisAttack if the target is close enough and THEN go back to the walk animations? Oh and no I don't see mattack... 0 Share this post Link to post
Lazer Posted December 24, 2003 Nevermind I forgot to add "nextframe = S_BOS3_RUN1" I'm still not sure on a few things though: -How do I make it like BruisAttack where if the enemy is close enough it melees them? -How do I make it shoot like the DemonLord? (mancubas 3 shots really fast making a spread) Thanks 0 Share this post Link to post
Quasar Posted December 26, 2003 Here's the full args info for MissileAttack, from the Eternity docs: Args1 = DeHackEd number of thing type to fire Args2 = Select homing property * 0 = will not home * 1 = may home Args3 = Amount to add to standard z missile firing height Args4 = Amount to add to actor angle in degrees Args5 = DeHackEd number of state to enter for optional melee attack (negative values = no melee attack) Args5 MUST be set to a negative number unless you provide an optional scratch attack frame. Otherwise, the default value zero will cause the monster to transfer to the S_NULL state and be removed from the game when it tries to use a melee attack on you. That's how you create a scratch/missile attack -- provide the dehacked number of a frame to transfer to when the creature is within melee range. That frame could either use BruisAttack, or the parameterized Scratch pointer. Here's an example which would accomplish what I think you're after. I'm not showing it in cmp format because it'll make this post get really wide: frame S_BOS3_ATK3 { sprite = BOSS spriteframe = 6 tics = 8 nextframe = S_BOS3_RUN1 action = MissileAttack args = { thing:BaronRedShot, // Thing type to shoot 0, // Don't home 0, // Delta z: add 0 0, // Delta theta: add 0 frame:S_BOS3_SCRATCH // optional scratch frame! } dehackednum = 10000 // See note below! } frame S_BOS3_SCRATCH { sprite = BOSS spriteframe = 6 tics = 0 nextframe = S_BOS3_RUN1 action = BruisAttack dehackednum = 10001 // ABSOLUTELY REQUIRED HERE! } I suggest using the thing: and frame: prefixes for args values, because they make it much more clear to see what you're doing. Also, you should not be using such low DeHackEd numbers. If you use those numbers, your EDFs will not work with future versions of Eternity. The DeHackEd numbers 10000 through 32767 are reserved for user EDF mods currently, and you should always use them. Remember that any thing or frame you're going to use with codepointer arguments MUST have a DeHackEd number. Otherwise, the DeHackEd number can be allowed to default to -1 (such things and frames won't be accessible to DeHackEd patches, though). So, you don't need to give every one of your new things and frames unique dehackednum fields. 0 Share this post Link to post
Quasar Posted December 26, 2003 mattack.edf was just an experiment which was posted in a mostly hidden directory on my website. It needs updating for the changes to MissileAttack in beta 5, and I intend to turn it into one of those EDF tutorials everyone keeps asking for. It's obvious that there's a real need. I realize that parameterized codepointers are a bit more difficult to learn than the DDF style of attack specification, but I think the potential for flexibility is much greater. 0 Share this post Link to post
Lazer Posted December 26, 2003 Alright thanks this is a big help. Just one last thing: How would I make it shoot a spread versus a single shot? 0 Share this post Link to post
Lazer Posted December 26, 2003 Ok I figured it out. I needed a couple extra frames and have 0 tics inbetween and change the x on eacch projectile. This creates a nice spread. 0 Share this post Link to post
Quasar Posted December 27, 2003 Right. By using the angle parameter and zero-duration frames, you can have a monster spew out multiple projectiles, creating a Maulotaur- or Heretic Disciple-like effect. I am thinking about adding a new parameterized pointer for missile spread attacks, though. That would make it easier. You'd just specify a starting angle offset, an angle step value, and the number to fire. Tell me what you think about this idea. 0 Share this post Link to post