1. SPS Accounts:
    Do you find yourself coming back time after time? Do you appreciate the ongoing hard work to keep this community focused and successful in its mission? Please consider supporting us by upgrading to an SPS Account. Besides the warm and fuzzy feeling that comes from supporting a good cause, you'll also get a significant number of ever-expanding perks and benefits on the site and the forums. Click here to find out more.
    Dismiss Notice
Dismiss Notice
You are currently viewing Boards o' Magick as a guest, but you can register an account here. Registration is fast, easy and free. Once registered you will have access to search the forums, create and respond to threads, PM other members, upload screenshots and access many other features unavailable to guests.

BoM cultivates a friendly and welcoming atmosphere. We have been aiming for quality over quantity with our forums from their inception, and believe that this distinction is truly tangible and valued by our members. We'd love to have you join us today!

(If you have any problems with the registration process or your account login, please contact us. If you've forgotten your username or password, click here.)

Simple scripting problem

Discussion in 'Neverwinter Nights (Classic)' started by Mr Writer, Aug 9, 2003.

  1. Mr Writer Gems: 8/31
    Latest gem: Skydrop


    Joined:
    Oct 7, 2001
    Messages:
    288
    Likes Received:
    0
    Im in the middle of creating a cutscene and am a bit stuck :S

    void Bhaalsummon()
    {
    object oSpawn;
    location lTarget;
    object oTarget = GetWaypointByTag("bhaalspawn");

    lTarget = GetLocation(oTarget);

    DelayCommand(13.6,CreateObject(OBJECT_TYPE_CREATURE, "bhaal", lTarget));
    object oTarget = GetObjectByTag("bhaal");
    DelayCommand(13.8,ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_FIRESTORM), GetLocation(oTarget)));
    DelayCommand(13.9,AssignCommand(GetObjectByTag("Bhaal"), ActionSpeakString("At last my time has come...")));
    DelayCommand(14.0,AssignCommand(oTarget, ActionPlayAnimation(ANIMATION_LOOPING_MEDITATE, 1.0f, 7.0f)));
    }

    Is my code,

    DelayCommand(13.6,CreateObject(OBJECT_TYPE_CREATURE, "bhaal", lTarget));

    is the line causing problems giving the error ERROR: DECLARATION DOES NOT MATCH PARAMETERS

    Its a silly mistake somewhere im sure, I just cant spot it :( Any help is apreciated
     
  2. Capt. Tripps Gems: 9/31
    Latest gem: Iol


    Joined:
    Mar 11, 2001
    Messages:
    341
    Likes Received:
    0
    Try ActionCreate rather then CreateObject.
     
  3. Mr Writer Gems: 8/31
    Latest gem: Skydrop


    Joined:
    Oct 7, 2001
    Messages:
    288
    Likes Received:
    0
    Thats not a command apprently :'(

    Thread of the beholder kin lol :D
     
  4. Blackthorne TA

    Blackthorne TA Master in his Own Mind Staff Member ★ SPS Account Holder Adored Veteran Pillars of Eternity SP Immortalizer (for helping immortalize Sorcerer's Place in the game!) New Server Contributor [2012] (for helping Sorcerer's Place lease a new, more powerful server!) Torment: Tides of Numenera SP Immortalizer (for helping immortalize Sorcerer's Place in the game!)

    Joined:
    Oct 19, 2000
    Messages:
    10,416
    Media:
    40
    Likes Received:
    232
    Gender:
    Male
    It is in the Lexicon:

    Code:
    ActionCreate(string, location)
    Used to encapsulate CreateObject allowing this function to be added to the action stack
    
    
    void ActionCreate(
        string sCreature,
        location lLoc
    );
    Parameters
    sCreature
    The resref of the creature to create
    
    lLoc
    a location object identifying the location to create the creature
    Description
    This function essentially wraps the CreateObject function in a void method so that it can be placed on the action que. It is used in the OnHeartbeat of the placable object "Skeleton Bones" found in the Battlefield pallate. Found in nw_o2_skeleton.nss


    Remarks
    nw_o2_skeleton.nss might be a good place to start if you wanted objects to turn into creatures when the player approached.


    Requirements
    #include "nw_o2_skeleton"

    Code:
    Example
    string sCreature = "NW_SKELWARR01";
    location lLoc = GetLocation(OBJECT_SELF);
    DelayCommand(0.3, ActionCreate(sCreature, lLoc));
    /* ***
    ** The DelayCommand message above could be replaced with
    ** ActionDoCommand(ActionCreate(sCreature, lLoc));
    *** */
     
Sorcerer's Place is a project run entirely by fans and for fans. Maintaining Sorcerer's Place and a stable environment for all our hosted sites requires a substantial amount of our time and funds on a regular basis, so please consider supporting us to keep the site up & running smoothly. Thank you!

Sorcerers.net is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to products on amazon.com, amazon.ca and amazon.co.uk. Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.