Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Hey all, i need help with a scriot i was given


DaMage
 Share

Recommended Posts

okay, a while back i was givent the following script by WillieSea, and it has worked fine, up until today when i started fiddling with it recently, now its stopped again. i tried restarting from his orginal script, but even then it didnt work. if someone here, or Williesea, could help it would be much apperiated as it the final thing to do on the LSotA patch.

thanks aa_biggrin.gif

scn ASCutscenestarterscriptshort triggeredfloat timerbegin onTrigger playerif triggered == 0set triggered to 1endifendbegin GameMode	if triggered > 0		if timer > 0			set timer to timer - GetSecondsPassed			return		endif	if triggered == 1		ASEndlight01.enable		set timer to 2		set triggered to 2	elseif triggered == 2		ASEndlight02.enable		set timer to 2		set triggered to 3	elseif triggered == 3		ASEndlight03.enable		set timer to 2		set triggered to 4	elseif triggered == 4		ASEndlight04.enable		set timer to 2		set triggered to 5	elseif triggered == 5		ASEndlight05.disable		set triggered to 0	endifendifend
Link to comment
Share on other sites

In the first block, I believe you "Begin On Activate"  -  On Trigger will not work AFAIK.

Also within the same triggering block I thnk you create a loop. I think you want a DoOnce in that block.  

like this:

scn ASCutscenestarterscriptshort doneshort triggeredfloat timerbegin onactivate if triggered == 0 && done == 0 set triggered to 1set done to 1endifendbegin GameMode	if triggered > 0 && done == 1		if timer > 0			set timer to timer - GetSecondsPassed			return		endif	if triggered == 1		ASEndlight01.enable		set timer to 2		set triggered to 2	elseif triggered == 2		ASEndlight02.enable		set timer to 2		set triggered to 3	elseif triggered == 3		ASEndlight03.enable		set timer to 2		set triggered to 4	elseif triggered == 4		ASEndlight04.enable		set timer to 2		set triggered to 5	elseif triggered == 5		ASEndlight05.disable		set triggered to 0      set done to 2	endifendifend

Hope it helps!

Link to comment
Share on other sites

The 'OnTrigger' only works on TriggerZone objects reliably. What object are you attaching the script to?

They may not work on other objects, at least not reliably.

@Grond, adding the second "control variable" of 'done' does not do any good. The variable 'triggered' will work fine.

Plus, your script will only run once, since you never reset 'done' back to '0'.

Answer me question DaMage, and we will debug this issue.

Link to comment
Share on other sites

yeah, its on a trigger zone. however, now that you mention it....i have an idea of what went wrong, its stupid but i have done it before.

well i did screw up, the trigger wasnt accessiable, but when i moved it into to place i found a new error.

the first 4 lights turn on, but the fifth doesnt. its weird. the fifth also has a number of fires childled to it, so because it doesnt enable, neither do they.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...