Difference between revisions of "User talk:Elei-Mi-Shill"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>Elei-Mi-Shill
imported>Qazaaq
(→‎Questions: lots of explaining)
Line 6: Line 6:


:For reference, do you know how much I struggled against the OnAdd BlockType (event) in order to get the scripted item reference? And still I have to use the OnActivate BlockType (event) 'cause I didn't find a solution iet
:For reference, do you know how much I struggled against the OnAdd BlockType (event) in order to get the scripted item reference? And still I have to use the OnActivate BlockType (event) 'cause I didn't find a solution iet
::This is something that is much less related to blocktypes than you may think. How functions like [[GetSelf]] and [[GetContainer]] behave is entirely dependent on what type of form the script runs on. If it's a [[reference]], GetSelf will return the reference it's currently running on. If it's an inventory object then GetContainer will return the reference that contains this inventory object. GetSelf will of course return nothing in this case, because the script doesn't run on a reference. This has little to do with the blocktypes, code in a [[GameMode]] block can run on a reference and on an inventory object; the response of these functions depends on which type of form the script is currently running.
::It's true that some blocktypes only make sense on certain types of forms. Adding an [[OnEquip]] block to a [[Activator]] makes little sense, but if that makes you happy, go ahead. You can put a GetContainer call inside that OnEquip block and still no one will complain. But the code will never be run, because when the script is evaluated the form is never in a state of being equipped.
::Also, I don't think events would be a better name. With an event you assume something happens, but a block(type) doesn't happen. It's a statement that describes the situation in which the code block is valid and should be executed. Just like an [[if]]-statement. The entire script is evaluated when an object is processed, but only the lines in the appropriate blocks are executed.
::I think I understand what you mean, but this information should be available on the [[GetSelf]] and [[GetContainer]] pages, not on each blocktype page. I know exactly how those functions should behave, and as far as I'm concerned the function pages describe their behavior perfectly fine. If you disagree (I think you do) I ask you to make the changes you consider necessary. Assuming you now know everything you need to know.
::--[[User:Qazaaq|Qazaaq]] 18:45, 2 August 2009 (EDT)

Revision as of 17:45, 2 August 2009

Questions

Please don't put questions on the article itself, put them on the Discussion page (see Discussion tab at the top). I moved (and answered) your question on the OnAdd page.
--Qazaaq 06:43, 2 August 2009 (EDT)

You misunderstood I think. It's not about the question itself, it's about the lack of infos in the page. When you use a Blocktype (it's better to call it EVENT), you should also say how some other functions works with it! In example getSelf (really usefull) and getContainer. And it's not an info to add in a discussion, but something worth putting in the main article!
For reference, do you know how much I struggled against the OnAdd BlockType (event) in order to get the scripted item reference? And still I have to use the OnActivate BlockType (event) 'cause I didn't find a solution iet
This is something that is much less related to blocktypes than you may think. How functions like GetSelf and GetContainer behave is entirely dependent on what type of form the script runs on. If it's a reference, GetSelf will return the reference it's currently running on. If it's an inventory object then GetContainer will return the reference that contains this inventory object. GetSelf will of course return nothing in this case, because the script doesn't run on a reference. This has little to do with the blocktypes, code in a GameMode block can run on a reference and on an inventory object; the response of these functions depends on which type of form the script is currently running.
It's true that some blocktypes only make sense on certain types of forms. Adding an OnEquip block to a Activator makes little sense, but if that makes you happy, go ahead. You can put a GetContainer call inside that OnEquip block and still no one will complain. But the code will never be run, because when the script is evaluated the form is never in a state of being equipped.
Also, I don't think events would be a better name. With an event you assume something happens, but a block(type) doesn't happen. It's a statement that describes the situation in which the code block is valid and should be executed. Just like an if-statement. The entire script is evaluated when an object is processed, but only the lines in the appropriate blocks are executed.
I think I understand what you mean, but this information should be available on the GetSelf and GetContainer pages, not on each blocktype page. I know exactly how those functions should behave, and as far as I'm concerned the function pages describe their behavior perfectly fine. If you disagree (I think you do) I ask you to make the changes you consider necessary. Assuming you now know everything you need to know.
--Qazaaq 18:45, 2 August 2009 (EDT)