Difference between revisions of "Scripting Tutorial: My First Creature Script"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>JOG
(Moved to Category "Scripting Tutorials")
imported>QQuix
(Byline removed)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
My First Scripted Creature


by: jackmix69


Okay, you guys like creatures yes? how about applying a script to one? Anyone ever play castlevania: sotn\cod? Well, if so, then you will remember the pesky Blood Skeleton, a skeleton soaked in blood that reformed when it died and never stayed dead. Well, we are gonna script a creature JUST like that. I have a texture for a blood skeleton that I made, but I am unable to upload it. For now, it'll just look like a normal skeleton, but it will be a new entity.
Okay, you guys like creatures yes? how about applying a script to one? Anyone ever play castlevania: sotn\cod? Well, if so, then you will remember the pesky Blood Skeleton, a skeleton soaked in blood that reformed when it died and never stayed dead. Well, we are going to script a creature JUST like that. (I have a texture for a blood skeleton that I made, but I am unable to upload it). For now, it'll just look like a normal skeleton, but it will be a new entity.


{{Tools|req0=[[The Elder Scrolls Construction Set|Construction Set]]}}
⚫
So, what we are going to accomplish.


⚫
==What we are going to accomplish==
⚫
1) Make a blood skeleton creature (wont look bloody)
⚫
2) When it dies, it will fall apart. Then it will reform, you will hear thunder, then it will have a unique fire until it is back up.


⚫
# Make a blood skeleton creature (won't look bloody)
⚫
So, where to begin.
⚫
# When it dies, it will fall apart. Then it will reform, you will hear thunder, then it will have a unique fire until it is back up.


⚫
==Where to begin==
⚫
1) Open up the CS


⚫
# Open up the CS
2) When its done loading, we shall create the creature first.
# When it's done loading, we shall create the creature
⚫
# Go in the Creatures->Undead Tab. Find Skeleton under the undead tab
⚫
# Right click on any CreatureSkeleton, and hit Edit. For example, if you want an archer, select CreatureSkeletonArcher and right click. It's up to you. I prefer something weak and unarmed, because he comes back endlessly and blood skeletons from castlevania were unarmed.
⚫
# Anyway, for now, just change the ID to something like AaaBloodSkeleton(aaa so it's on the top)
⚫
# When it asks to create a new form, say yes.


⚫
==Now we shall make the script==
⚫
3) Go in the Creatures->Undead Tab. Find Skeleton under the undead tab

⚫
4) Right click on any CreatureSkeleton, and hit edit. For example, if you wanted an archer, select CreatureSkeletonArcher and right click. Its up to you. I prefer something weak and unarmed, because he comes back endlessly and blood skeletons from castlevania were unarmed.
⚫
⚫
5) Anyway, for now, just change the ID to something like AaaBloodSkeleton(aaa so its on the top)

⚫
6) When it asks to create a new form, say yes.

⚫
Now, we shall make the script.


Go under Gameplay->Edit Scripts. A little text thingy will pop up. Go under File->New and we must first define our scriptname. Make sure Script Type is Object (tab in edit script box)
Go under Gameplay->Edit Scripts. A little text thingy will pop up. Go under File->New and we must first define our scriptname. Make sure Script Type is Object (tab in edit script box)


⚫
scn AaaBloodSkeletonsScript


⚫
now that that's defined, we can begin. When he dies, we want the script to commence. So, we are going to use the OnDeath command.
⚫
scn AaaBloodSkeletonsScript


⚫
now that thats defined, we can now begin. When he dies, we want the script to commence. so, we are gonna use the OnDeath command.


⚫
begin OnDeath


⚫
begin OnDeath


so, so far it should look like
so, so far it should look like


⚫
scn AaaBloodSkeletonsScript

⚫
⚫
scn AaaBloodSkeletonsScript
⚫
begin OnDeath

⚫
begin OnDeath



Good. We defined the scriptname and the command. Now, we want the "Unholy Fire"
Good. We defined the scriptname and the command. Now, we want the "Unholy Fire"

so, now we add....
so, now we add....


