I have no problem with the item jumping to the middle of the tile, but I would prefer if it ended in front of the player rather than under them so that they can pick it up without moving.
Fantastic idea though. Maybe the runes should be balance and physicality instead of death and earth.
[spell] Telekinesis (video)
Re: [spell] Telekinesis (video)
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
Re: [spell] Telekinesis (video)
Maybe (after checking there is no mouse item) it could end on the mouse cursor ?
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com
The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563
My preciousss: http://www.moonsharp.org
The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563
My preciousss: http://www.moonsharp.org
Re: [spell] Telekinesis (video)
@Neikun: Good idea and should be easy to implement. This version is not very polished yet, it's more like quick proof of concept. There is some problems still, so I don't recommend to use it in any dungeon yet, but I will improve it. Just wanted to show it this early because I knew that you guys would be excited
@Xanathar: That's a good idea too, I could implement that as an optional feature.
Thanks for the ideas/feedback.
@Xanathar: That's a good idea too, I could implement that as an optional feature.
Thanks for the ideas/feedback.
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
- cloneObject viewtopic.php?f=22&t=8450
Re: [spell] Telekinesis (video)
Truly awesome! I'm totally agree that it may be even more awesome with Xanathar's suggestion implemented, but nevertheless it's fantastic even at this "unpolished proof of concept" stage 
Re: [spell] Telekinesis (video)
Ok, here is the "final" version which should be safe to use (haven't tested it in game though). You can now cast telekinesis to container type items too and the contents will be preserved.
I also made the changes you suggested. New video:
https://docs.google.com/file/d/0B7cR7sc ... w4V1U/edit
(you can change the video quality from the bottom right corner)
This version requires the newest version of the framework, which includes Xanathars awesome GrimQ-library.
See this page for details: https://sites.google.com/site/jkosgrimr ... dule-grimq
Edit: forgot the script:
Edit2: Should have guessed, it didn't work in game, but I fixed it.
I also made the changes you suggested. New video:
https://docs.google.com/file/d/0B7cR7sc ... w4V1U/edit
(you can change the video quality from the bottom right corner)
This version requires the newest version of the framework, which includes Xanathars awesome GrimQ-library.
See this page for details: https://sites.google.com/site/jkosgrimr ... dule-grimq
Edit: forgot the script:
Code: Select all
function onCast(caster)
local item = help.nextEntityAheadOf(party, 5,'item',true)
if item then
telekinesis.pullItem(item)
end
end
function pullItem(item)
local timer = timers:create('move_timer_'..item.id)
timer:setTimerInterval(0.01)
timer.item_id = item.id
timer:addCallback(
function(self)
local item = findEntity(self.item_id)
self.sub_x = self.sub_x + (self.dx * 0.10)
self.sub_y = self.sub_y + (self.dy * 0.10)
item:setSubtileOffset(self.sub_x, -self.sub_y)
end
)
timer.moveTo = function(self,dir,distance)
self.dir = dir
self.distance = distance
self.sub_x = 0
self.sub_y = 0
self.dx,self.dy = getForward(dir)
self:setTickLimit(distance*30-10,true)
self:activate()
end
timer.onDeactivate = function(self)
local item = findEntity(self.item_id)
if (getMouseItem()) then
local x = item.x+self.dx*self.distance
local y = item.y+self.dy*self.distance
item = grimq.respawnItem(item,item.level,x,y,item.facing,item.id)
item:setSubtileOffset(-self.dx * 1,self.dy * 1)
else
local copy = grimq.saveItem(item)
item:destroy()
setMouseItem(grimq.loadItem(copy))
end
end
local dist = help.getDistance(party,item)
timer:moveTo(help.getOppositeFacing(party),dist)
end
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
- cloneObject viewtopic.php?f=22&t=8450
Re: [spell] Telekinesis (video)
Even more final version 
I added sound and particle effects, and a check if the party is not the same location as it was when the spell was cast, if not the item is not spawned as a mouseItem.
Video with effects: https://docs.google.com/file/d/0B7cR7sc ... NGVjQ/edit
Script (I will leave all versions to this thread so you can see how the code has evolved):
I added sound and particle effects, and a check if the party is not the same location as it was when the spell was cast, if not the item is not spawned as a mouseItem.
Video with effects: https://docs.google.com/file/d/0B7cR7sc ... NGVjQ/edit
Script (I will leave all versions to this thread so you can see how the code has evolved):
Code: Select all
function onCast(caster)
local item = help.nextEntityAheadOf(party, 5,'item',true)
if item then
playSound('teleport')
telekinesis.pullItem(item)
end
end
function pullItem(item)
local timer = timers:create('move_timer_'..item.id)
timer:setTimerInterval(0.01)
timer.item_id = item.id
timer:addCallback(
function(self)
local item = findEntity(self.item_id)
self.sub_x = self.sub_x + (self.dx * 0.10)
self.sub_y = self.sub_y + (self.dy * 0.10)
item:setSubtileOffset(self.sub_x, -self.sub_y)
local fx = findEntity(self.fx_id)
fx:translate(self.dx * 0.10,0, -self.dy * 0.10)
end
)
timer.moveTo = function(self,dir,distance)
self.dir = dir
self.distance = distance
self.sub_x = 0
self.sub_y = 0
local item = findEntity(self.item_id)
local fx = spawn('fx',item.level,item.x,item.y,item.facing)
fx:setParticleSystem('glitter_silver')
fx:translate(0,0,0)
fx:setLight(1, 1, 1,15,7,200,false)
self.fx_id = fx.id
self.dx,self.dy = getForward(dir)
self:setTickLimit(distance*30-10,true)
self:activate()
end
timer.onDeactivate = function(self)
local item = findEntity(self.item_id)
local partyMoved = false
local dest_x = item.x+self.dx*self.distance
local dest_y = item.y+self.dy*self.distance
if (party.x ~= dest_x or party.y ~= dest_y) then
partyMoved = true
end
if (getMouseItem() or partyMoved) then
item = grimq.respawnItem(item,item.level,dest_x,dest_y,item.facing,item.id)
item:setSubtileOffset(-self.dx * 1,self.dy * 1)
else
local copy = grimq.saveItem(item)
item:destroy()
setMouseItem(grimq.loadItem(copy))
end
local fx = findEntity(self.fx_id):destroy()
end
local dist = help.getDistance(party,item)
timer:moveTo(help.getOppositeFacing(party),dist)
end
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
- cloneObject viewtopic.php?f=22&t=8450
Re: [spell] Telekinesis (video)
Pure genius. Final effect is breathtaking.
It's probably require different way of thinking about some puzzle designs, but nevertheless it's awesome.
It's probably require different way of thinking about some puzzle designs, but nevertheless it's awesome.
Re: [spell] Telekinesis (video)
Thanks, I'm pretty satisfied with it too. There is one minor visual problem still though: When you cast telekinesis to a torch holder the torch will move towards the party but the flame effect stays in holder. I think it could be fixed by respawning the torch right after the spell is cast so the flame effect will be destroyed.
- LoG Framework 2http://sites.google.com/site/jkoslog2 Define hooks in runtime by entity.name or entity.id + multiple hooks support.
- cloneObject viewtopic.php?f=22&t=8450
- cloneObject viewtopic.php?f=22&t=8450
