Use of the Do Nothing command???

Started by A�rendyll (formerly Yurina), Wed 25/01/2006 14:22:23

Previous topic - Next topic

A�rendyll (formerly Yurina)

Hi all,

I've been using AGS for quite a while, but I can't use the Do Nothing command. I wanted to use this for special occasions, but it doesn't work.
Can someone tell the use of it to me?

Thanks in advance,
Yurina
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

Ashen

My understanding is that the 'Do Nothing' command is more like a placeholder, to make interactions scan better (you can more easily tell that a condition does nothing, than if it was just blank). It doesn't AFAIK serve any purpose, or represent any script command, so I'm not sure how it could not be working.

What 'special occasions' are you using it for, and how? There might be another way.
I know what you're thinking ... Don't think that.

A�rendyll (formerly Yurina)

Well, I wanted to time some actions and I sometimes use the "if..." commands.

In case of the "if..." commands I want to have the player do absolutely nothing. Like: If you have inventory item X nothing happens when you talk to Y.

About timing, I want to have some persons walking in my game without them moving continously. It's like e.g. a soldier moving 2 seconds to the left. Stay on that spot for 4 seconds, move to the right for 2 seconds, stop again for 4 seconds, and repeat in a loop. If you ever played one of the Pokémon RPG's on the Gameboy (Colour/Advance) you know what I mean.

Can you help me out?

~Yurina
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

Ashen

Are you using Interaction Editor commands, or scripting?
For the inventory item thing, it'd be something like:

  + Conditional - If player has an inventory item(X)
      Stop running more commands
  + Whatever you want to happen if doesn't have item X

Or, in script:
Code: ags

if (player.InventoryQuantity[X] == 0) {
  //Whatever you want to happen if doesn't have item X
}


The second part, I'm sure how you'd do it with Interaction Editor commands, or even if it's possible. In scripting, you could do it using Timers, and the repeatedly_execute command. Also, it's probably be easier to specify coordinates for the character to move between, than a length of time to walk for, e.g. (untested psuedocode):

Code: ags

if (IsTimerExpired(1)) {
  if (cGuard.x == 100) cGuard.Walk(700, 150);
  else if (cGuard.x == 700) cGuard.Walk(100, 150);
  SetTimer(1, 220);
  // Where 220 is about how long it'll take the character to complete the move, plus 4 seconds
}


You'd also have to set the timer for the first time whenever you wanted Guard to start moving - e.g. 'Player enters screen (after fadein)'.
I know what you're thinking ... Don't think that.

A�rendyll (formerly Yurina)

I'll get my hands on it, thanks Ashen!

~Yurina
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

SMF spam blocked by CleanTalk