- back to tutorials

Creating Time Travel Bonus (by Matan)

This is a quick guide about creating the time travel bonus. When you create a time travel, you usually have no timebonus shown in the bottom right area where it shows the editorial things about time travels. So create your time travel (or two) and name it in a certain tag, eg: tt1 or timetravel1, so when you refer to the code, you'll know which time travels you want to have the time bonus on.

After saving the mission and having a certain name to your time travel, go to the mission .mis file and search for it. Here's the code:

   };
   new Item(timetravel1) {
      position = "-32.9099 16.7081 -22.1314";
      rotation = "1 0 0 0";
      scale = "1 1 1";
      dataBlock = "TimeTravelItem";
      collideable = "0";
      static = "1";
      rotate = "1";

This is a plain time travel. Add this line after the rotate line:

         timeBonus = "5000";

Now the code shows this.

   };
   new Item(timetravel1) {
      position = "-32.9099 16.7081 -22.1314";
      rotation = "1 0 0 0";
      scale = "1 1 1";
      dataBlock = "TimeTravelItem";
      collideable = "0";
      static = "1";
      rotate = "1";
         timeBonus = "5000";

Now change timeBonus = "5000"; to anything you want (example: 37000) and this will be, in seconds, the time travel bonus.

Note that each 1000 is equivalent to 1 second. That means that 37000 is 37 seconds, 120000 is 2 minutes (in game it shows 120 seconds). 2713 is 2.713 seconds while 13 is 0.013 of a second and 1 is 0.001 of a second!

Coding Trivia: For how long does this time travel bonus go for?

   };
   new Item(timetravel1) {
      position = "-32.9099 16.7081 -22.1314";
      rotation = "1 0 0 0";
      scale = "1 1 1";
      dataBlock = "TimeTravelItem";
      collideable = "0";
      static = "1";
      rotate = "1";
         timeBonus = "834965";

Enjoy making your time travel bonuses.

Hosted by www.Geocities.ws

1