Crystal Space
Welcome,
Guest
. Please
login
or
register
.
May 24, 2013, 07:51:41 pm
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
9224
Posts in
2230
Topics by
5389
Members
Latest Member:
Sandradhernandez
Crystal Space
Associate Projects
CEL Discussion
Where are the changes of 1.9?
« previous
next »
Pages:
[
1
]
Author
Topic: Where are the changes of 1.9? (Read 2736 times)
zamme
Newbie
Posts: 16
Where are the changes of 1.9?
«
on:
May 08, 2009, 08:07:54 pm »
Hi all!
I'm using cel 1.9 and I can't find a method to obtain the name of the entity trough the entity behaviour.
Where is the GetEntity function of iCelBehaviour? Can I do it by other way?
Thanks.
Logged
jorrit
Administrator
Hero Member
Posts: 1703
Re: Where are the changes of 1.9?
«
Reply #1 on:
May 09, 2009, 08:10:24 am »
Quote from: zamme on May 08, 2009, 08:07:54 pm
Hi all!
I'm using cel 1.9 and I can't find a method to obtain the name of the entity trough the entity behaviour.
Where is the GetEntity function of iCelBehaviour? Can I do it by other way?
Thanks.
There is no GetEntity() since it is normally not needed. Can you tell me exactly what kind of behaviours you are using?
Greetings,
Logged
zamme
Newbie
Posts: 16
Re: Where are the changes of 1.9?
«
Reply #2 on:
May 09, 2009, 12:39:51 pm »
Hi jorrit.
I'm making a menu with billboards. I made a behaviour class for all the billboards of the menu.
I want that by pcbillboard_select(mouse) can get the name of the billboard I selected to define the actions to do after. Now I can get the name of the behaviour that I clicked but not the name of the entity of this behaviour. Can I solve it with a billboardmanager?
For example:
BehaviourMenu::BehaviourMenu( iCelEntity* entity, BehaviourLayer* bl, iCelPlLayer* pl) : BehaviourCommon (entity, bl, pl)
{
id_pcbillboard_select = pl->FetchStringID ("pcbillboard_select");
}
bool BehaviourMenu::SendMessage (csStringID msg_id, iCelPropertyClass* pc, celData& ret, iCelParameterBlock* params, va_list arg) {
if (msg_id == id_pcbillboard_select) {
// Where I want to know what billboard clicked
printf("billboard clicked");
return true;
} else
return BehaviourCommon::SendMessage (msg_id, pc, ret, params, arg);
return true;
}
Thanks.
Logged
zamme
Newbie
Posts: 16
Re: Where are the changes of 1.9?
«
Reply #3 on:
May 09, 2009, 01:20:39 pm »
I solved it.
I assigned the entity name to a csString getting it from the behaviour constructor.
BehaviourMenu::BehaviourMenu( iCelEntity* entity, BehaviourLayer* bl, iCelPlLayer* pl) : BehaviourCommon (entity, bl, pl)
{
id_pcbillboard_select = pl->FetchStringID ("pcbillboard_select");
this->entity_clicked = this->entity->GetName();
}
bool BehaviourMenu::SendMessage (csStringID msg_id, iCelPropertyClass* pc, celData& ret, iCelParameterBlock* params, va_list arg) {
if (msg_id == id_pcbillboard_select) {
printf("billboard clicked: ");
printf(this->entity_clicked);
return true;
} else
return BehaviourCommon::SendMessage (msg_id, pc, ret, params, arg);
return true;
}
See you.
P.D.: Are you thinking about updating the CS/CEL tutorials? There are a lot of problems with. Walktut, waterdemo, etc are outdated. If you need help with I'm documenting all the problems that I find learning CS/CEL, from compiling it in linux(within and without IDE) to develope an application with.
Logged
Vincent
Full Member
Posts: 191
Re: Where are the changes of 1.9?
«
Reply #4 on:
May 14, 2009, 10:16:53 pm »
Quote from: zamme on May 09, 2009, 01:20:39 pm
P.D.: Are you thinking about updating the CS/CEL tutorials?
Yes, but that probably won't be done until after 1.4 is released
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Crystal Space Development
-----------------------------
=> General Crystal Space Discussion
=> Support
-----------------------------
Crystal Space Project Development
-----------------------------
=> Feature Requests
=> Plugins
=> Bug Reports
-----------------------------
Crystal Space Development
-----------------------------
=> Game Content Creation
-----------------------------
Miscellaneous
-----------------------------
=> Article/Tutorial Requests
=> Article/Tutorial Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Development Discussion
-----------------------------
Crystal Space Projects
-----------------------------
=> Project Discussion
=> WIP Projects
=> Finished Projects
-----------------------------
Associate Projects
-----------------------------
=> CEL Discussion
=> Crystal Core Discussion
=> CrystalBlend Discussion
-----------------------------
Crystal Space Project Development
-----------------------------
=> Google Summer of Code
-----------------------------
Associate Projects
-----------------------------
=> Apricot (Open Game)
=> Ares Project
Loading...