SetImageMap on Scheduled levelLoad...possible?
by Indie Tool Shed · in Torque Game Builder · 06/28/2007 (10:47 am) · 3 replies
Here's a summary of my issue:
I have a generic level which works fine. I then have a theme select page. When you click on a button to select a theme, I use the loadlevel command, and then use setImageMap on various objects in the level to change the background on the fly. This saves me from creating multiple identical levels, just with different backgrounds, music, etc.
My dilemna is arising when I need to load a level via the schedule function (such as with a collision callback). The level loads fine, but I cannot use the setImageMap function to dynamically set images as it seems the objects do not yet exist.
I've tried also scheduling the setImageMap function with no success.
So basically, when I need load a level like this:
sceneWindow2d.schedule(0, loadlevel, "game/data/levels/" @ %this.level_name);
I can not get the below to work (level_bg is the name of the background image in the level):
level_bg.setImageMap($level_bg1)
Is there any way to dynamically set image maps on a level when loading via the schedule command?
Thanks in advance.
I have a generic level which works fine. I then have a theme select page. When you click on a button to select a theme, I use the loadlevel command, and then use setImageMap on various objects in the level to change the background on the fly. This saves me from creating multiple identical levels, just with different backgrounds, music, etc.
My dilemna is arising when I need to load a level via the schedule function (such as with a collision callback). The level loads fine, but I cannot use the setImageMap function to dynamically set images as it seems the objects do not yet exist.
I've tried also scheduling the setImageMap function with no success.
So basically, when I need load a level like this:
sceneWindow2d.schedule(0, loadlevel, "game/data/levels/" @ %this.level_name);
I can not get the below to work (level_bg is the name of the background image in the level):
level_bg.setImageMap($level_bg1)
Is there any way to dynamically set image maps on a level when loading via the schedule command?
Thanks in advance.
Torque Owner Melissa Niiya