Results 1 to 3 of 3

Thread: A few scripting questions

  1. #1

    Default A few scripting questions

    Hi everyone!

    I am writing to enquire as to the nature of several scripting problems. Really there not so much problems as I would just like to know about them.

    Firstly, I would like to ask about the sound manager. Is there anyway to detect if a sound is playing? I am thinking of something like:

    mySound = GetSoundManager:Play("audio/sfx.ogg");
    if (GetSoundManager:GetIsPlaying(mySound)) then
    // Don't play it again
    end

    The reason I ask this is that in a game I am working on a sound plays upon a collision and if the player positions himself against the object that the sound plays upon colliding with, the program starts playing as many instances of the sound as it possibly can and it starts lagging very much. I could set a timer type thing to check if a sound should still be playing, but maybe this would be more elegant?

    Nextly I should like to just ask what the depth and normal parms in OnCollision[Static] do. I figure from the example in the reference that they tell the direction of the collision or something maybe? But I can't quite pin it down.

    And lastly, and this might be more appropriate in the feature requests forum, but since I already have this thread... Does novashell have any plans to support clanlib's networking? I just noticed that it was listed as one of clanlib's features and became curious.

    Thanks for any enlightenment that anyone may care to provide!

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    Firstly, I would like to ask about the sound manager. Is there anyway to detect if a sound is playing?
    Sure, just added it. Thanks.

    Nextly I should like to just ask what the depth and normal parms in OnCollision[Static] do. I figure from the example in the reference that they tell the direction of the collision or something maybe? But I can't quite pin it down.
    The normal is a unit vector that shows the direction of the collision and helps you determine who hit who. If a player jumps up and hits his head on a stationary block, the vector will be x = 0, (no side to side movement) and y = -1 (moving up). But, if he hit it at an angle, the normal will reflect that.

    Depth is the distance that the two objects overlap, how much penetration there is.

    Does novashell have any plans to support clanlib's networking? I just noticed that it was listed as one of clanlib's features and became curious.
    No network support is planned at the moment.
    Seth A. Robinson
    Robinson Technologies

  3. #3

    Default

    Cool, thanks. IsPlaying works great! I hope to have a game to show fairly soon...

Similar Threads

  1. Unofficial Novashell Scripting API Documentation Thread
    By Ian in forum Novashell Game Creation System
    Replies: 5
    Last Post: 01-08-2007, 07:54 AM
  2. scripting engine
    By elite_coder in forum Game development
    Replies: 4
    Last Post: 07-04-2004, 07:42 AM
  3. FQ Scripting
    By jjohn in forum Funeral Quest
    Replies: 11
    Last Post: 07-02-2003, 09:40 AM
  4. Funky Scripting Docs
    By redink1 in forum Funeral Quest
    Replies: 1
    Last Post: 01-14-2003, 06:12 AM
  5. Scripting in Unicode?
    By jjohn in forum Funeral Quest
    Replies: 3
    Last Post: 12-18-2002, 06:32 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •