Jump to content

Home

globle var ?


cooldamien

Recommended Posts

Is this script right

 

#include "k_inc_debug" 
#include "k_inc_utility"

void main()
{
   int iCheck = GetGlobalNumber("cut1");
   if (iCheck =  0) 
     {

            ActionStartConversation(GetFirstPC(),"cam", FALSE,  CONVERSATION_TYPE_CINEMATIC, TRUE );
     }
}

 

I added the variable cut1 with the 2da editor as a number but by saved game editor does not show my variable am I doing some thing wroung?

Link to comment
Share on other sites

This won't work :).

 

The "=" operator is for assigning, or defining values. You need to use "==" to check if something is equal to a value ;). You may also wish to increment the value of the global number, otherwise this can fire multiple times. Try this modified version:

 

void main() {
   int iCheck = GetGlobalNumber("cut1");
   if (iCheck ==  0)  {
            SetGlobalNumber("cut1", iCheck++);
            ActionStartConversation(GetFirstPC(), "cam");
   }
}

 

No need to include "k_inc_debug" and "k_inc_utility."

 

Edit: You may want to check out this thread.

 

As to your actual question:

 

(Curses self for not looking at the actual topic) I'm not sure how tk102 built the save game editor, but it could be that the variables are from a predefined list. Is your .2da in the override folder?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...