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...

Summon / Dismiss Scripts for use with CS 3.7


Rastafariel
 Share

Recommended Posts

Im scripting a work-around to be used in conjunction with Toaster's Companion Share 3.7 so that I can get a specific actor (in this case "Ras") to be summoned and dismissed to his cage without expending lots of running power for him to "run back to someplace" and also without the chance of him dying.

So, my summons works and is compatable with CS 3.7 and especially keeps the inventory command working:

ScriptName SummonRasSCR 


;attempt to use spell timer vs. script timer - done

;now using short summon spell for 3 seconds with this script to summon actor with no timer


float fade

short playonce 

ref SUMN


Begin ScriptEffectStart 


;Set temp reference for scripting. 

;Allows faster transition of script as template. Also allows for leveled summon. 


	set SUMN to SummonRasREF 

	;Reset our creature if re-summoned before time runs out on spell 

	SUMN.disable 


	;Now we move our creature to the Player 

	;Move the creature reference to the worldspace of the Player 

	SUMN.moveto Player 30 30 10 


	;Make our creature visible and active 

	SUMN.enable

	SummonRasREF.SetIgnoreFriendlyHits 1

	SummonRasREF.ModDisposition player 100  


	set fade to 1 ;Resets the alpha fade variable to 1 


	;Play effect for creature entrance 

	SUMN.pms effectSummonMythicDawn 1


End

______________________________________________________

My problem is with dismissing him to his hidey hole... when I set the spell to self, it transports the player, and Ras (the NPC) both to the hidey-hole (how odd?)

When I set the spell to target, it CTD's Oblivion. =-)

scn DismissRasScript

ref SUMN

Begin ScriptEffectStart

;if not player qualifier (these two lines added in attempt to only teleport the NPC, were not in orig. script)

if getisreference player != 1 (so... getisreference player != 1 works, but the result is neither actors are transported... which now kinda makes sense...)

(I guess I dont understand why if the script says SUMN.moveto x ... why the player is moving??)

;Move our creature back to it's holding cell

SUMN.moveto CreatureCageREF 0 0 10

;Reset our creature if dead

SUMN.resurrect

;Set our creature to an unprocessed state

SUMN.disable

endif

End

--------------------------------------------

And I thought I had a totally cool workaround from Montana's totally awesome yet incredibly long summon/gohome/actor script....

Edited by Rastafariel
Link to comment
Share on other sites

Ok ummm....hmmmm

I'm not sure what you were TRYING to make getisreference do, and I'm even less sure what it actually did. lol

I don't think you need it though. This kind of thing can be handled with explicit references of what you want to move and to where.

scn DismissRasScript

ref SUMN


Begin ScriptEffectStart


;if not player qualifier

if getisreference player != 1


;Move our creature back to it's holding cell

SUMN.moveto CreatureCageREF 0 0 10

;Reset our creature if dead

SUMN.resurrect

;Set our creature to an unprocessed state

SUMN.disable


endif

End 
So you have a seperate dismiss spell? And this is the entire script for it? If so then you have not set the reference SUMN. Variables in scripts like this are local...just because they have the same name as a variable in another script doesn't meen they are the same. My guess would be that it's moving the player because, probably, the unset ref defaults to the actor casting the spell. And it isn't specifically moving your minion, he just comes along for the ride, because he's running a Follow package. So you need to tell the script explicitly what NPC you want to move. Btw, You can run this sort of thing with one spell/script by making it check to see if the summoned thing is already with you or not. something like:
If minionRef.getinsamecell player == 0

   ;minionRef.moveto player

else

   ;minionRef.moveto holdingcell

endif

Link to comment
Share on other sites

Awesome man! Thanks for the help!

This really improves my game getting into the scripting... maybe in 2 years I'll have it down...

______________________________________________

Hrm, well the if/else script didnt work for me so I went back to 2 spells and I just set SUMN to SummonRasRef, and the "Dismiss Spell" works:

