Global Code Created Variables.

Game Editor comments and discussion.

Global Code Created Variables.

Postby DilloDude » Fri Jul 21, 2006 8:20 am

I have two questions about variables defined in Global Code:
  1. Can I make them into actor variables by extending the actor struct? if so how, and
  2. Can I add them to a save group, and how.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Re: Global Code Created Variables.

Postby makslane » Fri Jul 21, 2006 12:46 pm

Can I make them into actor variables by extending the actor struct?


The only way to extend the actor struct is adding an 'Actor variable' in the 'Add New Variable' panel.

Can I add them to a save group, and how.


You can use save groups only with global variables defiend in the 'Add New Variable' panel.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby DilloDude » Fri Jul 21, 2006 1:52 pm

That's what I thought.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby DilloDude » Fri Jul 21, 2006 11:53 pm

What would be good would be to be able to create more variable types from the variables panel, and I am thinking of structs in particular. In an rpg type of game, I might have a struct called item, which contains information about a specific item. I could have a use item function that reads the struct and decides what the item does and does it. I might want an array of items called 'inventory', which would store all the items the player has collected. But I would want to be able to save this variable when I save the game. There are also other cases wherse structs could become useful, but you would need them to have the ability to be saved, and possibly be actor variables.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby DilloDude » Sat Jul 22, 2006 12:40 am

Another thing that would be useful, although not necesary as you can just use ints, would be to allow variables of bool type.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron