Is anyone making a space hulk mod?
- JohnWordsworth
- Posts: 1397
- Joined: Fri Sep 14, 2012 4:19 pm
- Location: Devon, United Kingdom
- Contact:
Re: Is anyone making a space hulk mod?
@Lmaoboat: It worked for me! I only put one in the level though and I expect as it uses a single global variable, there might just be a small issue if you try to place more than one in the level.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
Re: Is anyone making a space hulk mod?
Hopefully this will work:
Code: Select all
spawn("prison_ceiling_lamp", self.level, self.x, self.y, self.facing, self.id.."blink")
spawn("timer", self.level, self.x, self.y, self.facing, self.id.."timey")
:setTimerInterval(0.075)
:addConnector("activate", self.id, "randomblink")
:activate()
function randomblink()
local X = math.random(1,4)
if X == 1 then
findEntity(self.id.."blink"):toggle()
end
end
Re: Is anyone making a space hulk mod?
I've never really been clear on exact localness or globalness of varibles.
Re: Is anyone making a space hulk mod?
Fortunately it seems I haven't repeated the mistake as much as I thought, anyone want to see if this works?
Actually, I just realized I don't need timers for that anymore now that we can destroy entities.
Code: Select all
pixelsy = {3.5,3.5,3.5,3.5,3.5,3,3,3,3,3,2.5,2.5,2.5,2.5,2.5,2,2,2,2,2,1.5,1.5,1.5,1.5,1.5}
if self.facing == 0 then
pixelsx = {-1,-0.5,0,0.5,1,-1,-0.5,0,0.5,1,-1,-0.5,0,0.5,1,-1,-0.5,0,0.5,1,-1,-0.5,0,0.5,1}
pixelsz ={1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3}
elseif self.facing == 1 then
pixelsz = {1,0.5,0,-0.5,-1,1,0.5,0,-0.5,-1,1,0.5,0,-0.5,-1,1,0.5,0,-0.5,-1,1,0.5,0,-0.5,-1}
pixelsx ={1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3}
elseif self.facing == 2 then
pixelsx = {1,0.5,0,-0.5,-1,1,0.5,0,-0.5,-1,1,0.5,0,-0.5,-1,1,0.5,0,-0.5,-1,1,0.5,0,-0.5,-1}
pixelsz ={-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3}
else
pixelsz = {-1,-0.5,0,0.5,1,-1,-0.5,0,0.5,1,-1,-0.5,0,0.5,1,-1,-0.5,0,0.5,1,-1,-0.5,0,0.5,1}
pixelsx ={-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3,-1.3}
end
n0 = {1,2,3,4,5,6,10,11,15,16,20,21,22,23,24,25}
n1 = {1,2,3,8,13,18,21,22,23,24,25}
n2 = {1,2,3,4,5,10,11,12,13,14,15,16,21,22,23,24,25}
n3 = {1,2,3,4,5,10,11,12,13,14,15,20,21,22,23,24,25}
n4 = {1,5,6,10,11,12,13,14,15,20,25}
n5 = {1,2,3,4,5,6,11,12,13,14,15,20,21,22,23,24,25}
n6 = {1,2,3,4,5,6,11,12,13,14,15,16,20,21,22,23,24,25}
n7 = {1,2,3,4,5,6,10,15,20,25}
n8 = {1,2,3,4,5,6,10,11,12,13,14,15,16,20,21,22,23,24,25}
n9 = {1,2,3,4,5,6,10,11,12,13,14,15,20,21,22,23,24,25}
function makelight()
for i=1,25 do
local check = findEntity(self.id..i)
if check == null then
spawn("fx", self.level, self.x, self.y, 3, self.id..i)
local lcd = findEntity(self.id..i)
lcd:setLight(1,0,0,500,0.3, 360000, false)
lcd:translate(0,-1,0)
end
end
end
function removelight()
for i=1,25 do
local check = findEntity(self.id..i)
if check ~= null then
local lcd = findEntity(self.id..i)
lcd:destroy()
end
end
end
function numlist(n)
if n == 0 then
for i=1,25 do
local pix = n0[i]
if pix ~= nil then
local lcd = findEntity(self.id..i)
local movex = pixelsx[pix]
local movey = pixelsy[pix]
local movez = pixelsz[pix]
lcd:translate(movex,movey,movez)
end
end
end
if n == 1 then
for i=1,25 do
local pix = n1[i]
if pix ~= nil then
local lcd = findEntity(self.id..i)
local movex = pixelsx[pix]
local movey = pixelsy[pix]
local movez = pixelsz[pix]
lcd:translate(movex,movey,movez)
end
end
end
if n == 2 then
for i=1,25 do
local pix = n2[i]
if pix ~= nil then
local lcd = findEntity(self.id..i)
local movex = pixelsx[pix]
local movey = pixelsy[pix]
local movez = pixelsz[pix]
lcd:translate(movex,movey,movez)
end
end
end
if n == 3 then
for i=1,25 do
local pix = n3[i]
if pix ~= nil then
local lcd = findEntity(self.id..i)
local movex = pixelsx[pix]
local movey = pixelsy[pix]
local movez = pixelsz[pix]
lcd:translate(movex,movey,movez)
end
end
end
if n == 4 then
for i=1,25 do
local pix = n4[i]
if pix ~= nil then
local lcd = findEntity(self.id..i)
local movex = pixelsx[pix]
local movey = pixelsy[pix]
local movez = pixelsz[pix]
lcd:translate(movex,movey,movez)
end
end
end
if n == 5 then
for i=1,25 do
local pix = n5[i]
if pix ~= nil then
local lcd = findEntity(self.id..i)
local movex = pixelsx[pix]
local movey = pixelsy[pix]
local movez = pixelsz[pix]
lcd:translate(movex,movey,movez)
end
end
end
if n == 6 then
for i=1,25 do
local pix = n6[i]
if pix ~= nil then
local lcd = findEntity(self.id..i)
local movex = pixelsx[pix]
local movey = pixelsy[pix]
local movez = pixelsz[pix]
lcd:translate(movex,movey,movez)
end
end
end
if n == 7 then
for i=1,25 do
local pix = n7[i]
if pix ~= nil then
local lcd = findEntity(self.id..i)
local movex = pixelsx[pix]
local movey = pixelsy[pix]
local movez = pixelsz[pix]
lcd:translate(movex,movey,movez)
end
end
end
if n == 8 then
for i=1,25 do
local pix = n8[i]
if pix ~= nil then
local lcd = findEntity(self.id..i)
local movex = pixelsx[pix]
local movey = pixelsy[pix]
local movez = pixelsz[pix]
lcd:translate(movex,movey,movez)
end
end
end
if n == 9 then
for i=1,25 do
local pix = n9[i]
if pix ~= nil then
local lcd = findEntity(self.id..i)
local movex = pixelsx[pix]
local movey = pixelsy[pix]
local movez = pixelsz[pix]
lcd:translate(movex,movey,movez)
end
end
end
end
function addx()
if X == 9 then
X = 0
makelight()
numlist(0)
else
X = X + 1
makelight()
numlist(X)
end
end
function minx()
if X == 0 then
X = 9
makelight()
numlist(9)
else
X = X - 1
makelight()
numlist(X)
end
end
function add()
removelight()
addx()
end
function sub()
removelight()
minx()
end
makelight()
numlist(0)
if X == nil then
X = 0
end
Re: Is anyone making a space hulk mod?
JohnWordsworth wrote:@Lmaoboat: It worked for me! I only put one in the level though and I expect as it uses a single global variable, there might just be a small issue if you try to place more than one in the level.
it worked for me fine in the editor but once i loaded up my dungeon in grimrock proper, it crashed.
i'll try the new script tomorrow.
Grimrock Community 'FrankenDungeon 2012. Submit your entry now!: http://tinyurl.com/cnupr7h
SUBMIT YOUR ASSETS! Community Asset Pack (C.A.P.): http://tinyurl.com/bqvykrp
Behold! The HeroQuest Revival!: http://tinyurl.com/cu52ksc
SUBMIT YOUR ASSETS! Community Asset Pack (C.A.P.): http://tinyurl.com/bqvykrp
Behold! The HeroQuest Revival!: http://tinyurl.com/cu52ksc
Re: Is anyone making a space hulk mod?
enemies that stalk hmm.. how about hidden pressure plates that spawn monsters Right behind you or Right in front of you - add that in with the blinking lights haha.HaunterV wrote:Space Hulk- personal favourite game. Agreed that we go with inspiration. never call it space hulk, call it something else.
I want that spacewallset damnit!
so call just go off of inspiration of spacehulk.
We can come up with similar names ad themes.
You need space corridors,
enemies that stalk you,
hopeless situations that need to be overcome.
we need tunnels for enemies but not players to go through
yeah that space wallset idea looks pretty sick
Re: Is anyone making a space hulk mod?
Trap wrote:enemies that stalk hmm.. how about hidden pressure plates that spawn monsters Right behind you or Right in front of you - add that in with the blinking lights haha.HaunterV wrote:Space Hulk- personal favourite game. Agreed that we go with inspiration. never call it space hulk, call it something else.
I want that spacewallset damnit!
so call just go off of inspiration of spacehulk.
We can come up with similar names ad themes.
You need space corridors,
enemies that stalk you,
hopeless situations that need to be overcome.
we need tunnels for enemies but not players to go through
yeah that space wallset idea looks pretty sick
its not even necessarily space related, it could be like a steampunk setting. or dwarfen hold.
Grimrock Community 'FrankenDungeon 2012. Submit your entry now!: http://tinyurl.com/cnupr7h
SUBMIT YOUR ASSETS! Community Asset Pack (C.A.P.): http://tinyurl.com/bqvykrp
Behold! The HeroQuest Revival!: http://tinyurl.com/cu52ksc
SUBMIT YOUR ASSETS! Community Asset Pack (C.A.P.): http://tinyurl.com/bqvykrp
Behold! The HeroQuest Revival!: http://tinyurl.com/cu52ksc