Simple script help

Post » Tue Apr 27, 2010 8:30 am

Hello. I am wondering i have tried to get this to work but it doesn't seem to wanna. I am working on a vault style mod im not too worried about big scripts but i have placed a room that is similar to the overseers office with the secret exit under the desk but as i tried to copy the script on the console i believe it was (reference id).setopenstate to 1 or what ever but when i copy that script from the vault 101 desk and place it on my console and change the reference to my reference it then says it has no idea what the script is anymore. Can anybody help me. i have fose and fomm i know it's that set openstate to 1 or 0 because when in game playing i go to the console and click my desk and type setopenstate 1 it then opens?
I've tried various scripts but not sure if it's my thing. I will example a script i tried making here.

On door switch
begin on activate
activate (referenceid)
end

on desk
begin on activate
(reference id).setopenstate to 1
end

shouldn't it be something like that but i get an error saying that it doesn't know what (reference id).setopenstate 1 is? Please help
User avatar
MarilĂș
 
Posts: 3449
Joined: Sat Oct 07, 2006 7:17 am

Post » Tue Apr 27, 2010 1:58 pm

Hi there,

Are you just typing (referenceid) and not giving it a name?

If so, you`d have to give the door a Reference Id, then check the persistant reference box, this tells the game what (referenceid) is. You do this by double clicking the item in GECK render window and adding a reference ID to the top typing box.

Also, OnActivate has no space inbetween on and Activate.

Hope that helps.

Skykappa
User avatar
Zoe Ratcliffe
 
Posts: 3370
Joined: Mon Feb 19, 2007 12:45 am

Post » Tue Apr 27, 2010 5:13 pm

Yea no space. Its Begin OnActivate. What Begin On Activate would tell it, is to begin the block, when On occurs (which isnt a funtion) only when 'activate' is the one doing it. So for it to run, 'Activate' would have to 'On' the object the script is attached too. Which makes no sense. Whereas you can use Begin OnActivate Player. This tells it to start, when activated, only by the player. That makes more sense. Leaving the slot of 'player' blank makes it run no matter who or what is activating it.
User avatar
City Swagga
 
Posts: 3498
Joined: Sat May 12, 2007 1:04 am

Post » Tue Apr 27, 2010 7:16 am

Also, its not "activate (referenceid)"
It is "RefID.Activate"
User avatar
Isabell Hoffmann
 
Posts: 3463
Joined: Wed Apr 18, 2007 11:34 pm

Post » Tue Apr 27, 2010 2:52 pm

Yea i was just in a rush to type it and yea i have my reference id is 111maindoor01 and it's in the activator section
Hi there,

Are you just typing (referenceid) and not giving it a name?

If so, you`d have to give the door a Reference Id, then check the persistant reference box, this tells the game what (referenceid) is. You do this by double clicking the item in GECK render window and adding a reference ID to the top typing box.

Also, OnActivate has no space inbetween on and Activate.

Hope that helps.

Skykappa

User avatar
Miranda Taylor
 
Posts: 3406
Joined: Sat Feb 24, 2007 3:39 pm

Post » Tue Apr 27, 2010 12:26 pm

Strating ref IDs with numbers is a no no.
User avatar
Marnesia Steele
 
Posts: 3398
Joined: Thu Aug 09, 2007 10:11 pm

Post » Tue Apr 27, 2010 1:59 pm

Yea... Make it like MyVaultOverSeersDoor or whatever.
User avatar
Rozlyn Robinson
 
Posts: 3528
Joined: Wed Jun 21, 2006 1:25 am

Post » Tue Apr 27, 2010 8:38 am

Ok is this why the script on the console didn't work? Wow it had to be something easy didn't it.lol well im not home at the moment so i'll give that a try when i get home and post back if it fixes the problem or not. But first can someone please explain what's the difference from these active reference link and activate parents etc because im used to just the linked reference.lol
User avatar
Taylrea Teodor
 
Posts: 3378
Joined: Sat Nov 18, 2006 12:20 am

Post » Tue Apr 27, 2010 10:23 am

Yea no space. Its Begin OnActivate. What Begin On Activate would tell it, is to begin the block, when On occurs (which isnt a funtion) only when 'activate' is the one doing it. So for it to run, 'Activate' would have to 'On' the object the script is attached too. Which makes no sense. Whereas you can use Begin OnActivate Player. This tells it to start, when activated, only by the player. That makes more sense. Leaving the slot of 'player' blank makes it run no matter who or what is activating it.

User avatar
Mario Alcantar
 
Posts: 3416
Joined: Sat Aug 18, 2007 8:26 am

Post » Tue Apr 27, 2010 8:20 am

Yea no space. Its Begin OnActivate. What Begin On Activate would tell it, is to begin the block, when On occurs (which isnt a funtion) only when 'activate' is the one doing it. So for it to run, 'Activate' would have to 'On' the object the script is attached too. Which makes no sense. Whereas you can use Begin OnActivate Player. This tells it to start, when activated, only by the player. That makes more sense. Leaving the slot of 'player' blank makes it run no matter who or what is activating it.

i eventually want to add an npc package later on but i'll stick to basics :)
User avatar
Danel
 
Posts: 3417
Joined: Tue Feb 27, 2007 8:35 pm

Post » Tue Apr 27, 2010 4:32 pm

Ok is this why the script on the console didn't work? Wow it had to be something easy didn't it.lol well im not home at the moment so i'll give that a try when i get home and post back if it fixes the problem or not. But first can someone please explain what's the difference from these active reference link and activate parents etc because im used to just the linked reference.lol


I think you mean Activate Parent and Enable Parent tabs, yes? The Activate Parent tab is used when you want an activator (like a door) to be activated by something else (like when opening a vault gear door by flipping a switch as opposed to just "activating" the door itself). If you set up an activate parent, the activator object will then be activated by the object itself and the parent object. If you check the "Parent Activate Only" flag on the tab, then only the parent will activate it.

The Enable Parent is more or less the same thing except instead of Activating, it enables/disables an object based of the parent's enable state. One way to use this is to set a bunch of lights that have their enable parent set to an Xmarker. Then when you enable the Xmarker, all the lights will be enabled as well (turn on). When you disable the Xmarker, all the lights will be disabled (turn off).
User avatar
Rachel Hall
 
Posts: 3396
Joined: Thu Jun 22, 2006 3:41 pm


Return to Fallout 3