I want to make an obj that harms you when you step, or leap onto it. Like spikes. But I don't know how to make it KNOW when you are on it, and how to make the person who stepped on it 'bounce off'
Any help?
Copyright © 2025 BYOND Software.
All rights reserved.
Is your game a side-scroller, or a regular top-down map game? If it is a side-scroller, then you can just bounce off the player when they bump into it, however the method is different if it uses a conventional top-down map.
If you want an event to be triggered when an object enters another object's location, you cannot use the normal conventional means of Entered(), since that is called when an object enters another object's contents. An object's contents is its inventory, so you'll have to use another method. This other method is well explained in the forums and other resources, but the method is to define a proc to be called on the event an object enters the location of another object. This means we need to overwrite turf/Entered(). On the proc, we need to loop through all of the triggerable objects in the turf's location. This requires a for loop. In the loop, you should now call the obj's Trigger() proc. In this proc you can define actions you want to be done on the event. Here is a short snippet you can build upon.