My ideas for a game.. Will this work?

Game Editor comments and discussion.

My ideas for a game.. Will this work?

Postby KingKong » Thu Sep 03, 2009 4:45 pm

Hi there,

I have a few questions about this game editor, since I have to know these things before I start making my game. I´m new to all this so I have no idea how to use variables and such... All I know is the very basics of the game editor. Okay, so here´s my idea of how the game will be... The game is supposed to be in style with Castlevania, your character will get experience points from killing enemies, doing quests etc, and eventually level up, just as in Castlevania. There will be different events in the game, for example, entering a house, talking to the person inside the house who will give you a task to complete etc... Picking up items dropped from enemies, equipping different items on the character, really just about the same as Castlevania. The Save/Load options is a must, it has to save all your progress, experience points, items etc.

Would this be very complicated to do in this editor? I guess it requires alot of programming codes which I´m not familiar with, at all.

Any help is greatly appreciated,
Best regards,
Joel
KingKong
 
Posts: 17
Joined: Sun Aug 30, 2009 4:43 pm
Score: 1 Give a positive score

Re: My ideas for a game.. Will this work?

Postby Hblade » Thu Sep 03, 2009 5:01 pm

If you'd like to learn game Editor and C code, then visit my website :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: My ideas for a game.. Will this work?

Postby Kalladdolf » Thu Sep 03, 2009 5:13 pm

Creating a game of that kind requires less programming skills than one thinks.
Although the basic use of variables is essential, it doesn't require that much effort to get into.
Let me just fill you in on variables (because they control games, you hardly will find a game without variables).
I think you already know that a variable stores values (such as points, health, level etc).
So it will come in handy for your progress stuff.
To create a variable, enter the Game Editor Script Editor and click the "variables" panel. You can create a new variable there.
Now there are certain properties which will determine the type of variable.
First off, you have to give it a name.
Name it "health" for instance.
Then, you can decide which type of variable it should be.
An Integer represents a number (like 1;2;3;456;1,000,000;etc.) You might want to select this for your "health" variable.
A String represents letters, words or sentences. Anything, basically. (e.g. "Hello World!").
A Real also represents numbers like an Integer, but it's more specific. It also can use numbers smaller than 1. (0.5; 4.982; etc.).

Next, you can tell Game Editor whether the variable should be an "Actor" or "Global" variable.
A "Global" variable applies to all actors and can be used by all actors (so, level, daytime, setting variables may be appropriate in most cases).
An "Actor" variable exists for every actor individually. So if one actor changes its "health" variable, it won't affect the other actor.
In my next post I'll tell you how to change variables.
Right now I gotta go.
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: My ideas for a game.. Will this work?

Postby KingKong » Thu Sep 03, 2009 5:38 pm

Thank you so much, that was great information!

But variables require scripting codes, do they not?

Right now I´m trying to figure out how to make one animation collision event, so when I push space, he attacks with his sword animation then if that attack animation collides with the enemy, the enemy will be destroyed. How do I do that? I have no clue, I have to set some kind of region fillers on the sword animation perhaps? But how? Problem is that just as I get close to him, player collides with him, I just want the attack animation to be able to destroy the actor.

And if I wanted to make health on the enemy, so lets say he dies in 2 hits from the attack animation with the sword, no health bar required, how would I do that?

I really appreciate your help,
best regards,
joel
KingKong
 
Posts: 17
Joined: Sun Aug 30, 2009 4:43 pm
Score: 1 Give a positive score

Re: My ideas for a game.. Will this work?

Postby Hblade » Thu Sep 03, 2009 5:52 pm

Use this code when space is pressed
Code: Select all
attacking = 1;

Now use this code when collision with the enemy
Code: Select all
if (attacking == 1)
{
    EnemyHP = 0;
}

Of course your going to need to make the variable attacking, a global integer.
Make the EnemyHP an Actor Integer.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: My ideas for a game.. Will this work?

Postby Kalladdolf » Thu Sep 03, 2009 9:45 pm

Somehow my following post got deleted, but what I meant was that variables can be changed and controlled just like mathematical problems.
You can add, subtract, multiply, divide and do lots of different mathematical other stuff (like square root, sin, cos, tan etc.).
Hblade just showed you how to make certain actions depend on a specific value, using the most common statement, namely IF.
As to your second question, one the Create Actor event, you set the enemyHP variable to 2. (He should die from two hits, right?)
You do that by entering this into the script editor:
Code: Select all
EnemyHP = 2;

