Remedial scripting issue

Post » Sat May 28, 2011 5:47 pm

Admittedly, I'm no scripter. I'm trying to wright a simple script to have a switch enable and disable some references, simultaneously. I've ben able to wright or, should I say edit existing scripts to get me half way there. I've altered the vanilla enable and, disable, on player enter trigger script but, it doesn't fully work the way I want.

What I'm trying to do, I have a switch, when the player toggles the switch, I would like enabled ref's to be disbanded and, the ones i've set to initially disabled to turn on. I've set up my switch linked to an Xmarker, which has several ref's linked to it by, "Activating parent." (or whatever it's really called.) My script works to ether turn them off or, on but, it doesn't seem to matter if I've set a ref to initially disabled or not. Meaning, anything I've set to initially disabled aren't "initially disabled" They are always showing. :brokencomputer:

Here is my feeble attempt at my script, I couldn't find a suitable vanilla one, not saying it doesn't exist.

scn DCIntWLESwitchPlayerDisablesSCRIPT; This Switch is triggered by the player only and Disables its Linked ref.  ; This Switch only gets triggered once.ref targetshort doOnceBegin onActivate	if doOnce == 0		set target to getLinkedRef		target.disable		set doOnce to 1		;Switch is only set off one time		endifEnd



I thought when things were activated by an Xmarker it would affect both enabled and, initially disabled ones.

am I just making a dumb mistake?

thanks for any assistance.

Cev
User avatar
Neko Jenny
 
Posts: 3409
Joined: Thu Jun 22, 2006 4:29 am

Post » Sat May 28, 2011 12:38 pm

You need to use the 'Enable Parent' tab on all the objects linking to the enable/disable state of the xmarker. There is also an optional check box on that tab for 'set opposite enable state'. So you can catch both with one xmarker.
User avatar
Emma-Jane Merrin
 
Posts: 3477
Joined: Fri Aug 08, 2008 1:52 am

Post » Sat May 28, 2011 11:45 pm

You need to use the 'Enable Parent' tab on all the objects linking to the enable/disable state of the xmarker. There is also an optional check box on that tab for 'set opposite enable state'. So you can catch both with one xmarker.


Thank you,

I forgot about that check box. :brokencomputer:


cev

Edit:

Williesea,

Thanks again, Yep, I forgot the checkbox, problem solved. :facepalm:

I wasted two hours banging my head against the wall for such a minor issue. :banghead:

I appreciate you pointing out my stupidity. :rofl: If the moderators want to close this, it's fine with me, problem solved.

cev
User avatar
chloe hampson
 
Posts: 3493
Joined: Sun Jun 25, 2006 12:15 pm


Return to Fallout 3