Jump to content

Package question


Spinner385

Recommended Posts

Okay so I'm new to the whole package thing. It appears I can make a package to have NPCs walk here or there, cast a spell, and several other things. I haven't had any success just messed with the menus. I have two basic question to know if they are going to do what I want.

 

One: Can you get the player to use a package while still under control?

 

Two: Can you activate a package via script?

 

Thanks!

Edited by Spinner385
Link to comment
Share on other sites

what kind of package would the player be using? and im not sure if this is what youre asking but yes you can script the start of a package by setting the conditions to coincide with an event, like telling the packsge to begin on a certain stage of a quest. hope this helps
Link to comment
Share on other sites

Like dfac said, you don't script directly a package start.

 

You instead put conditions, which will fire the package when they match.

 

For example you can put a stage. Then on that stage fragment put a EvaluatePackage() to make it fire suddenly.

Link to comment
Share on other sites

Appreciate the help! I'll just spill the beans, I'm trying to find a new method to auto cast spells. Here's what I did with no success.

 

-First I created a Global variable called CastSpell with initial value 0

-Then created a FormList call SpellList and added the healing spell to it.

-Went in my script and added a method to set CastSpell to 1

-Assigned the property CastSpell

-Went to the player and created a new package called AutoCast

-Using the UseMagic Package Temp I set SPELL to the ObjectID SpellList

-Under Conditions Tab I created a new condition. GetGlobalValue CastSpell == 1

-Saved and fired it up, no reaction

 

A few things I'm uncertain about. Should I change the condition from subject to player? There's a check box under conditions called global, don't know what that for. Does it know this is a condition to start the package? Is this going to work on the Player? Am I missing something altogether?

 

Thanks again for the help, I think I'm on the right track.

Edited by Spinner385
Link to comment
Share on other sites

Thanks for the quick reply. Added that line before the setvalue(1). The Game.SetPlayerAIDriven() worked but it still didn't cast.

 

It locked up my controls except I could still cast and such. Just not move. I want to be able to have full control but only automate casting. Hope its possible.

Link to comment
Share on other sites

Well I had the most limited success and now it looks like a failed experiment. Unless someone else with more knowledge can help.

 

I used this combination of code (Tried only 1st line and only second line didn't work)

 

Game.DisablePlayerControls()

Game.SetPlayerAIDriven()

CastSpell.setvalue(1)

 

Then in my package I set the flag draw weapon. Although it didn't attempt to cast a spell, it did draw my weapon. At least I know the package is activating. Problem is I have to freeze my controls regardless, so I believe this idea is dead. Thanks for helping!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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