Then every time he gets hit, put:
Code: Select all
EnemyHP = EnemyHP - 1;

or
Code: Select all
EnemyHP -= 1;

Both expressions mean the same, the second one is just a little shorter.
So, the enemy's health decreases by one every time he gets hit.
Also, put the following code for the same event:
Code: Select all
if(EnemyHP <= 0)
{DestroyActor("Event Actor");

So, if the enemy's HP is less than or equals zero, it will vanish.
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: My ideas for a game.. Will this work?

Postby Hblade » Thu Sep 03, 2009 9:52 pm

Hehe.. or you can go to the enemy and put this in draw actor
Code: Select all
unsigned int EnemyHP
if (EnemyHP == 0)
{
DestroyActor("Event Actor");
}

Then when colliding with the player...
Code: Select all
if (attacking == 1)
{
EnemyHP -=  1;
}

I assume this will make a variable EnemyHP that only applies to that actor.

The unsigned int will prevent it from going below 0, for an unsigned int's max and min numbers are 0 - 65,535
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: My ideas for a game.. Will this work?

Postby KingKong » Thu Sep 03, 2009 11:25 pm

Thanks alot for all the response, but it wont work for me, I don´t know where to put the codes in, I tried going into Script, Global Code then creating the variables just as you said, but I don´t really understand this, the "attacking" is the name of the animation right? So in my case it would be "charattack" which is the name of my animation? A step by step guide would really help me out.

Also, only the sword should be able to destroy the other actor, not, in my case the long cape, or the players little feets touching the enemy, how would I do that?

Best regards,
joel
KingKong
 
Posts: 17
Joined: Sun Aug 30, 2009 4:43 pm
Score: 1 Give a positive score

Re: My ideas for a game.. Will this work?

Postby Hblade » Thu Sep 03, 2009 11:26 pm

Go back and read carefully :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: My ideas for a game.. Will this work?

Postby KingKong » Thu Sep 03, 2009 11:47 pm

I´m getting these error messages when trying to script in the editor... I select the enemy actor, which name is "enemy" and Add in Events, then I choose "Create Actor" in the list, and then Script Editor... I type the lines in from you guys, tried both, but they wont work, I get all sort of error messages, line 1, incompatible types "cannot convert const int to identifier", line 2, undeclared indentifier enemyhp, undefined type for relational operation etc. why?

this is how my code looks

EnemyHP = 2;
EnemyHP = EnemyHP - 1;
if(EnemyHP <= 0)
{DestroyActor("Event Actor");
KingKong
 
Posts: 17
Joined: Sun Aug 30, 2009 4:43 pm
Score: 1 Give a positive score

Re: My ideas for a game.. Will this work?

Postby Hblade » Thu Sep 03, 2009 11:52 pm

Ok, lets start from the top... Put this in create actor of the enemy.
unsigned int EnemyHP = 2;
Then what ever you had.
Now, when space is pressed, use this command
attacking = 1;

Now open Global Code, and type this in
int attacking;

Note: Put int attacking; in global code before you put the space bar thing... If you need a video tutorial I'll make one.
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: My ideas for a game.. Will this work?

Postby KingKong » Fri Sep 04, 2009 12:22 am

Tried everything I can think of, I don´t get error messages anymore though, but still it wont work. If you have time and feel like it, it would be really nice of you if you could make a vid tutorial as you mentioned. But I don´t want to waste your time on a stupid scripter like myself :roll:
KingKong
 
Posts: 17
Joined: Sun Aug 30, 2009 4:43 pm
Score: 1 Give a positive score

Re: My ideas for a game.. Will this work?

Postby Hblade » Fri Sep 04, 2009 1:03 am

Dude, dont call yourself a stupid scripter, no one starts off good. If you'd like to learn more, keep updated with my website eventually I'll post more info ok? :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: My ideas for a game.. Will this work?

Postby KingKong » Fri Sep 04, 2009 3:32 pm

Hi again,

I have made a .ged file with the stage, including enemy and player. I would be forever grateful if any of you perhaps could script the variables in and then upload it again so I can see what I have done wrong, the EnemyHP variable and the attacking animation one because I can´t figure this one out on my own.

Best regards,
Joel
Attachments
adv.rar
(48.42 KiB) Downloaded 84 times
KingKong
 
Posts: 17
Joined: Sun Aug 30, 2009 4:43 pm
Score: 1 Give a positive score

Re: My ideas for a game.. Will this work?

Postby Hblade » Fri Sep 04, 2009 3:38 pm

I'll do it :D
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Next

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron