Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

General Script Questions #1


WillieSea
 Share

Recommended Posts

@BadCompany - Does that script actually work? I would think not. You are using a ScriptEffectStart (finish) which is made for spells, not scripts attached to creatures.

Perhaps something like this?

scn AGFlameScript1Ref AGRefbegin onload	PlayMagicShaderVisuals effectDarkFlameendbegin GameMode	If GetDead == 1		StopMagicShaderVisuals effectDarkFlame		Set  AGRef to GetSelf		AGCaster.Moveto AGRef		Placeatme AGFlame2 3		AGCaster.Cast AGFlameExplod1 AGRef	EndIfEnd
Link to comment
Share on other sites

  • 2 weeks later...

Quote

i meant to ask how i would do that?  could u edit mind/ur scripts with the (setActorAlpha) function incorporated and post it up here?  thanks agian for all ur help

Take a look at my Ancient Towers mod:
http://www.tesnexus....le.php?id=16308

This script controls their death vanish:
AncientCreatureDeathScript

Its on this creature:
AncientSilverKnightCreature

Let me know if you need more assistance. If you want script help, post up the script you are working with and enclose it in code tags.

Once you determine that the creature has died, this part of the script controls its vanishing act: (by setting the variable deathActive to 1)

	if deathActive == 1		pme STRP		set actorAlpha to 0.9		SetActorAlpha actorAlpha		set deathActive to 2	endif	if deathActive == 2		set actorAlpha to ( actorAlpha - .01 )		if actorAlpha  

The MoveTo in the deathActive=3 part will move the dead creature to a holding cell for cleanup by the game engine. What it does is move it to a Reference Named XMarker in a new interior cell made just for this.
Link to comment
Share on other sites

  • 2 weeks later...

just wondering if its possible make a combination type spell eg. shock + frost = fire?

so you hit someone with your weapon that has a shock enchant, and then you cast your frost spell and the target dose a fire aoe damage spell.

Link to comment
Share on other sites

Quote

just wondering if its possible make a combination type spell eg. shock + frost = fire?so you hit someone with your weapon that has a shock enchant, and then you cast your frost spell and the target dose a fire aoe damage spell.


It would have to definitely be a scripted effect, and may, or may not require a script extender.... although, using the extender doesn't seem to be as much of an issue with oblivion, as it was with morrowind.
Link to comment
Share on other sites

Quote

just wondering if its possible make a combination type spell eg. shock + frost = fire?so you hit someone with your weapon that has a shock enchant, and then you cast your frost spell and the target dose a fire aoe damage spell.

Thats a tough one.

Normally, weapons do not have a very long duration of magic damage on their intended target. So it would probably be rare that this situation would happen.

I can't think of a command that will let you know if an enchantment is playing on a target. Perhaps OBSE has one?

If this is for a unique situation, then there may be other ways around performing the same task.
If this is for a random situation, then it would be much more complex to set up. If its possible at all... :woot:
Link to comment
Share on other sites

  • 1 month later...

okay, inmy mod i have this script on a creature so that when it dies it not only fades away but also explodes and spawns to others...

i was basing it off of WillieSea's script for fading creatures, but every time i try to save the script is doesn't recognize the command "if deathActive''.  Any help would be much appreciated :pints:

Link to comment
Share on other sites

okay, i give up....i have no idea what i'm doing with these damn scripts :pints:

would someone be willing to write some scripts for me?

this is what i'm trying to do:

i made an npc with the atronachflameability.  When he dies i want him to explode and spawn a fire creature.  so in the CS NPC menu, where it asks for a script i selected this...  

this creature is an imp with no model selected and has the atronachflameability (looks like floating fire), once this creature is killed i want it to explode, spawn to more, all while fading out

when each of these creatures is killed they should explode and spawn 3 others (3 each, so if you kill both you'll have 6 more) while fading out.

EDIT: agian, it won't let me post all that i want too, so ill break it up.  The last part of my post is below

Link to comment
Share on other sites

finally, once you kill all these fire creature they should each explode and fade out

all the fire creatures have this selected in their menus...

i can't figure out how to get what i want  aa_wall.gif

currently the firey NPC dies and explodes and spawns the 1st fire creature, but he just keeps exploding and spawning fire creatures :wave:

pls help :pints:  with what i have provided here, would someone be willing to write me scripts to do what i want to happen? or edit mine if i'm close?  i have no knowladge of scripting and all these scripts have been made by simply editing existing scripts (such as WillieSeas creature fade script, etc.)

Link to comment
Share on other sites

Script on AGCaster:

===================

Looks good.

Script on First Fire Imp:

=========================

I will assume this is a new creature with the script "AGFlameScript1" attached to it.

In your 'deathActive == 3' block of code, you duplicate the command:

This is not a problem, just something that is redundant.

In your 'deathActive == 3' block of code:

Add a line of code that resets MyStatus back to 0.

Your last block of code where you check:

Will be executed every frame that the creature is dead

You might want to put whats inside that block of code in your Begin OnDeath block of code instead.

Script on Second Fire Imp:

==========================

Uhm, wow. Not sure why you are duplicating everything so much here. All you need to do is take the first script above, "AGFlameScript1" and where you spawn the 2 AGFlame2, just spawn 3 of the next fire creature.

Another note, this script is not spawning anything, that may be why you don't see any more of the creatures show up.

NOTE1:

======

I don't understand what the last script is for or what it is attached to. "AGFlameDisable".

You can only have one script on a creature, and it should be the above scripts.

NOTE2:

======

What do you mean the 1st fire creature just keep exploading? Do you have to kill it first? Or does it spawn and expload creating more?

Note3:

======

Dont feel bad. My initial death fade script took around a week or more to get working right. It always looks right on paper, but accurate testing notes when there is a problem makes it easier to determine what is wrong with the script. Let me know exactly what you are doing and what the script 'is' or 'is not' doing.

Link to comment
Share on other sites

  • 5 weeks later...

I once wrote a tutorial on the creation of timers in the BGS forums. Was thinking about creating a new topic and copying it here, but I don't seem to have the permissions. In any case, anyone in welcome to make the transfer. I've been meaning to put it on the wiki ever since I wrote it, but seem to have trouble doing just that  aa_biggrin.gif

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

I need some scripting help. Let me explain what is it about.

I am the author of the Imperial City Pack mod. Among the other things, i also have a lot of open market vendors. Their stuff is on their tables, boxes and rugs all day, and when they go home, their merchandise remains there. Instead of extra guards, i've been thinking of having merchants to tidy their stuff up when the leave their stands. I was wondering if that could be done with a script.

When merchants go to their stands in the morning, their AI package for selling merchandise activates. When they leave their stands in the evening, it deactivates. The idea is simple: when their AI package activates, their merchandise is activated, when it deactivates, the items deactivate also. I am wondering if that kind of script can be done, and how.

Link to comment
Share on other sites

That is a good question. And the answer can be complicated...

It would probably require a lot of work for you as well, but would be a neat effect for sure.

First, you would have to replace all the merchant items with preferably stationary objects that cannot move.

If you want them to be able to steal it, you could put activate script on it and check for the player sneaking, check the players stealth skill and anything else you like. If the chance succeeds, you could disable the object and put it in the players inventory, otherwise put a crime level on them.

To purchase the items, the player could talk to the merchant. If they buy all the merchants supply of the object, you could disable the object. This would be complex.

Or, you could have 'non-sellable' display objects that are just always there to display what the merchant 'could' sell in renewable supply. One idea here is that when the merchant is activated, a script checks the inventory of the renewable objects, and adds some to the merchant container if they run out or get low.

Now, using a script like the vanilla city streetlight script, you could easily disable one object and set all the merchant items parentage to that one disableable object. So when the one object is disabled, all the children of that object will also disappear. And the same would happen when you 'enable' the one object again, everything would be back.

Or you could just put a script on the objects and when activated, it says "It is obviously a fake and is nailed to the display stand".

Let me know what interestes you and what you would like help with.

Link to comment
Share on other sites

  • 3 weeks later...

Was wondering if you guys could please consider writing a scripting tutorial for making a companion please, perhaps like a step by step guide per turial such as the inventory and follow scripting, the adding in of following on horseback and how to script animation to be triggered using dialogue.

I also have a script I need help with, I am wanting to make Farwill Indarys into a companion, he's one of the vanilla npc's one meets along the main quest. I like to call him "Deathwish Dunmer"

Scriptname DianneFarwillQuest

begin GameMode

;check if the player meets the requirements

If ( GetStageDone MS13 100 == 1 ) || ( GetStageDone MS13 105 == 1 )

aadiaFarwillIndarys.Enable

else

If FarwillIndarys.IsDead == 1

aadiaFarwillIndarys.Disable

aadiaFarwillHorse.Disable

StopQuest aadiaFarwillQuest

endif

endif

end

Trouble is it won't save, I duplicated Farwill so as not to mess with the vanilla Farwill.

Link to comment
Share on other sites

Was wondering if you guys could please consider writing a scripting tutorial for making a companion please, perhaps like a step by step guide per turial such as the inventory and follow scripting, the adding in of following on horseback and how to script animation to be triggered using dialogue.

I also have a script I need help with, I am wanting to make Farwill Indarys into a companion, he's one of the vanilla npc's one meets along the main quest. I like to call him "Deathwish Dunmer"

Scriptname DianneFarwillQuest

begin GameMode

;check if the player meets the requirements

If ( GetStageDone MS13 100 == 1 ) || ( GetStageDone MS13 105 == 1 )

aadiaFarwillIndarys.Enable

else

If FarwillIndarys.IsDead == 1

aadiaFarwillIndarys.Disable

aadiaFarwillHorse.Disable

StopQuest aadiaFarwillQuest

endif

endif

end

Trouble is it won't save, I duplicated Farwill so as not to mess with the vanilla Farwill.

Inventory stuff for a companion is easy, all you need to do is move stuff from a chest to the companion and back, simple. The following is done by AI and a simple add package function that can be called through dialogue.

As far as the script goes, if no error messages are being shown then its a syntax error the CS cannot compile, simply check through the script and see if anything is wrong.

Hold on: is "IsDead" and actual command?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...