Help with a script
Moderators: Haplo, Lead Developers
- Meritocrat
- Member
- Posts: 25
- Joined: Mon Aug 17, 2009 12:31 am
Help with a script
I guess this is technically related to TR as it is for my showcase, but I decided to post it here anyway. I'm relatively new to modding, and I need some help with making a script that makes something attack you in your sleep a la Dark Brotherhood from tribunal, and preferably only while out in the wilderness and maybe even only at night. I've looked at the script for the Dark Brotherhood assassin but me no understand. Anyone who can help me?
Moved from OTD to here.
You might get more views this way. In terms of your question, how much do you understand about the scripting language? If you don't get much, I can recommend looking up GhanBuriGhan's Morrowind Scripting for Dummies. It's how I learned, and it's a great resource.
You might get more views this way. In terms of your question, how much do you understand about the scripting language? If you don't get much, I can recommend looking up GhanBuriGhan's Morrowind Scripting for Dummies. It's how I learned, and it's a great resource.
"You can remove spells from your list in Morrowind. I think it was shift-click, don't quote me on that though." - Cathartis
|[url=http://tinyurl.com/mnbsqv]Forum Rules[/url]
|[url=http://tinyurl.com/mj594z]Moratorium[/url]
| [url=http://tinyurl.com/6msxag]Writing for TR[/url]
|[url=http://tinyurl.com/mnbsqv]Forum Rules[/url]
|[url=http://tinyurl.com/mj594z]Moratorium[/url]
| [url=http://tinyurl.com/6msxag]Writing for TR[/url]
- Bloodthirsty Crustacean
- Developer Emeritus
- Posts: 3869
- Joined: Fri Feb 02, 2007 7:30 pm
- Location: Elsewhere
I don't know the full script, and am a bit busy to write it all out exactly for you right here, but what you'd want to do is along these lines:
The bit about cities makes it practically undesirable. I'm not sure if it would accept region names, but you might be able to save a few lines by going for "Bitter Coast Region" == 1 instead.
This would need to be on a StartScript (global script). So create your script, then go to Gameplay->Start Scripts, and add you script there.
Code: Select all
If ( PCSleeping == 1 )
If ( GetCell "Balmora" == 0 )
If ( GetCell "every other city" == 0 )
...
If ( GameHour >= 8 )
PlaceAtPC "scary monster" 1 0 20 0
Elseif ( GameHour < 6 )
PlaceAtPC "scary monster" 1 0 20 0
Endif
...
Endif
Endif
Endif
The bit about cities makes it practically undesirable. I'm not sure if it would accept region names, but you might be able to save a few lines by going for "Bitter Coast Region" == 1 instead.
This would need to be on a StartScript (global script). So create your script, then go to Gameplay->Start Scripts, and add you script there.
a man builds a city
with Banks and Cathedrals
a man melts the sand so he
can see the world outside
"They destroyed Morrowind? Fiddlesticks! Now we're going to have to rebuild it again!"
with Banks and Cathedrals
a man melts the sand so he
can see the world outside
"They destroyed Morrowind? Fiddlesticks! Now we're going to have to rebuild it again!"
- Meritocrat
- Member
- Posts: 25
- Joined: Mon Aug 17, 2009 12:31 am
I believe Morrowind had the If (GetInterior == 0) or If (IsInterior == 0) command. Try that.
"You can remove spells from your list in Morrowind. I think it was shift-click, don't quote me on that though." - Cathartis
|[url=http://tinyurl.com/mnbsqv]Forum Rules[/url]
|[url=http://tinyurl.com/mj594z]Moratorium[/url]
| [url=http://tinyurl.com/6msxag]Writing for TR[/url]
|[url=http://tinyurl.com/mnbsqv]Forum Rules[/url]
|[url=http://tinyurl.com/mj594z]Moratorium[/url]
| [url=http://tinyurl.com/6msxag]Writing for TR[/url]
Yes it did:Nanu wrote:I believe Morrowind had the If (GetInterior == 0) or If (IsInterior == 0) command. Try that.
Code: Select all
Begin mylittleboohooscriptthatannoystheplayer
short doOnce
if ( GetPCSleeping == 1 )
if ( doOnce == 0 )
if ( Random100 <= 25 ) ;you don't want it all the time do you?
set doOnce to 1 ;attack!!!
else
set doOnce to 2
endif
endif
if ( GetInterior == 0 )
if ( Gamehour >= 20 )
if ( Gamehour <= 6 )
if ( doOnce == 1 )
PlaceAtPC "scary monster" 1 1 128 0
WakeUpPC
endif
endif
endif
endif
else
if ( doOnce != 1 )
set doOnce to 0
endif
endif
end
- Bloodthirsty Crustacean
- Developer Emeritus
- Posts: 3869
- Joined: Fri Feb 02, 2007 7:30 pm
- Location: Elsewhere
- Meritocrat
- Member
- Posts: 25
- Joined: Mon Aug 17, 2009 12:31 am