red_evilspirit
Member
|
I need some advice :D !
Hi !
I don't know where to put a conversation between 2 characters
I put it in code like this:
Code:
struct MenuNew //a dialog to display text
{
Window window;
Text text;
Button close;
static void Close(MenuNew &menu_new) {menu_new.window.fadeOut();}
void create()
{
Gui +=window.create(Rect_C(0, 0, 0.9f, 0.5f)).barVisible(false).hide();
window+=text .create(Vec2 (window.crect.w()/2, -0.15f), "Welcome to my world");
window+=close .create(Rect_C(window.crect.w()/2, -window.crect.h()/2-0.1f, 0.4f, 0.08f), "Close").func(Close, T);
}
}MN;
Bool Chr::update()
{
if(super::update())
{
if(Kb.bp(KB_X) && !IsTalking) //press X to talk
{
if(Dist(Players[0].pos(), Chrs[0].pos())<1.0f)
{
MN.window.fadeIn();
IsTalking=true;
Players[0].disable();
return true;
}
}
if(Kb.bp(KB_X) && IsTalking)
{
MN.window.fadeOut();
IsTalking=false;
Players[0].enable();
return true;
}
return true;
}
return false;
}
|
|
11-15-2011 11:15 AM |
|
Snajpa
Member
|
RE: I need some advice :D !
Quote:I don't know where to put a conversation between 2 characters
It is a joke? o.O
If you cant do things like that dont make a game
|
|
11-15-2011 02:48 PM |
|
red_evilspirit
Member
|
RE: I need some advice :D !
Sorry about my stupid question but This is the first time i use engine and make a game
I only know about c++ language, i don't have any experience about game development
Anyway, this topic is for beginner, i can't ask something like that ????
-----
I know how to display like the picture. But if i have 100 characters, i can't make 100 windows+text like the code above -.-
|
|
11-15-2011 03:37 PM |
|
rndbit
Member
|
RE: I need some advice :D !
that is not an excuse.
|
|
11-15-2011 04:01 PM |
|
dragonfly3
Member
|
RE: I need some advice :D !
If you purchase a license you can get code samples showing a functioning multiplayer chat window in the MMO demo. You can also get code samples for the RPG demo, and Bloody Massacre demo. I highly recommend at least purchasing the personal license (price is excellent compared to other engines) and then downloading all of the demos & source code for them. They will be very helpful to you in learning the engine and how it utilizes C++. If you already know C++ you won't have much of a problem learning the engine after seeing the demo codes.
|
|
11-16-2011 05:40 AM |
|
red_evilspirit
Member
|
RE: I need some advice :D !
I'm a student, i don't have much money
A game Engine is not popular in my country so it's hard to find somebody know about engine
|
|
11-16-2011 01:09 PM |
|
rndbit
Member
|
RE: I need some advice :D !
excuses excuses.. sounds like you are screwed buddy.. :( btw u using code editor from esenthel, no? :]
anyhow hope you do good in learning this stuff, its cool, but requires dedication. just for sake of us all please dont ask obvious (and i mean really obvious) stuff. we are more than happy to help when fellow man runs into trouble but we simply are not band of school teachers eager for more students. i hope you get my point.. good luck!
|
|
11-16-2011 04:27 PM |
|