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...

Lightning Storm Code Problems


JulianSull
 Share

Recommended Posts


scn aaaZWLightningStormScript


short timer

float fQuestDelayTime

short percento


begin GameMode


message "What?" ;<-----Doesn't activate even once.


set fQuestDelayTime to 1

set timer to timer + GetSecondsPassed


if (timer > 3)

	set percento to 1 + (0.16 * GetRandomPercent)

	if (percento == 1)

		aaaBoltArea.MoveToMarker bolt0

	else if (percento == 2)

		aaaBoltArea.MoveToMarker bolt2

	else if (percento == 3)

		aaaBoltArea.MoveToMarker bolt3

	else if (percento == 4)

		aaaBoltArea.MoveToMarker bolt4

	else if (percento == 5)

		aaaBoltArea.MoveToMarker bolt5

	else if (percento == 6)

		aaaBoltArea.MoveToMarker bolt6

	else if (percento == 7)

		aaaBoltArea.MoveToMarker bolt7

	else if (percento == 8)

		aaaBoltArea.MoveToMarker bolt8

	else if (percento == 9)

		aaaBoltArea.MoveToMarker bolt9

	else if (percento == 10)

		aaaBoltArea.MoveToMarker bolt10

	else if (percento == 11)

		aaaBoltArea.MoveToMarker bolt11

	else if (percento == 12)

		aaaBoltArea.MoveToMarker bolt12

	else if (percento == 13)

		aaaBoltArea.MoveToMarker bolt13

	else if (percento == 14)

		aaaBoltArea.MoveToMarker bolt14

	else if (percento == 15)

		aaaBoltArea.MoveToMarker bolt15

	else if (percento == 16)

		aaaBoltArea.MoveToMarker bolt16

	endif


	set timer to 0

	aaaBoltStart.Cast aaaLightningBolt aaaBoltArea


endif


end

The message call at the beginning doesn't even activate. What is going on here? This is suppose to shoot lightning bolts down from the sky every three seconds at a random location constantly. This is a quest script. No errors are generated when saving the script nor in game. Nothing is generated really. At all.

Link to comment
Share on other sites

Well I tried a few things and here's what happened:

1) I tried putting this quest script into another quest script of mine that I knew was working but when it was finally in, that quest script stopped working as well. When I finally took my script out of that script, it began working again.

The only thing I can think of is maybe there is a limit to how many else if cases you can have in a script before it says "I'm not doin' that".

EDIT: The above line is true and annoying.

Edited by JulianSull
Link to comment
Share on other sites

Well, your script is foobar, now that I look at it closer.

You have 17 IF statements and only 1 ENDIF statement.

Take the space out from between the 'Else If' statements and make it just 'Elseif'.

There is no limit on the number of ELSEIF you can have, but there IS a limit on the number of nested IF's you can have, which you have gone over.

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...