Difference between revisions of "Talk:If"

Jump to navigation Jump to search
173 bytes removed ,  22:23, 10 August 2009
imported>DragoonWraith
imported>DragoonWraith
Line 144: Line 144:
::Thanks a lot - I put it first cause others were more or less incorporated in the article (clean up maybe ?) - No time now (sigh) - I was wondering if a thing like <tt>refVar.GetContainer.GetIsID CreatureRat</tt> is a valid expression - there is no article on Expressions that is. I guess it isn't. I know about the player thingy - now, to be exact (read anal) : <tt>"'''''refVar.'''''GetIsID CreatureRat" is better than using "refVar == CreatureRat"</tt> - if I got it right. Ah and what about quoted hex FormIds ? Thanks :) [[User:UDUN|UDUN]] 16:57, 10 August 2009 (EDT)
::Thanks a lot - I put it first cause others were more or less incorporated in the article (clean up maybe ?) - No time now (sigh) - I was wondering if a thing like <tt>refVar.GetContainer.GetIsID CreatureRat</tt> is a valid expression - there is no article on Expressions that is. I guess it isn't. I know about the player thingy - now, to be exact (read anal) : <tt>"'''''refVar.'''''GetIsID CreatureRat" is better than using "refVar == CreatureRat"</tt> - if I got it right. Ah and what about quoted hex FormIds ? Thanks :) [[User:UDUN|UDUN]] 16:57, 10 August 2009 (EDT)


:::OK, some things. You are correct, I should have used <tt>refVar.GetIsID CreatureRat</tt> there. Second, no, you cannot "stack" functions like that (sadly), so you need to do something like <tt>set refVarContainer to refVar.GetContainer / if ( refVarContainer.GetIsID CreatureRat )</tt>. Note that OBSE v0018 has changed this ''somewhat'', though I must admit that I'm not fully up to date on how far that goes. I know it allows something like <tt>(function (anotherFunction argument))</tt>, where the return value of "anotherFunction" is used as the argument for "function". Not sure (actually, I tend to doubt) if it extends to references the way you're indicating.
:::OK, some things. You are correct, I should have used <tt>refVar.GetIsID CreatureRat</tt> there. Second, no, you cannot "stack" functions like that (sadly), so you need to do something like <tt>set refVarContainer to refVar.GetContainer / if ( refVarContainer.GetIsID CreatureRat )</tt>. Note that OBSE v0018 has changed this ''somewhat'', though I must admit that I'm not fully up to date on how far that goes. I know it allows something like <tt>(function (anotherFunction argument))</tt>, where the return value of "anotherFunction" is used as the argument for "function". Not sure (actually, I tend to doubt) if it extends to references the way you're indicating. Actually, I'm not even sure if it's only for specific functions added in v0018, or if they managed to extend it to all functions.


:::Also, make sure to read [[Modding Terminology]] - ''very'' important when dealing with references and base forms like you are. The distinction between the two is not always clear, but it is very important.
:::Also, make sure to read [[Modding Terminology]] - ''very'' important when dealing with references and base forms like you are. The distinction between the two is not always clear, but it is very important.


:::As for "quoted hex FormIds", what do you mean? The only time you should ever be worrying about the actual numerical FormID is when you're using the console. In scripts, you can use the EditorID; the compiler will automatically insert the appropriate FormID when you save. EditorIDs are just massively easier to read, so even though FormIDs will ''work'', it's a really bad idea to use them. You do need them in the console, because most of the EditorIDs aren't actually loaded during runtime - only Quest and Reference IDs, IIRC. (actually, I suppose you would also need to know FormIDs for GetFormFromMod, an OBSE function).
:::As for "quoted hex FormIds", what do you mean? The only time you should ever be worrying about the actual numerical FormID is when you're using the console. In scripts, you can use the EditorID; the compiler will automatically insert the appropriate FormID when you save. EditorIDs are just massively easier to read, so even though FormIDs will ''work'', it's a really bad idea to use them. You do need them in the console, because most of the EditorIDs aren't actually loaded during runtime - only Quest and Reference IDs, IIRC. (actually, I suppose you would also need to know FormIDs for GetFormFromMod, an OBSE function).
:::[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 23:22, 10 August 2009 (EDT)
:::[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 23:22, 10 August 2009 (EDT)
:::[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 23:22, 10 August 2009 (EDT)

Navigation menu