Thing Spawning?

Status
Not open for further replies.

Fawfulfan

The Tortured Planet guy
I'm designing an Adventure Mode. The level will be quite long, and culminate in a boss battle. The problem is that in Adventure Mode, the camera locks on to any boss, so the camera view in the level is locked in one place.

Therefore, I was wondering if there is any way to make an enemy spawn halfway through a level. If there isn't, I'll have to scrap Adventure Mode, but I really don't want to do that because I want the character to always have Lightdash as a gimmick for the level, and also the boss battle looks really cool in Adventure Mode.

So, is there a way to make an enemy spawn halfway through?
 
Dynamic spawning of an enemy…

Well, you could create a custom Thing (we shall call this the seeker) that will have an invisible, inactive state that will look around for the player (using A_Look). When it finds the player, it will activate its Seestate, which you will lead to use one of the enemy-spawning actions to spawn the boss.

In more specific terms:

- Create a state that lasts for a small number of tics (I recommend 35, which I believe is the same number detons use) and uses an invisible sprite. Gives this state the A_Look action. Set Var1 to 0 (I think) and Var2 to 1. Set its next state to itself, so it will keep looping.
- Create a state that lasts for 0 tics and calls A_SpawnObjectRelative. Set Var1 to the thing number of the boss you want to spawn (these can be found on the wiki) and Var2 to 0. The next state should be state 0 (Null). - Create a thing that has that has a spawnstate equal to that first state I mentioned, and a seestate of the second state I mentioned. You should probably give it the NOGRAVITY (512) flag, for good measure. No harm in it, after all, and it will be useful if you, sometime in the future, want to spawn that enemy in the sky. Remember to give this Thing a Map Number, so you can position it when designing your map.
- Place the object on your map where you want the boss to spawn when the time comes.
 
Use a custom exit that skips the intermission screen. Thus, the bossfight happens in another map entirely.
 
BlueZero4 said:
Use a custom exit that skips the intermission screen. Thus, the bossfight happens in another map entirely.

That's pretty much what I've already decided on. Thanks though.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top