blocker for party?
blocker for party?
hi,
I would like to ask, what is the best way to make a "blocker" for the party (not for monsters) ?
I mean, something invisible but acting like a wall. The party can't walk, but the monsters can.
I would like to ask, what is the best way to make a "blocker" for the party (not for monsters) ?
I mean, something invisible but acting like a wall. The party can't walk, but the monsters can.
Re: blocker for party?
I guess the best way to do this would be a party hook. You use an onMove hook, check for x, y , level and the direction the player tries to move to and then you cancel it if necessary. Like this (not tested):
Which would cancel any movement in north direction if the player is standing on the specified tile on level 3.
Code: Select all
onMove = function(self, dir)
if self.x == 1 and self.y == 13 and self.level == 3 and dir == 0 then
return false
end
end
Re: blocker for party?
Yeah that should do the trick very nicely. And it should be accompanied by a good fair explanation, because as a player I usually hate invisible walls unless there is a good plausible reason!
Finished Dungeons - complete mods to play
Re: blocker for party?
Good idea but I need to place a lot of these... not easy to use this way...Phitt wrote:I guess the best way to do this would be a party hook. You use an onMove hook, check for x, y , level and the direction the player tries to move to and then you cancel it if necessary. Like this (not tested):
Which would cancel any movement in north direction if the player is standing on the specified tile on level 3.Code: Select all
onMove = function(self, dir) if self.x == 1 and self.y == 13 and self.level == 3 and dir == 0 then return false end end
Explanation of why I want to do that :
SpoilerShow
I want to make my ghost monsters walk through the walls.
I can make false walls monsters can walk through but the party also can... That's why I want to block the party same as if there is a real wall.
I can make false walls monsters can walk through but the party also can... That's why I want to block the party same as if there is a real wall.
Re: blocker for party?
The only thing I could think of to make this work for more than just a few special occasions would be to place hidden pressure plates that set a counter to 1 when activated and set it back to 0 when deactivated. You'd need one for north, east, west and south and could place them properly (I hope multiple pressure plates on the same spot activate all at once). Then you could check for the counters in the script instead of a specific position. Would still be a lot of work to place all the pressure plates, but it would be doable at least unless you plan to have your ghost warriors everywhere in the whole dungeon.
Re: blocker for party?
Phitt you gave to me an idea
I will code that the same way I coded one of my wall puzzles, by creating secret doors and destroy them on activate and deactivate hidden plates!
If you are interesting about that I can copy here the code I will do.
I will code that the same way I coded one of my wall puzzles, by creating secret doors and destroy them on activate and deactivate hidden plates!
If you are interesting about that I can copy here the code I will do.
Re: blocker for party?
I made it
That's really cool to see the ghosts walk through the walls !
The method to make it (using the skull wallset) :
1. make your way
2. place "false" walls where you want to have a wall the ghosts can walk through
3. place pillars (to make it good looking)
4. place pressure plates hidden on the way you have these walls
Pressure plates must be named like this :
" real_wall_1010_1 "
where 1 means place a WALL and 0 means don't place a WALL
1010 = a wall on facing 0, no wall onfacing 1, a wall on facing 2, no wall on facing 3
the last number is a unique ID (1, 2, 3, 4.........)
Make a script and copy this code :
Then, each pressure plate have :
- on activate : realwall()
- on deactivate : destrealwall()
I tried to be more clear as possible to explain this... But maybe it was not very very clear... sorry
EDIT: The result is very very cool ! Running into the maze to escape the ghosts and seeing them walking through the walls to catch you is awesome !
That's really cool to see the ghosts walk through the walls !
The method to make it (using the skull wallset) :
1. make your way
2. place "false" walls where you want to have a wall the ghosts can walk through
3. place pillars (to make it good looking)
4. place pressure plates hidden on the way you have these walls
Pressure plates must be named like this :
" real_wall_1010_1 "
where 1 means place a WALL and 0 means don't place a WALL
1010 = a wall on facing 0, no wall onfacing 1, a wall on facing 2, no wall on facing 3
the last number is a unique ID (1, 2, 3, 4.........)
Make a script and copy this code :
Code: Select all
function realwall(trigger)
local dir0 = string.sub(trigger.id, 11, 11)
local dir1 = string.sub(trigger.id, 12, 12)
local dir2 = string.sub(trigger.id, 13, 13)
local dir3 = string.sub(trigger.id, 14, 14)
if (dir0=="1") then
spawn("ast_skull_secret_door", party.level, party.x, party.y, 0, "rw0")
end
if (dir1=="1") then
spawn("ast_skull_secret_door", party.level, party.x, party.y, 1, "rw1")
end
if (dir2=="1") then
spawn("ast_skull_secret_door", party.level, party.x, party.y, 2, "rw2")
end
if (dir3=="1") then
spawn("ast_skull_secret_door", party.level, party.x, party.y, 3, "rw3")
end
end
function destrealwall()
if findEntity ("rw0") then rw0:destroy() end
if findEntity ("rw1") then rw1:destroy() end
if findEntity ("rw2") then rw2:destroy() end
if findEntity ("rw3") then rw3:destroy() end
end
- on activate : realwall()
- on deactivate : destrealwall()
I tried to be more clear as possible to explain this... But maybe it was not very very clear... sorry
EDIT: The result is very very cool ! Running into the maze to escape the ghosts and seeing them walking through the walls to catch you is awesome !
Last edited by Pandafox on Wed Jan 23, 2013 1:01 am, edited 3 times in total.
Re: blocker for party?
how realllllllllllly great idea panda ! thx for sharing ! :p
Re: blocker for party?
SpoilerShow
Pandafox wrote:I made it
That's really cool to see the ghosts walk through the walls !
The method to make it (using the skull wallset) :
1. make your way
2. place "false" walls where you want to have a wall the ghosts can walk through
3. place pillars (to make it good looking)
4. place pressure plates hidden on the way you have these walls
Pressure plates must be named like this :
" real_wall_1010_1 "
where 1 means place a WALL and 0 means don't place a WALL
1010 = a wall on facing 0, no wall onfacing 1, a wall on facing 2, no wall on facing 3
the last number is a unique ID (1, 2, 3, 4.........)
Make a script and copy this code :Then, each pressure plate have :Code: Select all
function realwall(trigger) local dir0 = string.sub(trigger.id, 11, 11) local dir1 = string.sub(trigger.id, 12, 12) local dir2 = string.sub(trigger.id, 13, 13) local dir3 = string.sub(trigger.id, 14, 14) if (dir0=="1") then spawn("ast_skull_secret_door", party.level, party.x, party.y, 0, "rw0") end if (dir1=="1") then spawn("ast_skull_secret_door", party.level, party.x, party.y, 1, "rw1") end if (dir2=="1") then spawn("ast_skull_secret_door", party.level, party.x, party.y, 2, "rw2") end if (dir3=="1") then spawn("ast_skull_secret_door", party.level, party.x, party.y, 3, "rw3") end end function destrealwall() if findEntity ("rw0") then rw0:destroy() end if findEntity ("rw1") then rw1:destroy() end if findEntity ("rw2") then rw2:destroy() end if findEntity ("rw3") then rw3:destroy() end end
- on activate : realwall()
- on deactivate : destrealwall()
I tried to be more clear as possible to explain this... But maybe it was not very very clear... sorry
EDIT: The result is very very cool ! Running into the maze to escape the ghosts and seeing them walking through the walls to catch you is awesome !
I'm the Gate I'm the Key.
Dawn of Lore
Dawn of Lore
Re: blocker for party?
oh sorry !Leki wrote: Heh - I have the same trick in my ToW --> one less surprise / I must find something else now