Jump to content


Photo

items in containers via scripts


  • Please log in to reply
2 replies to this topic

#1 igi

igi

    IESDP Guardian

  • Administrator
  • 1058 posts

Posted 27 August 2002 - 11:00 AM

Hiya folks,
A major feature of Weidu is compatability with other Weidu mods, yes? So while using weidu, I should try and be compatable. Which brings me to my question:
Is it possible to put my new items into pre-existing containers in pre-existing .are files?
I thought appending to the area script, something like
IF
  TRUE()
THEN
  RESPONE #100
    GiveItemCreate("item",container,1,0,0)
END
but it doesnt seem to work. The next best thing I can think of is to extract the .are on the users end, and patch the file there, but if another weidu mod is doing / has done the same, wont my patching offset be different?
Hope you can understand, thanks
/bt_igi

Visit the IESDP


#2 Extremist

Extremist
  • Member
  • 8 posts

Posted 28 August 2002 - 06:02 AM

Your code must look something like this:
IF
    TRUE()
THEN
    RESPONSE #100
        ActionOverride("Barrel1",CreateItem("MYITEM",0,0,0))
END

Barrel1 is the name of the container object stored inside ARE file.
You may also with similar command combo (DestroyItem) remove items from containers.
Why is that so? Object type container is treated just like creature, and containers CAN have their own scripts.

#3 igi

igi

    IESDP Guardian

  • Administrator
  • 1058 posts

Posted 28 August 2002 - 08:39 AM

Ah, ok, thanks a lot! :-) I didnt know objects were treated as containers, but once you see they are, it makes sense.
Another step closer to getting my mod finished :)
/bt_igi

Visit the IESDP