Jump to content

Recommended Posts

I'm trying to make a Enderman mod for my friends and I'm running into problems with the teleportation. So I'm using other mods as the base for this (specifically I'm using the chaos emerald from the shadow the hedgehog mod) and tweaking it for my mod. Currently my only changes to the item are the name, the image, and the sanity drain all of which worked without issue, but when I change the equip slot, the teleportation stops working. 

When trying to find other references for code I've noticed all character teleportation abilities appear to be tied to a hand equipable items or teleport you to a predefined point, with the only other exception being Wortox (which seams far to complicated for me) and the older Enderman mod whose teleportation was maybe based on Wortox and doesn't work anymore.

So my questions are 1. Is it possible to make a teleportation item work in say a body slot? and 2. Is it by any chance a simple enough change to be explained to a layman or do i need to start actually studying LUA?

blinkone.lua

Wortox is a example, and very easy:

    if inst.components.playeractionpicker ~= nil then
        inst.components.playeractionpicker.pointspecialactionsfn = GetPointSpecialActions
    end
local function GetPointSpecialActions(inst, pos, useitem, right)
   local equipbodyitem = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.BODY)
    if right and equipbodyitem ~= nil and ... then
        return { ACTIONS.XXX }
    end
    return {}
end

 

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
×
  • Create New...