random spawner problem & other questions
Posted: Thu Apr 25, 2013 10:59 am
Hi guys, my first post
so, i have a room in my dungeon, where you must block blobs flying from the other side of the room.
there are 3 spawners, and i would like it so that every 3 seconds one of them spawns a blob.
Here`s what i have scripted so far:
This doesnt work
Ok, to the second problem. how do you set the traits of a character?
is it something like this:
local i = party:getChampion(1)
i.setTrait1("head_hunter")
end
The third problem: how do you add more characters to a 1 champion party?
these are the only problems i have encoutered so far, `cause there is so many awesome tutorials here!
so, i have a room in my dungeon, where you must block blobs flying from the other side of the room.
there are 3 spawners, and i would like it so that every 3 seconds one of them spawns a blob.
Here`s what i have scripted so far:
SpoilerShow
function randomspawn()
local randomnum = math.randomNumber(3)
if randomnum = 2 then
spawner_2:activate
else
if randomnum = 3 then
spawner_3:activate
else
if randomnum = 1 then
spawner_1:activate
end
end
end
local randomnum = math.randomNumber(3)
if randomnum = 2 then
spawner_2:activate
else
if randomnum = 3 then
spawner_3:activate
else
if randomnum = 1 then
spawner_1:activate
end
end
end
Ok, to the second problem. how do you set the traits of a character?
is it something like this:
local i = party:getChampion(1)
i.setTrait1("head_hunter")
end
The third problem: how do you add more characters to a 1 champion party?
these are the only problems i have encoutered so far, `cause there is so many awesome tutorials here!