Jump to content

Scripting question


lorenzoulm

Recommended Posts

Hi. I'm making a quite complex script. In this script I can heal my companion only if I have enough medicine ability or enough stimpaks (EX. 70% life --------> 1 Stimpak or 30 Medicine, 50% 2 stimpak or 40 medicine etc....). Here's my question: is there a command to check player's inventory to see if there are enough stimpaks to heal. Also one more stupid question: what's the command in a script to run another script (ex. like startsript myscript)?

Link to comment
Share on other sites

Ok I solved the first isssue by using the command player.GetItemCount ABC X, but I can't figure how to make my script to start after a certain dialogue. How to do that???

I don't really know of a .startscript command... But there are a lot of ways you can do that anyway.

 

If you're going to be doing a lot of stuff like that, I would use quest variables myself. For example make a quest for whatever you're doing and give it a quest script. In that script just declare variables that you can call from other scripts. It would look like this...

 

 

SCN TheQuestScript

 

Short QuestVar1

Short QuestVar2

etc...

 

Now in your other scripts you can use those variables to do all sorts of things. So if we named the quest MyModQuest we could call any one of those variables in another by doing things like this...

 

SCN AnotherScript

 

 

Begin Gamemode

 

If MyModQuest.QuestVar1 == 1

Do a bunch of other stuff

 

elseif MyModQuest.QuestVar1 ==2

Do this instead

 

 

So for your case in the dialogue's result script you could set the quest variable to 1

 

set MyModQuest.QuestVar1 to 1

 

And then your other script can call it like I showed in the previous example. I hope that helps and if you need me to explain it further let me know.

 

 

Edited by joshua121
Link to comment
Share on other sites

  • Recently Browsing   0 members

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