Aller au contenu

Photo

Please help a newbe


  • Veuillez vous connecter pour répondre
7 réponses à ce sujet

#1
nn125

nn125
  • Members
  • 42 messages
OK I can create an item and put it in the inventory - How can I now get it to run a script when activated , a bit like a rings in Baldors Gate.

Ivw banged my head against the wall all day -  Tried the Script field - Never gets called - At a total loss


Thanks in advance

#2
Ashmaran

Ashmaran
  • Members
  • 52 messages
I think the best way is probably to add an entry to the ABI_base 2da essentially adding a new ability for your item. That ability can reference your script file and do pretty much whatever you want. Have a look at the entry for Kolgrim's Horn for an example.



I haven't tried doing it with items yet, but I've added new talents and spells to the game by modifying 2das.



http://social.biowar...t/index.php/2DA

#3
nn125

nn125
  • Members
  • 42 messages
OK done that (I think) - How do I give it to the hero
Unique ID - 1304 - GDA in single player overide directory
Do I need to make a corisponding Item in the toolset If i do, how do I connect them together
What do I put in the UT_AddItemToInventory if I use this function

#4
AND04

AND04
  • Members
  • 154 messages
once the GDA is in the override directory - restart the toolset - then you should have the new item-ability in your drop-downlist



now you just need to check for that ability in your item-script.

#5
nn125

nn125
  • Members
  • 42 messages
Brilliant, thanks - It works!!!!!



A seperate question - This item when clicks gives a floaty no location info, etc, How do I get the Area ID

The GetName gived the full text name

Ive tried the GetAreaId, both with a Hero Object and Area object, both time the toolbox complains that incorrect parameters, Ive seached all the include files and the Wiki without any success for the paramater id's



Thank's in advance

#6
sillyrobot

sillyrobot
  • Members
  • 171 messages
Steps



1) Create an ability in a M2DA that will add to ABI_Base.GDA. Two fields are especially important. ID needs to be unique. Spellscript needs a name for a script you'll create later in the toolset. Name it something you'll remember.



2) Convert to a GDA and copy to an override directory so the toolset can see it like \\packages\\core\\override.



3) Start the toolset. Create an item and assign as it's ability the ability you created in step 1.



4) Create the script the ability references. Item_unique_power.nss is a good template to work from, Some things to consider.



If the item is expected to be permanent, then increase the stack count in the EVENT_TYPE_SPELLSCRIPT_PENDING case. The is a auto-decrement on the stack count deeper in the code.



EVENT_TYPE_SPELLSCRIPT_IMPACT is where you the effects should be scripted.



6) Add a module script to grant the item to your character.

#7
nn125

nn125
  • Members
  • 42 messages
Thanks for all the help



Do you know the parameters for

GetAreaId()

I thought it would be an area object (how wrong) - Looked through the Include files and Wiki and can't find it





Thanks in advance




#8
sillyrobot

sillyrobot
  • Members
  • 171 messages
There is a GetArea( object ) call -- is that the one you are looking for? There is also GetAreaFromLocation( location )