scn DismissRasScript

ref SUMN


Begin ScriptEffectStart 


set SUMN to SummonRasRef


;Move our creature back to it's holding cell 

SUMN.moveto CreatureCageREF 0 0 10 

;Reset our creature if dead 

SUMN.resurrect 

;Set our creature to an unprocessed state 

SUMN.disable 


endif

End

Edited by Rastafariel
Link to comment
Share on other sites

Im scripting a work-around to be used in conjunction with Toaster's Companion Share 3.7 so that I can get a specific actor (in this case "Ras") to be summoned and dismissed to his cage without expending lots of running power for him to "run back to someplace" and also without the chance of him dying.

So, my summons works and is compatable with CS 3.7 and especially keeps the inventory command working:

ScriptName SummonRasSCR 


;attempt to use spell timer vs. script timer - done

;now using short summon spell for 3 seconds with this script to summon actor with no timer


float fade

short playonce 

ref SUMN


Begin ScriptEffectStart 


;Set temp reference for scripting. 

;Allows faster transition of script as template. Also allows for leveled summon. 


	set SUMN to SummonRasREF 

	;Reset our creature if re-summoned before time runs out on spell 

	SUMN.disable 


	;Now we move our creature to the Player 

	;Move the creature reference to the worldspace of the Player 

	SUMN.moveto Player 30 30 10 


	;Make our creature visible and active 

	SUMN.enable

	SummonRasREF.SetIgnoreFriendlyHits 1

	SummonRasREF.ModDisposition player 100  


	set fade to 1 ;Resets the alpha fade variable to 1 


	;Play effect for creature entrance 

	SUMN.pms effectSummonMythicDawn 1


End

______________________________________________________

My problem is with dismissing him to his hidey hole... when I set the spell to self, it transports the player, and Ras (the NPC) both to the hidey-hole (how odd?)

When I set the spell to target, it CTD's Oblivion. =-)

scn DismissRasScript

ref SUMN

Begin ScriptEffectStart

;if not player qualifier (these two lines added in attempt to only teleport the NPC, were not in orig. script)

if getisreference player != 1 (so... getisreference player != 1 works, but the result is neither actors are transported... which now kinda makes sense...)

(I guess I dont understand why if the script says SUMN.moveto x ... why the player is moving??)

;Move our creature back to it's holding cell

SUMN.moveto CreatureCageREF 0 0 10

;Reset our creature if dead

SUMN.resurrect

;Set our creature to an unprocessed state

SUMN.disable

endif

End

--------------------------------------------

And I thought I had a totally cool workaround from Montana's totally awesome yet incredibly long summon/gohome/actor script....

You cant disable, move and reenable all in the same pass through the script. You have to use some kind of system to do one, then wait till the next pass and do the next.

Montana

Link to comment
Share on other sites

You cant disable, move and reenable all in the same pass through the script. You have to use some kind of system to do one, then wait till the next pass and do the next.

Montana

Cool. Thanks man. I'll just stick with the 2 spells then... btw... is this "the" Montana? =-) if so, I'm a big fan. Also totally agree with you on liberty.

Link to comment
Share on other sites

Cool. Thanks man. I'll just stick with the 2 spells then... btw... is this "the" Montana? =-) if so, I'm a big fan. Also totally agree with you on liberty.

Yes, I'm Montana or MontanaBlueSkies on Nexus. Because of the PG nature of this forum, I dont want to make too much of that though.

I'm pleased to hear that liberty is an important issue for you. One day we will all die. In that moment you will have to consider your life. Live free and die proud.

Try something like this to update and/or move a actor:

begin gamemode

If update

If update == 3

actor.disable

elseif update == 2

actor.move xxxx

elseif update == 1

actor.enable

endif

set update to update - 1

return

endif

If actorshouldbe updated

set update to 3

endif

end

This way the script finishes for each iteration of the variable "update" and it doesnt run any of the other script until update == 0.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...