Global Code

Non-platform specific questions.

Global Code

Postby BlarghNRawr » Sat Jun 28, 2008 3:19 am

can sum1 tel me wat da global code does?
Download Game Music
current projects:
Bold! ?% Started mechanics
Unnamed puzzle game 60% --i need a name!--
User avatar
BlarghNRawr
 
Posts: 767
Joined: Wed Jun 25, 2008 12:36 am
Location: Not using G-E anymore. Now using Source SDK.
Score: 27 Give a positive score

Re: Global Code

Postby stevenp » Sat Jun 28, 2008 1:36 pm

it is basicaly an actor that is always there and active
User avatar
stevenp
 
Posts: 403
Joined: Sat Dec 22, 2007 12:49 pm
Location: canada, ontario
Score: 16 Give a positive score

Re: Global Code

Postby asmodeus » Sat Jun 28, 2008 2:26 pm

You could use it for global variables or functions:
Code: Select all
int GlobalVar;  // this is a global variable that can be read by each Actor
void ChangeText()
{
    strcpy(text, "Hello, World!");
}

when an Actor use the function ChangeText() now, its text will change to "Hello, World!".
User avatar
asmodeus
 
Posts: 483
Joined: Thu Oct 11, 2007 5:04 pm
Location: Germany
Score: 43 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron