The Dink Network

Reply to Re: Script question

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
November 19th 2002, 06:01 PM
girl.gif
joshriot
Peasant They/Them United States
keep it real 
: : Does someone can do something like this?:

: : void main (void)

: : {

: :   int &var;

: :   int &wiz;

: :   &var = 0;

: :   if (&var == 0)

: :   {

: :     //cutscene

: :     &var = 1;

: :   }

: : }

: : I just don't wanna waste the 200 global limit with so short cutscenes...

: I'm not sure I understand. Why would you set a variable to 0 and then test if it's 0 right afterwards?

: If all you want to do is run the cutscene every time, you don't need a variable or test at all.

i think he wants &var to be global so that the cutscene runs and then &var is 1 and doesnt run anymore. the problem my fine fellow is that int &var creates a local variable, these dont have a 200 limit, but they can only be used inside of this script when it is called. when the script dies, so does the var. you need to make the &var in main.c, and yeah i guess you do have to waste one, that is why people do if &story == 1, if &story > 2, and so on. you can make the cutscene play only if &story < 1 and then use &story for other special things in the future. if you are confused about global and local variables or anything else i just said... or something... ask more and i or someone else will be more specific. cheers.