Talk:Begin

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

--Dev akm 16:34, 18 September 2007 (EDT) : Is there a separate chart somewhere showing which block types are valid on which objects? Seems like this would be fairly important information.

-- Grey: Note that it is yet to be found out if the game will run several blocks of the exact same type. This could be useful for long scripts that require a certain order in which elements should be executed; probably in combination with return. Also there probably some block types accessing information that cannot otherwisely be attained, i.e. through if-condition(s).

--Kkuhlmann 14:50, 17 April 2006 (EDT): Using multiple duplicate block types should work just fine. Block flags are not cleared until the script is finished processing, so multiple blocks (i.e. two OnAdd blocks) should work just fine.

Note on operators[edit source]

Also note that when using valid block types you are also allowed to use operators as part of the Begin command. Whether it makes sense or not depends on the particular situation.


I took the liberty of removing this evidently wrong information.

Here's my analysis:

http://www.elderscrolls.com/forums/index.php?showtopic=381945&st=0&p=5742828&#entry5742828

--JOG 14:47, 17 April 2006 (EDT)

--Kkuhlmann 14:52, 17 April 2006 (EDT): You're correct. Using operators in a begin block will never work. That it compiles is ... surprising... but meaningless. As every programmer should know, just because something compiles, doesn't mean it will work...


Unless I'm completely off my rocker, theres a limit to the number of Begin blocks you can have in a script. I had a script with about 350 lines and 8000 characters including spaces, which is much less than the approximate script limit, but the script didn't compile until I reduced the number of Begin blocks from 36 to 16. I checked all of the blocks beforehand and they were all good to go (the blocks were OnMagicEffectHit blocks with each one specifying a different magiceffectID). I'm not sure how many blocks the limit is, since I simply removed 20 all at once, but I do believe that there is a limit.--Omzy 14:06, 4 June 2007 (EDT)

There must be more to the story. A script consisting of 40+ empty gameMode or onMagicEffectHit FIDG blocks compiles fine. Scruggs 16:30, 4 June 2007 (EDT)

I'm sorry, I said compile but I meant execute. In game, the script doesn't run, but the code compiles fine.--Omzy 17:12, 4 June 2007 (EDT)