Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - marcomix

#1
Global variables are Static, but I would like it to be Dynamic. How can I?

I have in GlobalScript a variable:
int count=3;

I have in Room1 this function:
function hHotspot1_AnyClick(){
    count++;
    Display("conta %d", count);
    player.ChangeRoom(secondroom);
}

I have in Room2 this function:
function hHotspot1_AnyClick(){
    count++;
    Display("conta %d", count);
    player.ChangeRoom(firstroom);
}

So, in first room:
'count' is 4.

In second room:
'count' is 4

But I would like it to be:
in first room 'count' is 4 and then in second room 'count' is 5. How can I?
SMF spam blocked by CleanTalk