>> Hi,
>>
> [...]
>> Now I need to find a way to play different music for each sector. Ideally
>> the music file played should not be hard-coded but loaded from the XML world
>> file.
>>
>> Could anyone provide some hints or point me to some sample code or examples
>> on this?
>
> I guess one way to do it would be to implement an iSectorMeshCallback,
> which would be fired when your player's mesh enters or leave a sector.
> See
> http://crystalspace3d.org/docs/online/api-1.2/structiSectorMeshCallback.php
> You may find example of iSectorMeshCallback in CS code itself.
> It may also be possible to set that through iMovableListener...

oh, forgot about the "loading from XML world file" issue:
you can indeed load sound files from XML, like in:
(if you use a library file, omit the <world> and </world> tags)

<world>
  <sounds>
    <sound name="thud" file="/xd/sounds/game/thud.ogg" />
  </sounds>
  ...
</world>

You should then be able to query sound files from code using their names,
with iSndSysManager::FindSoundByName()

>> Another thing I am unable to find is how to attach a character model to the
>> camera? I can find the sample code for a CEL application but is there any
>> sample available on how to do this for a CS application?
>
> I think you can't really "attach" a camera to a mesh like it's done in CEL.
> It would be up to your app's code to move the camera to track the player's
> mesh.
> Perhaps just parenting is possible, but would probably be too simple
> (ie. wouldn't manage moving camera correctly when near walls, ...).
> Consider using CEL I you want to save yourself some time ;-)
>
>> Many thanks in advance.
>>
>> /regards
>> T. Javed


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to