Starting to learn scripting, need some explaination

Post » Tue Jan 04, 2011 1:43 am

Ok i need some explaination on how the script in DLC frostcrag spire work.

Here is the script on the door:

scn FrostcragSpireHiddenDoorSCRIPT01

short open
short dustFall
ref mySelf
ref myTarget
float timer
short open
short busy

begin onActivate

set mySelf to getSelf
set myTarget to getParentref

if isActionRef player == 0
if open == 0
mySelf.pms effectshockshield
playgroup forward 0
set open to 1
set timer to 1
set busy to 1
endif
endif
end


begin gameMode

if open == 1
if timer > 0
set timer to timer - getsecondspassed
endif

if timer <= 0 && dustFall == 0
myTarget.activate mySelf 1
set dustFall to 1
endif
endif

; Get rid of effect when wall stops moving
if busy == 1 && IsAnimPlaying == 0
mySelf.sms effectshockshield
set busy to 0
endif

end





I anolysed the script, but i dont really understand how it work. How the door move? I see no founction that can move object in the script.
User avatar
Leonie Connor
 
Posts: 3434
Joined: Mon Mar 12, 2007 4:18 pm

Post » Tue Jan 04, 2011 2:26 am

Also is there a way to see in the construction set by wich item a script is used? Like i saw a script for display case in frost crag spire. Because as far as i know, there is no display case in frostcrag spire.
So i want to see what use that script. Actually, im anolysing how that DLC work, since its the best DLC, (not expansion...). There is door that move, teleport pad... So anolysing it will help a lot for creating. Also, i saw in the construction set that the small circle around the frozen atronach are teleport pad, i checked the script, but i did not saw nothing that use these teleporter to teleport the player...
the teleporter i talk about is at the entrace and is named: FrostCragTeleport01
User avatar
Charlotte Henderson
 
Posts: 3337
Joined: Wed Oct 11, 2006 12:37 pm

Post » Tue Jan 04, 2011 11:04 am

I anolysed the script, but i dont really understand how it work. How the door move? I see no founction that can move object in the script.

It's this one:
http://cs.elderscrolls.com/constwiki/index.php/PlayGroup forward 0


No CS here, and besides that not well practiced in anolyzing *.esps therefore can't anwer your second post. :(
User avatar
GabiiE Liiziiouz
 
Posts: 3360
Joined: Mon Jan 22, 2007 3:20 am

Post » Mon Jan 03, 2011 7:50 pm

how can i know if playgroup forward will move the door up or down or make it rotate or disapear or anything else? I did not find anything in the CS about the group forward except in the script. And in the link you posted, it look like playgroup are for actor, it dont talk anything about object. And in the CS, if i go to animation section in gameplay---------> idle section, i see only npc thing
User avatar
Batricia Alele
 
Posts: 3360
Joined: Mon Jan 22, 2007 8:12 am

Post » Mon Jan 03, 2011 11:58 pm

You use NIFSCOPE to see the animation group names that play on objects. The animation is NOT in the CS, its part of the object.

All doors can use playgroup. And if its a true door object and not an activator object, you can also use SetOpenState on it in a script.

The teleport pads are probably doors and use the normal door object teleporting.

You can look at the 'script column' in the object window for the script. If you click the column title, it will sort by that column making it easier to find.
User avatar
Claire Jackson
 
Posts: 3422
Joined: Thu Jul 20, 2006 11:38 pm

Post » Tue Jan 04, 2011 8:22 am

Ok if i want to make something happen when i cast a spell on an object, static or anything else, maybe an armor.

How do i do that.

I know i need to attach the script to the object.
If i want to transform a glass armor to a blue glass armor using a frost spell (i will rename the glass to make a copy, then apply a blue texture, then in the script to transform it, i will link the the new object)
How can i do that.

How can i make thing react to spell or other effect, how to replace an object with another one at exact location, with exact setting, and only when not equiped???
User avatar
JAY
 
Posts: 3433
Joined: Fri Sep 14, 2007 6:17 am

Post » Mon Jan 03, 2011 9:35 pm

You may want to have a look http://cs.elderscrolls.com/constwiki/index.php/Category:Scripting_Tutorials. The spell tutorials will be of particular interest to you. You are wanting to do enough specialized scripting work for your mod that it is a better use of a time for you to just learn on your own. The payoff is worth it. :)
User avatar
Gill Mackin
 
Posts: 3384
Joined: Sat Dec 16, 2006 9:58 pm


Return to IV - Oblivion