⚫
PlayMagicShaderVisuals effectSummonMythicDawn 5


⚫
This line tells us that the unholy fire will last approx. 5 seconds. Just enough time to get up. Here's what we got so far
⚫
PlayMagicShaderVisuals effectSummonMythicDawn 5


⚫
scn AaaBloodSkeletonsScript

⚫
This line tells us that the unholy fire will last aprox. 5 seconds. Just enough time to get up. Heres what we got so far
⚫
begin OnDeath


⚫
scn AaaBloodSkeletonsScript

⚫
begin OnDeath
PlayMagicShaderVisuals effectSummonMythicDawn 5
PlayMagicShaderVisuals effectSummonMythicDawn 5



Giggity. We got the unholy fire going. Now we need to state the thunder sound next.
Giggity. We got the unholy fire going. Now we need to state the thunder sound next.


⚫
PlaySound AMBThunder

⚫
PlaySound AMBThunder



This plays the thunder. (Obviously)
This plays the thunder. (Obviously)


⚫
scn AaaBloodSkeletonsScript

⚫
scn AaaBloodSkeletonsScript
⚫
begin OnDeath

⚫
begin OnDeath
PlayMagicShaderVisuals effectSummonMythicDawn 5
PlayMagicShaderVisuals effectSummonMythicDawn 5
PlaySound AMBThunder
PlaySound AMBThunder


⚫
Now, I know what you are thinking. STOP BABYING US AROUND JACKMIX! Heheh....We only have to define the resurrection. We cant just type resurrect, because then he will magically disappear\reappear. Then tell the script to end. In the resurrect, the '''1''' is causing him to come back together.


⚫
==The final, full script==
⚫
Now, I know what your thinking. STOP BABYING US AROUND JACKMIX! Heheh....We only have to define the ressurection. We cant just type ressurect, cause then he will magically disappear\reappear. Then tell the script to end. In the resurrect, the 1 is causing him to come back together.

⚫
The Final, full script.


Note: Do not add the *(OneSpace)
Note: Do not add the *(OneSpace)


scn AaaBloodSkeletonsScript
scn AaaBloodSkeletonsScript
*(one space)
*(one space)
begin OnDeath
begin OnDeath
PlayMagicShaderVisuals effectSummonMythicDawn 5
PlayMagicShaderVisuals effectSummonMythicDawn 5
PlaySound AMBThunder
PlaySound AMBThunder
Resurrect 1
Resurrect 1
end
end


⚫
See? It's really not that hard to script, is it?


⚫
Now, we are almost done.

⚫
See? Its really not that hard to script is it?

⚫
Now, were almost done.


Go back under Creatures->Undead->Skeleton. Select the one we created earlier, (AaaBloodSkeleton) and under the script tab select the dots (elipses) and choose AaaBloodSkeletonsScript. Now, he is linking to his script! Congratulations!
Go back under Creatures->Undead->Skeleton. Select the one we created earlier, (AaaBloodSkeleton) and under the script tab select the dots (elipses) and choose AaaBloodSkeletonsScript. Now, he is linking to his script! Congratulations!
Line 105: Line 83:
There are a number of things you could do....
There are a number of things you could do....


1) Highlight your mouse over the Blood Skeleton's ID name in the Skeleton tab (aaabloodskeleton) and jot down those numbers and letters that come down eventually.. Then go ingame and go in the console and type player.placeatme (hex code for creature)
# Highlight your mouse over the Blood Skeleton's ID name in the Skeleton tab (aaabloodskeleton) and jot down those numbers and letters that come down eventually.. Then go in-game and go in the console and type player.placeatme (hex code for creature)
⚫
# Make a script on a ring\amulet\whatever that summons him

⚫
2) Make a script on a ring\amulet\whatever that summons him
I recommend one, because then you would have to do the same thing with the ring.
I recommend one, because then you would have to do the same thing with the ring.
Line 115: Line 92:
Have fun with your skelly, play nice you hear?
Have fun with your skelly, play nice you hear?


Oh, one last thing. If you have a question, im at the elder scrolls forums just pm me :)
Oh, one last thing. If you have a question, I'm at the Elder Scrolls forums just PM me :)


