Crystal Space
Welcome, Guest. Please login or register.
November 22, 2017, 12:14:52 pm

Login with username, password and session length
Search:     Advanced search
9081 Posts in 2051 Topics by 80600 Members
Latest Member: Buchelis
* Home Help Search Login Register
  Show Posts
Pages: [1]
1  Associate Projects / CEL Discussion / Troubles with billboard on: December 12, 2010, 08:29:46 am
Hello, I have a problem and need your advice. I can`t make billboard clickable. Actually, it don`t react to any my activities. I`m new in this subject, CELL and CS I mean, help me please.
 Here my billboard:
        _g3d->BeginDraw (CSDRAW_2DGRAPHICS);
//adding billboard factory
        if (!_pl->LoadPropertyClassFactory ("cel.pcfactory.2d.billboard"))
                printf("Error loading pcbillboard factory!");
//loading textures
        iTextureWrapper* txt2 = _engine->CreateTexture("start", "gameData/start.png", 0, CS_TEXTURE_2D);
        txt2->Register (_g3d->GetTextureManager ());
        _engine->CreateMaterial ("start", txt2);
//Creating entity
        menu_entity1 = _pl->CreateEntity ("menu_start", _bl, "menu_behave",
//creating pcBillboard (each pcBillboard controls one billboard)
        csRef<iPcBillboard> start_g = celQueryPropertyClassEntity <iPcBillboard> (menu_entity1);
//enable events processing
                printf("pcBillbord events are disabled!");
//billboard creating + some parametres for it
        iBillboard* b1 = start_g->GetBillboard();
        b1->SetSize(73143, 75143);
//billboard contol flags switching on
        csFlags& f1 = b1->GetFlags();
        f1.Set(CEL_BILLBOARD_CLICKABLE, true);
//behaviour for billboard events
BehaviourMenu::BehaviourMenu( iCelEntity* entity, BehaviourLayer* bl, iCelPlLayer* pl)
                                  : CommonBehaviour (entity, bl, pl) {
//catching message
        id_pcbillboard_select = pl->FetchStringID ("");//*/("pcbillboard_select");
//using [u]pcbillboard_select[/u] instead of [u][/u] changes nothing
bool BehaviourMenu::ReceiveMessage( csStringID msg_id, iMessageSender* sender, celData& ret,
                                    iCelParameterBlock* params ) {
//getting entity name to compare
                const char *entityName = _entity->GetName();
//static pointer to call RunFirstlevel
                GameApplication *p = GameApplication::getApp();               
                if( !strcmp( entityName, "menu_start")) {
                        printf("***Start clicked***");
                } else if ( !strcmp( entityName, "menu_exit")) {
                } else if( !strcmp( entityName, "options")) {
                        printf("***Options clicked***");
        return true;

2  Associate Projects / CrystalBlend Discussion / Blender2Crystal problem with quests on: November 09, 2010, 10:22:23 am
Hi everyone! Need your help urgently!
I want to bind the quest to one of the entities in the world. I created it in the quest manager, he has two status. In the first status is set MeshSelectTrigger and add it to the second award newstate status. Exporting. It creates an xml addon in it all as in the manual. But when I run your world application it gives error

cel.questmanager.load:  Unknown reward type 'newstate' while loading quest 'crush'!

xml entities_world

<?xml version='1.0' encoding='UTF-8'?>
  <sector name='Scene'>
    <addon plugin='cel.addons.questdef'>
      <quest name='crush'>
        <state name='celaya'>
          <trigger type='meshselect'>
            <fireon entity='$this'/>
            <reward message='first udar' type='debugprint'/>
            <reward state='polovina' type='newstate' entity='$this'/>
        <state name='polovina'>
          <trigger type='meshselect'>
            <fireon entity='$this'/>
            <reward message='second state' type='debugprint'/>
    <addon entityname='boxforcrush' plugin='cel.addons.celentity'>
      <propclass name='pcobject.mesh'>
        <action name='SetMesh'>
          <par name='name' string='boxforcrush'/>
      <propclass name=''>
        <property bool='1' name='sendup'/>
        <property bool='1' name='senddown'/>
        <property bool='1' name='global'/>
        <property bool='1' name='sendmove'/>
        <action name='SetCamera'>
          <par name='entity' string='camera'/>
        <action name='SetMouseButtons'>
          <par name='buttons' long='2'/>
      <propclass name=''>
        <property name='state' string='celaya'/>
        <action name='NewQuest'>
          <par name='name' string='crush'/>
      <propclass name=''>
        <action name='NewQuest'>
          <par name='name' string='crush'/>
          <par name='actor' string='camera'/>
          <par name='target_op_on' string='light_on'/>
          <par name='target_op_off' string='light_off'/>
          <par name='on_distance' string='1'/>
          <par name='off_distance' string='-1'/>
        <property name='state' string='celaya'/>
      <behaviour name='level_behave'/>

sorry, my english lang is very bad.
3  Associate Projects / CEL Discussion / Message system on: May 09, 2010, 08:13:30 pm
Hi! sorry for my english. You wrote: "A very important part of CEL is the message system", but where I can get all messages?
Of couse I  can get they from property classes. But "Property classes are one of the main generators of messages" and I think they nonunique generators of messages.
help, please.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 5.703 seconds with 17 queries.