A Projectile capable of checking target properties?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Mortarion
Posts: 120
Joined: Wed Jan 23, 2008 5:36 pm
Location: www.freewebs.com/forsakendoom
Contact:

A Projectile capable of checking target properties?

Post by Mortarion »

I'm messing around with bullet weapons, and looking to create a more "realistic" bullet system. However, I've been stumped lately by the prospect of replicationg the hitscan bulletpuff system. How would I go about Getting a projectile to spawn a "Blood" actor (or act like one) when hitting an actor that bleeds, and defaulting to a bulletpuff(or similar visual trick) when hitting a NOBLOOD actor, or a wall?

Making it RIPPER spawns the blood, but complications arise from that as well (The ripping itself, for instance)

But thats about as far as I've gotten.
User avatar
Xaser
 
 
Posts: 10774
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: A Projectile capable of checking target properties?

Post by Xaser »

What you're asking for is very possible. The magic is in the states.

By default, a projectile enters its Death state when hitting a wall, enemy, barrel, or anything. However, if you give it an XDeath state, it will enter that instead when it hits a bleeding actor (like an enemy). Use that to spawn some blood and you're all set.

Similarly, defining a Crash state will cause it to enter that when it hits a shootable actor with +NOBLOOD set (barrels are the most obvious example), so you can further customize things to your liking.

Hope this helps. :)
User avatar
Mortarion
Posts: 120
Joined: Wed Jan 23, 2008 5:36 pm
Location: www.freewebs.com/forsakendoom
Contact:

Re: A Projectile capable of checking target properties?

Post by Mortarion »

Oh, cool. thanks for that.

Hope psychic goes well.
Locked

Return to “Editing (Archive)”