Completed move of all tutorial messages to scripts
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
void added_script()
|
||||
{
|
||||
displayMessage(getKeyBinding(PA::FIRE) + getKeyBinding(PA::ACCEL) + "This trigger was added by another script");
|
||||
/*displayMessage(getKeyBinding(PA::FIRE) + getKeyBinding(PA::ACCEL) + "This trigger was added by another script");
|
||||
jumpKartTo( 0, 67.90, 99.49 );
|
||||
Vec3 a;
|
||||
Vec3 b;
|
||||
b=a;
|
||||
Vec3 c = Vec3();
|
||||
Vec3 d = Vec3(2,3,4);
|
||||
printVec3(d);
|
||||
printVec3(d); */
|
||||
}
|
||||
|
||||
|
||||
@@ -22,11 +22,48 @@ void tutorial_bananas()
|
||||
|
||||
}
|
||||
|
||||
void tutorial_drive(){
|
||||
|
||||
displayMessage("Accelerate with <" +
|
||||
getKeyBinding(PA::ACCEL) +
|
||||
"> and steer with <" +
|
||||
getKeyBinding(PA::STEER_LEFT) +
|
||||
"> and <" +
|
||||
getKeyBinding(PA::STEER_RIGHT) + ">");
|
||||
}
|
||||
|
||||
void tutorial_giftboxes(){
|
||||
|
||||
displayMessage("Collect gift boxes, and fire the weapon with <" + getKeyBinding(PA::FIRE) + "> to blow away these boxes");
|
||||
}
|
||||
|
||||
void tutorial_backgiftboxes()
|
||||
{
|
||||
displayMessage("Press <" + getKeyBinding(PA::LOOK_BACK) + "> to look behind. Fire the weapon with <" + getKeyBinding(PA::FIRE) + "> while pressing <" + getKeyBinding(PA::LOOK_BACK) + "> to fire behind!");
|
||||
}
|
||||
|
||||
void tutorial_nitro_use()
|
||||
{
|
||||
displayMessage("Use the nitro you collected by pressing <" + getKeyBinding(PA::NITRO) + ">!");
|
||||
}
|
||||
|
||||
void tutorial_nitro_collect()
|
||||
{
|
||||
displayMessage("Collect nitro bottles (we will use them after the curve)");
|
||||
}
|
||||
|
||||
void tutorial_rescue()
|
||||
{
|
||||
displayMessage("Oops! When you're in trouble, press <" + getKeyBinding(PA::RESCUE) + "> to be rescued");
|
||||
|
||||
}
|
||||
|
||||
void tutorial_skidding()
|
||||
{
|
||||
displayMessage("Accelerate and press the <" + getKeyBinding(PA::DRIFT) + "> key while turning to skid. Skidding for a short while can help you turn faster to take sharp turns");
|
||||
|
||||
}
|
||||
|
||||
void tutorial_skidding2()
|
||||
{
|
||||
displayMessage("Note that if you manage to skid for several seconds, you will receive a bonus speedup as a reward!");
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace Scripting
|
||||
/*
|
||||
//Test singleton, and various calling conventions
|
||||
// Register the track object manager as a singleton. The script will access it through the global property
|
||||
// r = engine->RegisterObjectType("TrackObjectManager", 0, asOBJ_REF | asOBJ_NOHANDLE); assert(r >= 0);
|
||||
//r = engine->RegisterObjectType("TrackObjectManager", 0, asOBJ_REF | asOBJ_NOHANDLE); assert(r >= 0);
|
||||
r = engine->RegisterObjectType("TrackObjectManager", 0, asOBJ_REF | asOBJ_NOCOUNT); assert(r >= 0);
|
||||
|
||||
// Register the track object manager's methods
|
||||
|
||||
@@ -818,76 +818,6 @@ void TrackObjectPresentationActionTrigger::onTriggerItemApproached(Item* who)
|
||||
new TutorialMessageDialog(_("Complete all challenges to unlock the big door!"), true);
|
||||
}
|
||||
}
|
||||
else if (m_action == "tutorial_drive")
|
||||
{
|
||||
//if (World::getWorld()->getPhase() == World::RACE_PHASE)
|
||||
{
|
||||
m_action_active = false;
|
||||
//World::getWorld()->getRaceGUI()->clearAllMessages();
|
||||
|
||||
InputDevice* device = input_manager->getDeviceList()->getLatestUsedDevice();
|
||||
DeviceConfig* config = device->getConfiguration();
|
||||
irr::core::stringw accel = config->getBindingAsString(PA_ACCEL);
|
||||
irr::core::stringw left = config->getBindingAsString(PA_STEER_LEFT);
|
||||
irr::core::stringw right = config->getBindingAsString(PA_STEER_RIGHT);
|
||||
|
||||
new TutorialMessageDialog(_("Accelerate with <%s> and steer with <%s> and <%s>", accel, left, right),
|
||||
false);
|
||||
}
|
||||
}
|
||||
else if (m_action == "tutorial_giftboxes")
|
||||
{
|
||||
m_action_active = false;
|
||||
InputDevice* device = input_manager->getDeviceList()->getLatestUsedDevice();
|
||||
DeviceConfig* config = device->getConfiguration();
|
||||
irr::core::stringw fire = config->getBindingAsString(PA_FIRE);
|
||||
|
||||
new TutorialMessageDialog(_("Collect gift boxes, and fire the weapon with <%s> to blow away these boxes!", fire),
|
||||
true);
|
||||
}
|
||||
else if (m_action == "tutorial_backgiftboxes")
|
||||
{
|
||||
m_action_active = false;
|
||||
InputDevice* device = input_manager->getDeviceList()->getLatestUsedDevice();
|
||||
DeviceConfig* config = device->getConfiguration();
|
||||
irr::core::stringw fire = config->getBindingAsString(PA_FIRE);
|
||||
|
||||
new TutorialMessageDialog(_("Press <B> to look behind, to fire the weapon with <%s> while pressing <B> to to fire behind!", fire),
|
||||
true);
|
||||
}
|
||||
else if (m_action == "tutorial_nitro_use")
|
||||
{
|
||||
m_action_active = false;
|
||||
InputDevice* device = input_manager->getDeviceList()->getLatestUsedDevice();
|
||||
DeviceConfig* config = device->getConfiguration();
|
||||
irr::core::stringw nitro = config->getBindingAsString(PA_NITRO);
|
||||
|
||||
new TutorialMessageDialog(_("Use the nitro you collected by pressing <%s>!", nitro),
|
||||
true);
|
||||
}
|
||||
else if (m_action == "tutorial_rescue")
|
||||
{
|
||||
m_action_active = false;
|
||||
InputDevice* device = input_manager->getDeviceList()->getLatestUsedDevice();
|
||||
DeviceConfig* config = device->getConfiguration();
|
||||
irr::core::stringw rescue = config->getBindingAsString(PA_RESCUE);
|
||||
|
||||
new TutorialMessageDialog(_("Oops! When you're in trouble, press <%s> to be rescued", rescue),
|
||||
false);
|
||||
}
|
||||
else if (m_action == "tutorial_skidding")
|
||||
{
|
||||
m_action_active = false;
|
||||
//World::getWorld()->getRaceGUI()->clearAllMessages();
|
||||
|
||||
InputDevice* device = input_manager->getDeviceList()->getLatestUsedDevice();
|
||||
DeviceConfig* config = device->getConfiguration();
|
||||
irr::core::stringw skid = config->getBindingAsString(PA_DRIFT);
|
||||
|
||||
|
||||
new TutorialMessageDialog(_("Accelerate and press the <%s> key while turning to skid. Skidding for a short while can help you turn faster to take sharp turns.", skid),
|
||||
true);
|
||||
}
|
||||
else if (m_action == "tutorial_exit")
|
||||
{
|
||||
World::getWorld()->scheduleExitRace();
|
||||
|
||||
Reference in New Issue
Block a user