127
« on: June 07, 2012, 11:06:16 PM »
No, it's not in any loop
This is my script for button "new game":
#include "scripts\base.inc"
////////////////////////////////////////////////////////////////////////////////
on "MouseEntry"
{
load_game_h.Active = false;
new_game_h.Active = true;
}
on "LeftClick"
{
//Game.ChangeScene("scenes\intro\intro.scene");
Game.ChangeScene("scenes\loading_screen\loading_screen.scene");
}
So it changes scene to loading_screen.
This is scene_init for loading_screen.scene
#include "scripts\base.inc"
// load our main actor
Sleep(1500);
jack = Game.LoadActor("actors\jack\jack.actor");
//cyber_jack = Game.LoadActor("actors\cyber_jack\cyber_jack.actor");
//cyber_jack.Active = false;
actor = jack;
Game.MainObject = actor;
Game.InventoryObject = actor;
jack.TakeItem("cyber_deck");
//cyber_jack.TakeItem("cyber_deck2");
bar = Game.LoadWindow("interface\character_bar\char.window");
indyk = bar.GetWidget("indyk");
Game.ChangeScene("scenes\jacks_ship\jacks_ship.scene");
In jacks_ship scene_init there is no any LoadActor command. I'm loading actor only in scene_init of loading_screen.
There is also no LoadActor in base.inc
#include "scripts\const.inc"
global Scene;
global Keyboard;
global actor;
global jack;
global cyber_jack;
global real_room;
global x,y,actor_facing, attx;
global jack_from;
//loading_screen
global twirl;
//title screen
global new_game_h, new_game, load_game, load_game_h;
//jack's ship
global ship_lights, blackout, offPanel, offPanel_state, floor_hole, engine_wires;
global door_opened, door_closed, outer_light, ship_out;
//door panel
global cable_sp, switch_led_sp, l1, l2, l3, l4, l5, l6;
global sw1, sw2, sw3, sw4, sw5, sw1_0, sw2_0, sw3_0, sw4_0, sw5_0;
global led1, led2, led3, led4, led5, led6;
global switch1, switch2, switch3, switch4, switch5, cable_state, open_ship;
//outside ship
global intro;
global bar;
global indyk;
function indicator(xp)
{
attx = (308 / 100) * xp + 308;
indyk.SkipTo(attx,27);
}