Spider Mastermind
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Turning Lost Souls into projectiles with BEX (question)
 
Author
All times are GMT. The time now is 15:18. Post New Thread    Post A Reply
Phml
Forum Staple


Posts: 3426
Registered: 06-09


The goal being to have an all new "projectile" for pain elementals (or anything using their attack action, I'm just sticking with PEs here).

This is what I have so far and it seems to work OK, save for the fact that the "projectile" doesn't disappear when hitting a wall or when something is too close to the PE, and just sits there. I tried to get around that by having the normal frames leading to the death sequence anyway, but obviously that means the projectile wouldn't travel for long - or I could use more/longer frames, but the projectile would then stand a longer time stuck in a wall.

I'm thinking it might not be that bad with the right graphic, but still, this is pretty hacky and messy. Is there any better way to get the whole thing done?

Old Post 12-22-11 21:33 #
Phml is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Marcaek
Senior Member


Posts: 1401
Registered: 12-10


I haven't looked at it yet, but how about making the monster facetarget then attack when it spawns, and have the chase state lead to death?

also i forget how being fired from a PE affects lost souls so i'll have to check that too

Old Post 12-23-11 15:54 #
Marcaek is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8893
Registered: 06-06


What you have there is a racing problem between a monster's unintended switching to its spawn state (due to SKULLFLY set internally by the PainAttack triggering the SkullAttack logic) and intended switching to its death state (due to MISSILE, set by you in the DEH).

However, I think I found the solution. Here's how it goes:

- Give the Lost Soul-projectile both spawn and see state. They can be the default ones.
- Give the Lost Soul its ranged attack state, which can also be the default one.
- The spawn state has Look codepointers, as usual, except that they lead into death (projectile fizzling frames). You can make the Look frames of 1 duration.
- The see state has Chase, as usual, but it also leads into death. You can also make the Chase frames of 1 duration.
- Set the Lost Soul's speed to 0.
- The important part: set Lost Soul's JUSTHIT flag.
- Set the FLOAT flag.

The effect: the monster will be created on its spawn state facing you, so it will automatically see you, immediately going into the see state. Thanks to the JUSTHIT flag, it will attack you as soon as it sees you, going into the stable attack mode and act like a typical charging Lost Soul. On impact, it will either die (due to being a MISSILE) or reset to spawn (due to SKULLFLY). If reset, it will see you again, but because the JUSTHIT flag only works once, it will NOT attack you instantly, so it will just have time to fizzle and disappear.

Even if they fail to trigger their see-state (player dead or no-alert area), they'll still be thrusted in the direction of the target and probably go a long way till they fizzle (something like 480 units).

The FLOAT bit is important, so the monster doesn't "teleport" to the ground when entering its chase frames. The speed is 0 so it doesn't creep around when in its chase frames.

Here's pastebin of the code. It doesn't seem to crash in vanilla:

http://pastebin.com/BYmNr7W9

Some drawbacks of this entire idea:

- Lost Souls are spawned at height 0 relative to the monster, which means that they'll be stopped by any solid decoration.
- They can hurt the same species as their parent.
- They won't cause any infighting (I wonder if they'll cause confusion instead)
- There's a slight homing behavior, because the see states may last longer than 1, during which they will adapt their aiming.
- A melee attack with these projectiles causes the damage to be inflicted twice, because there are two successive SkullAttacks: one at spawn-time, another at attack-time.
- Speed is fixed to 20.0
- Attack sound occurs twice.
- Death sound might occur twice.
- I don't know the Chase AI on its entirety, so I can't guarantee that it won't attack the second time instead of fizzling. But most of the time and during all the checks, it fizzled.
- The projectiles will be stopped by items!

Last edited by printz on 12-23-11 at 17:30

Old Post 12-23-11 17:08 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Vermil
Senior Member


Posts: 1729
Registered: 03-04


A monster is never in an 'attack status'. All A_Chase does (other than move the monster) is randommly set a monster to enter the state listed as it's ranged attack state or melee state (obviously based off distance and existence).

Any state that contains A_Chase has a chance of setting a monster to one of the afore mentioned attack states (indeed putting A_Chase on either of the attack states can cause an infinite loop, I assume as the game doesn't know what to do if the RNG comes up make attack and the monster is already in one of the attack states).

Hope that makes sense.

Old Post 12-23-11 17:48 #
Vermil is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8893
Registered: 06-06


I think you may extend this trick into MBF Dehacked by using the Spawn codepointer instead of PainAttack... but the problem with Spawn is that it creates an actor right inside the spawner and there's no collision check.

Old Post 12-23-11 18:12 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Phml
Forum Staple


Posts: 3426
Registered: 06-09


Pretty cool, printz. Most of the drawbacks you listed seem to be relatively easy to work around, save for the "blocked by items" which is a bit of a showstopper unfortunately.

Old Post 12-23-11 18:57 #
Phml is offline Profile || Blog || PM || Search || Add Buddy IP || Edit || Quote
Marcaek
Senior Member


Posts: 1401
Registered: 12-10


Perhaps utilizing semi-noclip in some way?

Old Post 12-23-11 21:05 #
Marcaek is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
printz
CRAZY DUMB ZEALOT


Posts: 8893
Registered: 06-06


Semi-noclip only makes actors pass stairs of any height (and in addition, prevents them from activating walk-over triggers). It doesn't make them pass through other solid actors or solid walls.

Old Post 12-23-11 23:23 #
printz is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit || Quote
Marcaek
Senior Member


Posts: 1401
Registered: 12-10


WhackEd lied to me!

Old Post 12-24-11 00:12 #
Marcaek is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit || Quote
All times are GMT. The time now is 15:18. Post New Thread    Post A Reply
 
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Turning Lost Souls into projectiles with BEX (question)

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.