Page 32 of 400

Re: Ask a simple question, get a simple answer

Posted: Mon Dec 15, 2014 5:04 pm
by GoldenShadowGS
TheLastOrder wrote:How can I teleport to its original starting point a pushable block through a button?

I want to avoid that a player reaches a dead end where the puzzle can´t be solved... because all pushable blockers could be blocking each others.

Thanks in advance guys!

Code: Select all

function resetBlock()
--change "pushable_block_floor_1" to the Id of the floor tile you want your block to reset onto
	local pos = pushable_block_floor_1:getWorldPosition()
--change "pushable_block_1" to the ID of your pushable block 
	local b = pushable_block_1
	spawn("teleportation_effect",b.level,b.x,b.y,b.facing,b.elevation)
	b:setWorldPosition(pos)
	spawn("teleportation_effect",b.level,b.x,b.y,b.facing,b.elevation)
end

Re: Ask a simple question, get a simple answer

Posted: Tue Dec 16, 2014 4:08 am
by TheLastOrder
Soaponarope wrote:I don't think you can teleport them, but you can destroy them and spawn new ones in the original positions.
GoldenShadowGS wrote:

Code: Select all

function resetBlock()
--change "pushable_block_floor_1" to the Id of the floor tile you want your block to reset onto
	local pos = pushable_block_floor_1:getWorldPosition()
--change "pushable_block_1" to the ID of your pushable block 
	local b = pushable_block_1
	spawn("teleportation_effect",b.level,b.x,b.y,b.facing,b.elevation)
	b:setWorldPosition(pos)
	spawn("teleportation_effect",b.level,b.x,b.y,b.facing,b.elevation)
end
Thanks truly!!!!!

The puzzle is finished, but I´m facing another problem here:

I can´t walk over the last positions that the pushable blocks had before respawning them, why could this be happening?
The blocks spawns in the original spots apparently right and there´s nothing left on the rest of the floor squares...

Re: Ask a simple question, get a simple answer

Posted: Wed Dec 17, 2014 10:18 am
by TheLastOrder
SOLVED ----

How can I destroy the "ghosts" of the pushable blockers once they had respawn into the original positions?
(take a look to previous messages for more info)

Tested a few things with a:destroy() with the local comp but no way to do it.
Cloning the blocks and destroying the old ones isn't working neither.... :| as the reference works only the first time-cycle...

Code: Select all

function dedicadoaBertolucci()
   the_blockers_block_1:destroy()
   the_blockers_block_2:destroy()
   the_blockers_block_3:destroy()
   the_blockers_block_4:destroy()
   spawn("pushable_block", 10, 13, 16, 1, 0, "the_blockers_block_1")
   spawn("pushable_block", 10, 14, 15, 2, 0, "the_blockers_block_2")
   spawn("pushable_block", 10, 14, 16, 3, 0, "the_blockers_block_3")
   spawn("pushable_block", 10, 15, 16, 0, 0, "the_blockers_block_4")
end
Easier way. However, I still don´t know why the engine generates ghost entities tho.

Re: Ask a simple question, get a simple answer

Posted: Thu Dec 18, 2014 1:30 am
by Soaponarope
I've made more items usable underwater but I don't want them to have a charge up feature while underwater. For instance being able to throw daggers while on land, but only stab in water. How would I disable aquatic trait for the power attack only?

Re: Ask a simple question, get a simple answer

Posted: Thu Dec 18, 2014 7:42 pm
by ReFreezed
How do I wake up summon_stone_dormant monsters in a script? I can't seem to find a method for it.

Re: Ask a simple question, get a simple answer

Posted: Thu Dec 18, 2014 7:47 pm
by GoldenShadowGS
ReFreezed wrote:How do I wake up summon_stone_dormant monsters in a script? I can't seem to find a method for it.

Code: Select all

summon_stone_dormant.controller:activate()

Re: Ask a simple question, get a simple answer

Posted: Thu Dec 18, 2014 8:47 pm
by ReFreezed
Oh, that makes sense. Thanks GoldenShadowGS.

Re: Ask a simple question, get a simple answer

Posted: Thu Dec 18, 2014 11:26 pm
by Thorham
What's the light source for dungeons when there are no other light sources such as torches active? Dungeons are never completely dark, so the light has to come from somewhere.

Re: Ask a simple question, get a simple answer

Posted: Fri Dec 19, 2014 2:51 am
by minmay
party.torch

Re: Ask a simple question, get a simple answer

Posted: Fri Dec 19, 2014 5:29 am
by Thorham
minmay wrote:party.torch
Thanks 8-)