GlobalInt

Started by , Sun 07/03/2004 21:23:13

Previous topic - Next topic

Rd27

It's me again

How Can I make those GlobalInt things work for hotspots?

I want that, when player do the right thing, hotspot number13 is changing so,that when player interact with it,the message is different than before. Hope you get it.

I tried to do the script. Here it is:

Dialog_request script:
----------------------------
if(value==2){  
   SetGlobalInt(1,1);  <---- this globalint is working

}

if (value==3){
  SetGlobalInt(2,1); <----- this does not work  :(
  MoveCharacterBlocking(LEPPALA,268,202,0);
  Wait(20);
  MoveCharacterBlocking(LEPPALA,225,188,0);
  FaceLocation(LEPPALA,238,222);
  DisplaySpeech(LEPPALA,"Noni lahtekaas menee sit.")

this is the script that i made for the hotspot:
---------------------------------------------------------

if(GetGlobalInt(2)==1);{ <----- line 13
 DisplaySpeech(OLLI,"Noni,nyt se on auki.Ei muuta ku menoks!!!");
 }else{
DisplaySpeech(OLLI,"Ei toi Leppala paasta meita pois,kiitti mika jatka");

I also have placed run-script in dialoq.

When I start my game,the error message is like this:

There was an error compiling your script. The error was:
In: 'Main script'
Error(line13):parse error

Thanks for helping me :)

Proskrito

remove the ' ; ' in that line : )

Rd27

Thanks :-[ :)

Can you also tell me how can I stop a non player character (is it NPC?) following me? I have tried few things, but that NPC is always following me :(

When the player enters a new room, the npc player follows, but he follows too slowly. The player character has been about 5 seconds in that new room until NPC enters there. How can I fix that.

Thanks

strazer

QuoteCan you also tell me how can I stop a non player character (is it NPC?) following me?

From the manual:
"FollowCharacter (CHARID, int chartofollow)
(...)
Pass CHARTOFOLLOW as -1 to stop the character following."

QuoteThe player character has been about 5 seconds in that new room until NPC enters there. How can I fix that.

Use the variable game.following_room_timer:
"How long to wait before following char emerges in new room, default 150. (higher is longer)."

SMF spam blocked by CleanTalk