[[Category:Tutorials]]
[[Category:Tutorials]]

Latest revision as of 06:35, 24 June 2012


Okay, you guys like creatures yes? how about applying a script to one? Anyone ever play castlevania: sotn\cod? Well, if so, then you will remember the pesky Blood Skeleton, a skeleton soaked in blood that reformed when it died and never stayed dead. Well, we are going to script a creature JUST like that. (I have a texture for a blood skeleton that I made, but I am unable to upload it). For now, it'll just look like a normal skeleton, but it will be a new entity.


Tools used in this tutorial

Required


What we are going to accomplish[edit | edit source]

  1. Make a blood skeleton creature (won't look bloody)
  2. When it dies, it will fall apart. Then it will reform, you will hear thunder, then it will have a unique fire until it is back up.

Where to begin[edit | edit source]

  1. Open up the CS
  2. When it's done loading, we shall create the creature
  3. Go in the Creatures->Undead Tab. Find Skeleton under the undead tab
  4. Right click on any CreatureSkeleton, and hit Edit. For example, if you want an archer, select CreatureSkeletonArcher and right click. It's up to you. I prefer something weak and unarmed, because he comes back endlessly and blood skeletons from castlevania were unarmed.
  5. Anyway, for now, just change the ID to something like AaaBloodSkeleton(aaa so it's on the top)
  6. When it asks to create a new form, say yes.

Now we shall make the script[edit | edit source]

Go under Gameplay->Edit Scripts. A little text thingy will pop up. Go under File->New and we must first define our scriptname. Make sure Script Type is Object (tab in edit script box)

scn AaaBloodSkeletonsScript

now that that's defined, we can begin. When he dies, we want the script to commence. So, we are going to use the OnDeath command.

begin OnDeath

so, so far it should look like

scn AaaBloodSkeletonsScript

begin OnDeath

Good. We defined the scriptname and the command. Now, we want the "Unholy Fire" so, now we add....

PlayMagicShaderVisuals effectSummonMythicDawn 5

This line tells us that the unholy fire will last approx. 5 seconds. Just enough time to get up. Here's what we got so far

scn AaaBloodSkeletonsScript

begin OnDeath
    PlayMagicShaderVisuals effectSummonMythicDawn 5

Giggity. We got the unholy fire going. Now we need to state the thunder sound next.

PlaySound AMBThunder

This plays the thunder. (Obviously)

scn AaaBloodSkeletonsScript

begin OnDeath
    PlayMagicShaderVisuals effectSummonMythicDawn 5
    PlaySound AMBThunder

Now, I know what you are thinking. STOP BABYING US AROUND JACKMIX! Heheh....We only have to define the resurrection. We cant just type resurrect, because then he will magically disappear\reappear. Then tell the script to end. In the resurrect, the 1 is causing him to come back together.

The final, full script[edit | edit source]

Note: Do not add the *(OneSpace)

scn AaaBloodSkeletonsScript
*(one space)
begin OnDeath
   PlayMagicShaderVisuals effectSummonMythicDawn 5
   PlaySound AMBThunder
   Resurrect 1
end

See? It's really not that hard to script, is it?

Now, we are almost done.

Go back under Creatures->Undead->Skeleton. Select the one we created earlier, (AaaBloodSkeleton) and under the script tab select the dots (elipses) and choose AaaBloodSkeletonsScript. Now, he is linking to his script! Congratulations!

But, there is one more thing....how will we get him to appear?

There are a number of things you could do....

  1. Highlight your mouse over the Blood Skeleton's ID name in the Skeleton tab (aaabloodskeleton) and jot down those numbers and letters that come down eventually.. Then go in-game and go in the console and type player.placeatme (hex code for creature)
  2. Make a script on a ring\amulet\whatever that summons him

I recommend one, because then you would have to do the same thing with the ring.

I shall edit this with a script for number two, my time is becoming thin.

Have fun with your skelly, play nice you hear?

Oh, one last thing. If you have a question, I'm at the Elder Scrolls forums just PM me :)