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.)

NPC that attacks an Object, possible?

Discussion in 'Neverwinter Nights (Classic)' started by Daed, Dec 19, 2003.

  1. Daed Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Dec 11, 2003
    Messages:
    31
    Likes Received:
    0
    I was up to make a training room a bit more "live" ,but I have not found a way to make a NPC {fighter with weapon} ,to attack a Combat Dummy close to him, I tryed making the dummy Hostile {faction} and the Fighter Hostile to hostiles.. but it doesnt work,maybe there is need for a simple script to be put somewhere? Thanx in advance for any suggestion!
     
  2. Alavin

    Alavin If I wanted your view, I'd read your entrails Veteran

    Joined:
    Aug 26, 2003
    Messages:
    930
    Likes Received:
    0
    Create a custom creature, and set its appearance as "combat dummy". Make it hostile and immobile, and create a custom item giving it damage immunity to everything. Clear all the scripts for it too, and make the attacker hostile to hostile. That should work. :)
     
  3. Daed Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Dec 11, 2003
    Messages:
    31
    Likes Received:
    0
    Hey Alvin :) ,I tryed it but looks like I can only give creatures apparence to creatures, so i cant make a goblin looks like a combat dummy or a chest etc,maybe I'm missing something ? Btw I took a look to the script menu and found this :
    -------------------------------------------
    void ActionAttack(object oAttackee, int bPassive=FALSE)
    -------------------------------------------
    oPlaceable
    -------------------------------------------

    My combat dummy tag is CombatDummy1 , and the NPC which should attack tag is DrowFighter1 ... maybe with your skills you can work on a script Alvin! I made some tryes but you know I'm noob, cant compile my tryes :p
     
  4. Alavin

    Alavin If I wanted your view, I'd read your entrails Veteran

    Joined:
    Aug 26, 2003
    Messages:
    930
    Likes Received:
    0
    I really should have thought of that - the easy option... I got confused with attacker and attackee...

    Put at the bottom of the OnSpawn script for the attacker:

    object oDummy = GetObjectByTag("CombatDummy1");
    ActionAttack (oDummy);

    Perhaps the ability to change a creature's appearance to a combat dummy is in a patch. I'm sure it's been there for a while, though.
     
  5. Daed Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Dec 11, 2003
    Messages:
    31
    Likes Received:
    0
    Woot woot,gonna try the script Alvin,I'll look for this patch too ;) ,Thx a bunch m8!!

    edit: The script compiled succesfully, but the attacker doesn't attack the dummy :eek: ,strange!

    [ December 19, 2003, 17:20: Message edited by: Daed ]
     
  6. Alavin

    Alavin If I wanted your view, I'd read your entrails Veteran

    Joined:
    Aug 26, 2003
    Messages:
    930
    Likes Received:
    0
    It may be that the ActionAttack script is only useful for one attack. This could be solved by, rather than putting this in the OnSpawn script, put it in the OnHeartbeat script. However, as this is run every six seconds, it can slow down the game if there are many scripts running in this way. It would be best to make a creature with the Combat Dummy appearance, if you have that working.
     
  7. Rastor Gems: 30/31
    Latest gem: King's Tears


    Joined:
    Jul 8, 2002
    Messages:
    3,533
    Likes Received:
    0
    You could always open up the Prologue in the Toolset at look at the scripts for the fighter guys in the fighter training area. All you'd have to do is modify the blueprint IDs.

    Isn't there a continuous attack function somewhere?
     
  8. Daed Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Dec 11, 2003
    Messages:
    31
    Likes Received:
    0
    Okay I found out the apparence option for NPC@Dummy, let's try this out!

    edit: great,with a bit of faction editing I can do a lot of funny things :)

    [ December 20, 2003, 14:10: Message edited by: Daed ]
     
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.