Resource icon

[Open Assets] Map Object Pickup (Updated for v2.2) (v3)

This content may be freely modified and/or maintained by anyone.

Flame

WR 102
Second Verse, same as the first!

Flame said:
Oh hey, look who's back from the grave!
Here's a small tidbit of code that I made from a bigger project some time ago. Originally programmed in C and now updated to Lua.

Interact with Map Objects (Mobjs) in a totally different way!
Maybe mess with your friends?
PERHAPS YOU WANT TO PICK UP EACH OTHER?
1.0


USES
Use the Custom Action Button (2) to pick up and toss an object with the same button press!

Issues, problems or bugs?
  • In small scale, the only problem I've encountered was with Map objects that disappear, such as the rising pop-out spike object. I've created a workaround such that if the object is no longer valid, it allows you to pickup another object without error. (It doesn't produce an error in Lua at least!)
  • I am aware from the other thread that if you pick up a player and force them through a wall, the picked up player dies. I've attempted a workaround, however this has been left out as it produced odd behavior.

Other than that, the code hasn't been tested in large scale and I would be interested in knowing if there are any issues with the code. Please let me know of any issues that come up and what you may have been doing at the time of error, and I can make appropriate updates!
 

Attachments

  • srb20002.gif
    srb20002.gif
    2.1 MB · Views: 1,035
  • srb20003.gif
    srb20003.gif
    2.7 MB · Views: 834
  • srb20004.gif
    srb20004.gif
    6.9 MB · Views: 846
  • VL_MobjPickup-v3.zip
    2.7 KB · Views: 1,214
Last edited:
Regarding your code, let me remind you that MF_NOCLIPHEIGHT also exists, allowing objects to ignore floors and ceilings. Perhaps that could be a fix you could look into?

Regardless, Nice to see this ported. Now if you don't mind, Imma see if I can move the minecart in Arid Canyon Zone... :D
 
Ah yes.Some of those Map objects can be a little weird with what flags they have associated with them. That one naturally has a No Gravity Flag. I'll fix it up and possibly give the springs a universal gravity flag when dropped.

I'm also understanding that in ACZ and DSZ, there is an issue with the object pickup as it'll just grab an object from anywhere in the map. I assume this is due to the calculation of P_AproxDistance in the code. I'll fix this up soon.
 
Hey, all!

A new update is available!

Changes:
  • Modified the actual pickup code so it should no longer pick up objects that are "out of reach". This includes very big maps such as Arid Canyon Zone and Deep Sea Zone.
  • As noted in Miguel8888's comment, MF_SPRING flag behavior has been adjusted:
    1. When picking up a spring it is now not possible to accidentally collide with your held spring until thrown.
    2. When tossing a spring, IF it's a spring, it should universally remove the MF_NOGRAVITY flag for that given object. It should no longer fly into the sky.

SxBydoe.gif
 
Last edited:
I've played on a couple servers with this mod, and it is both fun and horrible at the same time. Trolls always end up shoving you in a wall or doing something weird to crash the server, and if used in the nights specialstages it completely breaks them, and if a troll gets ahold of the boss it's impossible for everyone else to finish. It's fun, but not something i'd recommend for particularly serious servers (Also first post woo)
 

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

Back
Top