Jump to content

Teleportation items in body slot


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

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...