Enable/Disable objects like the Lucky 38

Post » Wed Dec 22, 2010 12:32 pm

Im trying to let the player be able to "clean" up the Goodsprings Gas Station by buying a "Cleaning Pass" from Chet. I have made the Shelves that I want to Disable have a unique Reference Editor ID and marked them Persistent Reference. Looking at the Luck 38's code, it is just an onadd script. Nothing disappears or appears. I dragged in a Shelf from the object list and followed the same steps but made it Initially Disabled. I buy the item from Chet and nothing happens except my bought item is removed.

begin onadd	GSGStilt.disable 1	GSGSStanding.enable 1	removemeend


I have tried disable 1, disable, enable 0. Cant get this to work. Do i need to drag the vanilla objects below, make a new shelf object and put that in for this to work correctly?
User avatar
Nauty
 
Posts: 3410
Joined: Wed Jan 24, 2007 6:58 pm

Post » Wed Dec 22, 2010 4:22 pm

You know what puzzles me is that they have scripts like that on containers. They will never fire.

I'm assuming that you have a script on some token item that gets added to the player's inventory - the cleaning pass?

Try making the swap happen in GameMode

short iAddedbegin onadd Player	set iAdded to 1	returnendBEGIN GameMode	if (iAdded == 0)		return	elseif (iAdded == 1)		GSGStilt.disable		GSGSStanding.enable 0		set iAdded to 2	elseif (iAdded == 2)		set iAdded to 3		removeme	endifEND

User avatar
Mr. Allen
 
Posts: 3327
Joined: Fri Oct 05, 2007 8:36 am

Post » Wed Dec 22, 2010 7:32 am

negative didn't work. your way didnt remove the token so i edited it to just
if (iAdded == 1)                GSGStilt.disable                GSGSStanding.enable 0                removemeendif

that didnt work either, it just removed the token.

all of the lucky 38 stuff is unique objects but if i have to do that for everything i want to remove and add i shall give up. way too much work for a random idea i got (plus talk about bloat!)
User avatar
stevie critchley
 
Posts: 3404
Joined: Sat Oct 28, 2006 4:36 pm

Post » Wed Dec 22, 2010 8:27 am

So GSGStilt and GSGSStanding are persistent references that are placed in the editor, and you gave them these names and clicked the 'persistent reference' box - they are not base objects, right? Because I do this all the time In my mod. If removeme is doing it's thing, then there is something off about the items or their references.
User avatar
louise hamilton
 
Posts: 3412
Joined: Wed Jun 07, 2006 9:16 am

Post » Wed Dec 22, 2010 4:29 pm

ill mess around and see if i can figure out what im doing wrong. Yes the objects are named in the gas station and have persistent reference checked.
User avatar
louise hamilton
 
Posts: 3412
Joined: Wed Jun 07, 2006 9:16 am


Return to Fallout: New Vegas