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

Leaf spawner in Hexen

Recommended Posts

Hi all,

On the seven portals hub, and a few other maps in Hexen, some dead leafs spawn off a tree, and blow into the wind, simulating fall/ early spring.

My question is, how do you go about extracting the spawner from the Hexen Iwad, because when I open it up in slade, I don't see any decorate files, or any other files that could be used to make such a thing.

Thanks.

Share this post


Link to post

If you want to be really adventurous and learn something, try creating the effect on your own. Of course, if you are lazy or don't want to bother learning DECORATE on your own, copying the already existing code is alright.

I say try to code it on your own because it's really rewarding to see your own effects make progress.

Share this post


Link to post

Thanks man, I've isolated the necessary code and textures. Is there anything I need to modify in the code for this to work?

Haha, perhaps another day when I have more experience. I'm still very new to this code, but would love to make my own someday. I'll stick to using/editing pre-existing stuff till I feel more comfortable making my own things.

Share this post


Link to post

So in order to use this in doom you need to use inheritance right?

What I've done so far is basically name an actor that inherits all of LeafSpawners, leaf1 and leaf2's attributes. I have also put all of the leaf textures into my wad. I can see the actor in the decorate section in doom builder just fine, however in game no leafs are spawned. Is there something else that needs to be done?

Share this post


Link to post
Godsdoomer said:

So in order to use this in doom you need to use inheritance right?


Only if you want to modify it.

If you only want to use it as it is, all you need to do is spawn one. Since they don't have an editor number outside of Hexen, a possibility is to create a derived class with inheritance, but another is to use a randomspawner in this way:

Actor LeafSpawnerSpawner : RandomSpawner 1337 { DropItem "LeafSpawner" }

Also make sure the leaf sprites are in the proper namespace.

Share this post


Link to post
Gez said:

Actor LeafSpawnerSpawner : RandomSpawner 1337 { DropItem "LeafSpawner" }


I would normally do it this way:

Actor MyLeafSpawner : Leafspawner 1337 {}

Given that this method is shorter, is there any advantage to the method that you posted?

Share this post


Link to post

Yep. For a start, it results in the exact same actor getting into the map, rather than a clone. This means that if you have special effects attached to that actor -- such as dynamic lights, modeldefs, or even an "enhanced" version that replaces them -- then these effects will work.

Sure, this probably doesn't apply to the leaf spawner in particular; but as a general method I think it's better.

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
×