Using BAM's generic Hit to get Hit event for object? (need for fx sounds)

madmrmax

Weeeeeee
Site Supporters
Joined
Sep 21, 2017
Messages
404
Solutions
1
Reaction score
210
Points
55
Favorite Pinball Machine
Indiana Jones (Williams)
For Theater of Magic I have custom sounds when the ball hits the magic trunk. The problem is that very few FP objects support a Hit method. I'm using a Peg model type for the magic trunk model which of course doesn't support Hit.

Is there a way to use BAM's Generic_Hit or SetSharedHitCallbacks for Peg and ALSO know in the code that the object being hit is the Trunk?
FP and BAM knows the ball hit the Trunk object, but I just need to be told about the hit. Perhaps there is an opportunity for a new BAM Hit specific event request (e.g. register for a specific Hit event for a specific object)

I would hate to switch to not using per-polygon hit on the Trunk model and instead use hidden walls to duplicate the experience, just to get a Hit event from the walls.

I've thought about placing multiple hidden triggers (opto or star type) around the trunk but that doesn't guarantee that a trigger hit matches a ball hit to the trunk.

Thoughts?
 
Yah, that's the problem with any model type that doesn't have a "Name" in the editor... they don't register a unique hit that can be called in script.

FizX code uses Generic_Hit to define special item types that are identified by name so we can have different rubber settings per rubber item, drop targets have different physics settings, etc. "How" to do that is beyond me. :)


Myself... I would place the Trunk toy outside of the playfield, and setup 4 invisible walls with different names for each side of the Trunk. This would allow each wall to have simple / efficient collisions and register a hit (then you can use a _Hit sub for sounds, or anything you want), and you can disable collisions as you want on the fly.

Then use a BAM mini-playfield (set to enable Physics Move) to capture the Trunk / walls area outside the cabinet and position it where you need. Then using the miniplayfield tool you can rotate the trunk and all walls, and lights etc as one item with all collisions and lights working like normal. the only thing you can't use within a miniplayfield tool would be something like a kicker (that would need to still be on the main playfield).


This would give you max flexibility with both animation, and physics collisions.


Most of what you see for this stuff in vpin land is smoke and mirrors. Fake it until you make. How you do it doesn't matter as long as it works well in the end.
 
Agreed on that approach! I currently have the Trunk in a MP (mini-playfield) already, I just didn't want to have to deal with drastic changes to the physics of things to get a Hit event. I already have to adjust the Collidable values of the MP as well as the MP's PhysicsMove value to ensure the magnetic field correctly adjusts (this is all logic that @Paolo was able to figure out along with help from Rav).

Thanks for the response Terry! I'm also going to mess around with changing the Trunk's model type to be a Target just to see if things could easily change.
 
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
  • Chat Bot Mibs Chat Bot Mibs:
    JerryB. has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    gy85712 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    CORY75 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    wildman22 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Yolo222 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    vumvuri has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    PMarot has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Anthias has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    rickpask has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Pauli_666 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Cattlesnake has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    AchillesK has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    emanoel299 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Bwolf122 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    thE fluiD musics lab. has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    denisman has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    odanny has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Rayman1103 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Vergin with Gerbil has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    pavement has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    AnyNameYouWish has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    NIPOGI has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    blackrose989 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    GeorgeH has joined the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Cheech93 has left the room.
      Chat Bot Mibs Chat Bot Mibs: Cheech93 has left the room.
      Back
      Top