Jump to content

Scripted item descriptions


Tagaziel

Recommended Posts

I've had a revelation today on how to make scripted item descriptions work.

 

However, I can't quite get the script to work:

 

scn ADM9mmPistolScript

 

Begin Menumode

OnEquip Player

ShowMessage ADM9mmPistolDesc

End

 

Basically, when the item is equipped (will swap that for OnActivate in regards to drugs and other stuff), a message box with the description will be displayed. The script fails to save, though and I can't test it.

 

That's stage one. Stage two will be tying it to a variable, so the message will only display if the player is in examine mode (the variable is set to true).

 

So, in essence...

 

Halp plz

 

I will credit people who help me get this to work as guardian angels of my item description mod. :)

Link to comment
Share on other sites

Well obviously it wouldn't work just if you deleted one blocktype. I've just pointed out why the script didn't saved - it couldn't be compiled.

 

You need to edit it like this:

scn ADM9mmPistolScript
begin OnEquip Player
ShowMessage ADM9mmPistolDesc
end

and then set this script to your pistol.

THis should work.

Link to comment
Share on other sites

(will swap that for OnActivate in regards to drugs and other stuff)

That's not how OnActivate works. An OnActivate block is triggered when a reference is activated, for example by the player walking up to it, aiming at it, and pressing their "activate" key. OnActivate blocks will not run on inventory items while they are in an inventory.

 

Ingestibles can trigger effect scripts if set up properly, and books should trigger OnEquip blocks, but not all inventory items can trigger scripts when clicked on in the player's inventory.

 

Cipscis

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...