Page 1 of 1

Spawning Issue(Resolved!)

Posted: Wed Nov 12, 2014 5:01 am
by Echoplex
Good Evening Folks. So I haven't dealt with spawning yet but following Skuggs video tutorial it sounded pretty easy. Well copying the script for the magma trap I am trying to do the same thing. Spawn magma everywhere! Well everything else is working fine except the spawning of lava when the encounter ends. Where am I going wrong? I am included a screenshot of the editor for reference. I appreciate your time, thank you.

http://imgur.com/YuTCoVl

Code: Select all

function startmagmacontdown()
    magma_countdown.bossfight:addMonster(magma_golem_1.monster)
    magma_countdown.bossfight:activate()
    timer_22.timer:start()
	end

    timecount = 1

function shakeitbaby()
    party.party:shakeCamera(0.07,23)
	end

function hurtgolem()

	if timecount == 1 then

    elseif timecount == 2 then

    elseif timecount == 3 then
    magma_golem_1.monster:setHealth(950)
          
    elseif timecount == 4 then
    magma_golem_1.monster:setHealth(900)
          
    elseif timecount == 5 then
    magma_golem_1.monster:setHealth(850)

    elseif timecount == 6 then
    magma_golem_1.monster:setHealth(800)
       
    elseif timecount == 7 then
    magma_golem_1.monster:setHealth(750)
     
    elseif timecount == 8 then
    magma_golem_1.monster:setHealth(700)
       
    elseif timecount == 9 then
    magma_golem_1.monster:setHealth(650)
       
    elseif timecount == 10 then
    magma_golem_1.monster:setHealth(600)
       
    elseif timecount == 11 then
    magma_golem_1.monster:setHealth(550)
       
    elseif timecount == 12 then
    magma_golem_1.monster:setHealth(500)
       
    elseif timecount == 13 then
    magma_golem_1.monster:setHealth(450)
       
    elseif timecount == 14 then
    magma_golem_1.monster:setHealth(400)
       
    elseif timecount == 15 then
    magma_golem_1.monster:setHealth(350)
       
    elseif timecount == 16 then
    magma_golem_1.monster:setHealth(300)
       
    elseif timecount == 17 then
    magma_golem_1.monster:setHealth(250)
       
    elseif timecount == 18 then
    magma_golem_1.monster:setHealth(200)
       
    elseif timecount == 19 then
    magma_golem_1.monster:setHealth(150)
       
    elseif timecount == 20 then
    magma_golem_1.monster:setHealth(100)
       
    elseif timecount == 21 then
    magma_golem_1.monster:setHealth(50)
          
    elseif timecount == 22 then
    magma_golem_1.monster:setHealth(0)
       
    elseif timecount == 23 then
    magma_golem_1.monster:die();
    die = true;
    timer_22.timer:stop()
  
	spawn("flame_wave", 1, 11, 16, 1, 0)
    spawn("flame_wave", 1, 11, 28, 1, 0)
    spawn("flame_wave", 1, 12, 15, 1, 0)
    spawn("flame_wave", 1, 12, 17, 1, 0)
    spawn("flame_wave", 1, 12, 19, 1, 0)
    spawn("flame_wave", 1, 14, 16, 1, 0)
    spawn("flame_wave", 1, 14, 18, 1, 0)
    spawn("flame_wave", 1, 15, 15, 1, 0)
    spawn("flame_wave", 1, 15, 17, 1, 0)
    spawn("flame_wave", 1, 15, 19, 1, 0)
    spawn("flame_wave", 1, 16, 16, 1, 0)
    spawn("flame_wave", 1, 16, 18, 1, 0)
    spawn("flame_wave", 1, 17, 17, 1, 0)
       
       
    timecount = 1
    return
   	end
    timecount = timecount + 1
end

Re: Spawning Issue

Posted: Wed Nov 12, 2014 5:22 am
by jxjxjf
I can't tell by the picture where exactly you're trying to spawn the flame_waves, but if you're trying to spawn them to the level you're looking at in the screenshot, your level index is off. From the scripting reference, spawn takes these parameters:

spawn(object, level, x, y, facing, elevation, [id])

where the level index corresponds to the order the levels appear in the browser to the left. So if you try to spawn to the level you're looking at in the screenshot, your level index should be 3. :)

It looks like you also need to change your x & y values, but I'm just guessing. :lol:

Note also that [id] is an optional parameter you don't need to worry about for what you're doing.

Re: Spawning Issue

Posted: Wed Nov 12, 2014 5:40 am
by Echoplex
where the level index corresponds to the order the levels appear in the browser to the left.
Okay there was the disconnect! I didn't realize the level was based on the order in the list and it didnt take in account the x,y,z of the levels. Thank you!