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

Question

hey guys.  how do i create a resident evil style puzzle where i push an object to a location in zdoom? 

 

i saw remnants of a code that used Line slide to achieve this on the map. sadly i dont know what any of that particular code meant.

 

what i have in mind is to push a box, made in DoomBuilder, (i dont know how i would do that) or 3D model with a pushable flag on it.

where im getting really lost though, is how to set a zone for the object in doom builder. obviously, i would make a square, but then should i make a custom script? what should it say? is there another way to do this?

 

thank you for any help.

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 0

Pushable "objects" are typically done best with models, rather than with sectors. KDiZD used sector trickery to simulate the pushing of a crate, but the sector was not physically moving.

 

I can't create the scripting for moving the model right now, but I imagine it would follow this structure:

1. Touching the object would give the player an inventory item (which would need to be defined in DECORATE or ZScript).

2. Releasing the object would take away the inventory item.

3. Touching the object again would restore the inventory item, and so forth.

4. Crossing a linedef (or entering a sector) with the inventory item would trigger the action that you want. In other words, the player would need to cross the linedef (or enter the relevant sector) while still pushing the object.

5. Optionally, you can also give the player a message/hint that the object needs to be pushed.

Share this post


Link to post
  • 0

Instead of using sectors, you could make a pushable thing, with either a sprite or model, whichever you prefer.

Share this post


Link to post
  • 0

i may go with that, rex. like create my pushable model(or sprite) and have A line trigger a script....but how would i trigger for the model(or sprite) and not the player when walked over?

Share this post


Link to post
  • 0

The point of using an inventory item, is that the game then knows when you are touching (or "using") an object, such as a crate. As soon as you let go of the crate, you lose that inventory item. In this way, the game knows when you are crossing the linedef (or into a sector) while pushing (or "using") the crate, and when you are crossing it without pushing the crate.

 

There may be a simpler way of doing this with just scripting and no DECORATE, but let me think about it.

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
×