=Problem with the Move character code

Started by burakaxx, Mon 15/11/2004 16:00:35

Previous topic - Next topic

burakaxx

 
in my game, when control on the main char(EGO) some other char(TAM) must go to some specific point(x =100 ,y=185) without blocking and when he arrives he must say something  meanwhile controls have open in main character.i cant use move blocking code of course but in the move other codes, (TAM) first make speech and doesn't move there   i tried  if (character[TAM].x=100) or getcharacterat commands to control specific point i also tried  some varieble for same location but no......   pls help
   here is the copy of script

SetCharacterView(3,23);
MoveCharacterDirect(3,100,185);
if ((character[TAM].x==100)&&(character[TAM].y==185)) {
DisplaySpeech(3,  "string...");
MoveCharacterToHotspot(3,4);
}

Radiant

What you should do is, either use
Code: ags

while (character[TAM].walking) Wait (1);


Or, check the values in your repeatedly_execute function


burakaxx

 i solved the problem codes was correct  but like this i learned it new

MoveCharacterDirect(3,100,185);
   if ((character[TAM].x==100)&&(character[TAM].y==185)) {
     DisplaySpeech(3, "  ");
     MoveCharacterToHotspot(3,4);
   }

Ishmael

I didn't quite get have you solved the problem or not..?

Anyway, in case you haven't, use the room repeadetly_execute function and enter this:

  if ((character[TAM].x==100)&&(character[TAM].y==185)) {
     DisplaySpeech(3, "  ");
     MoveCharacterToHotspot(3,4);
  }

in there. You just gotta make sure the character doesn't walk to this point at any other time.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

SMF spam blocked by CleanTalk