• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved Don't have actionID in movements.xml?

Szka

Member
Joined
Jul 27, 2016
Messages
65
Reaction score
11
Location
Chile
Hello Otland!
I'm using TFS 1.5 (Nekiro 8.60 downgrade) and I'm trying to get the player teleported when crossing a electric sparks.

However, when I try to create a new actionID in movements.xml, I get an error in the console that the function is not recognizable.
So I got it working only with the item id, I would like to make an actionID to get independancy with the item.

Lua:
<movevent event="StepIn" itemid="5068"  script ="energywalltp.lua"  />

I tryied replacing event with type, and itemid with actionid=1002. In my movements.xml there isn't a single "actionid".
I would really appreciate if someone could give me a hand!
 
Last edited:
Hello Otland!
I'm using TFS 1.5 (Nekiro 8.60 downgrade) and I'm trying to get the player teleported when crossing a electric sparks.

However, when I try to create a new actionID in movements.xml, I get an error in the console that the function is not recognizable.
So I got it working only with the item id, I would like to make an actionID to get independancy with the item.

Lua:
<movevent event="StepIn" itemid="5068"  script ="energywalltp.lua"  />

I tryied replacing event with type, and itemid with actionid=1002. In my movements.xml there isn't a single "actionid".
I would really appreciate if someone could give me a hand!
XML:
<movevent event="StepIn" actionid="1002"  script="energywalltp.lua"  />

No?
 
XML should still work, but you can try Revscript if you want.

data/scripts/your_script_name.lua
Lua:
local moveEvent = MoveEvent()

function moveEvent.onStepIn(creature, item, pos, fromPosition)
    -- the code here...
    return true
end

moveEvent:aid(1002) -- ActionID
--moveEvent:uid(ids)
--moveEvent:position(positions)
moveEvent:register()

Attention The revscripts will always be located in the directory: data/scripts/
 
XML should still work, but you can try Revscript if you want.

data/scripts/your_script_name.lua
Lua:
local moveEvent = MoveEvent()

function moveEvent.onStepIn(creature, item, pos, fromPosition)
    -- the code here...
    return true
end

moveEvent:aid(1002) -- ActionID
--moveEvent:uid(ids)
--moveEvent:position(positions)
moveEvent:register()

Attention The revscripts will always be located in the directory: data/scripts/
what position mean? will activate based on location and not action/unique?
 
what position mean? will activate based on location and not action/unique?
yes, you can pass positions to it so that this event is activated when a character passes through this position.
Examples:
Lua:
moveEvent:position(Position(100, 100, 7))
-- OR
moveEvent:position(Position(100, 100, 7), Position(101, 100, 7), Position(102, 100, 7))

-- OR
local positions = {
    Position(110, 100, 7),
    Position(111, 100, 7),
    Position(112, 100, 7),
    Position(113, 100, 7)
}

for _, pos in pairs(positions) do
    moveEvent:position(pos)
end

-- OR
moveEvent:position(unpack(positions))

It's just a matter of adapting it to our needs.
 
Thanks y'all for your solutions.
I don't know why yestarday it never worked with actionid.
Today, a new day, it worked ! Sometimes it feels like its playing games with you ahha
thanks again
 
Back
Top