how to use custom functions? example?

Game Editor comments and discussion.

how to use custom functions? example?

Postby edh » Mon Dec 31, 2007 3:09 am

Hi, I asked a question today about using custom functions in GE, but it's no longer listed under my posts and I cannot find it. Was it moderated?
User avatar
edh
 
Posts: 233
Joined: Thu Sep 13, 2007 12:17 am
Location: Maine, USA
Score: 14 Give a positive score

Re: my post is lost? deleted?

Postby makslane » Mon Dec 31, 2007 3:21 am

I'm sorry, here is your original question:

Hi everyone, I'm kind of new to game-editor. For background, I have the full version and I've been experimenting by writing a TicTacToe (noughts and crosses) game for my GP2X F-200. It's going very well, but I know I need to figure out some of GE's nuances to improve my game designs going forward. Questions about other things may come later. But for now...





The game will have three AI levels (Easy, pretty much random AI choices; Medium, AI makes good choices by has a flaw in the logic; Impossible, the AI plays a perfect game). I have the AI written in C++ already and it works the way i want it to.





So, my question is this: how do you use custom functions? I want the code to be in a file, like ai.c, and just make calls to it from the even handlers. Is this how it works?





Does anyone have an example? I couldn't find a topic in the forums that matched my searches.





Thanks for any help





-E
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: my post is lost? deleted?

Postby makslane » Mon Dec 31, 2007 3:25 am

Code: Select all
I have the AI written in C++ already and it works the way i want it to.


Game Editor only supports C, not C++ classes.

how do you use custom functions?


Put your functions in the Global code editor and call in the Script actions.

Does anyone have an example?


Look the Checkers demo:
http://game-editor.com/games/checkers.zip
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: how to use custom functions? example?

Postby edh » Mon Dec 31, 2007 4:12 am



Thanks, Makslane!
User avatar
edh
 
Posts: 233
Joined: Thu Sep 13, 2007 12:17 am
Location: Maine, USA
Score: 14 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron