Author Topic: Need help making a game  (Read 10663 times)

0 Members and 1 Guest are viewing this topic.

Kon-Tiki

  • Guest
Re:Need help making a game
« Reply #15 on: July 30, 2004, 01:49:43 PM »
I don't know this by heart, but'll check up on the code that sets the speed. It should be around in logic 0.
Found it.
Quote
if ((controller(menu_fastestspeed) ||
     said("fastest") ||
     said("fastest", "speed"))) {
  cycle_delay = 0;    // no delay between interpreter cycles
}

if ((controller(menu_fastspeed) ||
     said("fast") ||
     said("fast", "speed"))) {
  cycle_delay = 1;    // 1/20th of a second delay between interpreter cycles
}

if ((controller(menu_normalspeed) ||
     said("normal") ||
     said("normal", "speed"))) {
  cycle_delay = 2;    // 2/20ths of a second delay between interpreter cycles
}

if ((controller(menu_slowspeed) ||
     said("slow") ||
     said("slow", "speed"))) {
  cycle_delay = 4;    // 4/20ths of a second delay between interpreter cycles
}
I think this explains, and shows that you're using the right code. Dunno what exactly's wrong with your code, so time to see what the help-file says on cycle_delay.
Quote
Var   Define name in template game     Description
10   cycle_delay                             Delay between interpreter cycles (*1/20 second)
This's also useful to check out and try:
Quote
cycle.time

Category

Object/view commands

Syntax

cycle.time(oA,vB);

Description

The delay (in interpreter cycles) between cel changes of object oA (when it is cycling) is set to vB. If vB is equal to 0, the cels do not change (even when the object is cycling). Note that an object?s cycle time is separate to it?s step time.

See also

step.time
Cycling objects
I hope this helps :)

Offline morrowind

Re:Need help making a game
« Reply #16 on: August 04, 2004, 01:41:20 PM »
Hey thanks for digging all that info out for me but unfortunately I've already read it all  :P

I'm using cycle delay which works fine but it slows down the speed of the interpreter as well as the animation & I'm wondering if that is a bad thing?

Theonly other way I can get the animation to go slower is to create duplicate cells so it appears to run slower without having to change the interpreter speed, but theres a limit to how many cells you can use in a loop  :-\

Another thing I'm aware of is this step time command, I've been told to use that but have no idea how to  :'(

Can you help with this? Thanks again for getting back to me

Kon-Tiki

  • Guest
Re:Need help making a game
« Reply #17 on: August 04, 2004, 05:25:17 PM »
Dunno if you've read this already or not, but here it goes anyways :P
Quote
step.time

Category

Object/view commands

Syntax

step.time(oA,vB);

Description

The delay (in interpreter cycles) between steps (movements) of object oA is set to vB. For example, if the step time is set to 2, the object will only move every second cycle. Note that an object?s step time is independent from it?s cycle time.

See also

step.size
cycle.time
Moving objects

I can't think of anything that could be wrong if this doesn't work, unless I'd check the full game's code. We'll keep that as a last resource, if everything else fails.

Offline morrowind

Re:Need help making a game
« Reply #18 on: August 06, 2004, 02:25:14 AM »
Hi yes i've read all about step time but i dont know how to use it, what do you do when you need an animation to run slower?

Kon-Tiki

  • Guest
Re:Need help making a game
« Reply #19 on: August 07, 2004, 10:32:30 AM »
For all I know, you put it in the block of code that triggers it.

if(said("slow down!")) {
  print("Okies");
  v80 = 3;
  step.time(o0, v80);
}

Like this.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.034 seconds with 22 queries.