Difference between revisions of "Inter-mod Communication"
m
Corrected an obvious cut-and-paste error.
imported>Docclox m (→How To Get A Form From Another Mod: The example was wrong - Form cannot be cast as Actor. I've fixed it.) |
imported>Docclox m (Corrected an obvious cut-and-paste error.) |
||
(One intermediate revision by one other user not shown) | |||
Line 117: | Line 117: | ||
; We can't use the normal "as" operator, because that would add a dependency on the other mod. | ; We can't use the normal "as" operator, because that would add a dependency on the other mod. | ||
; So instead we use the CastAs function to make sure we're pointing at the right script. | ; So instead we use the CastAs function to make sure we're pointing at the right script. | ||
ScriptObject bfVendor = | ScriptObject bfVendor = aVendor.CastAs("BeginningFantasyVendor") | ||
; Now set the properties, again, we don't need to cast because our parameter values are | ; Now set the properties, again, we don't need to cast because our parameter values are | ||
Line 182: | Line 182: | ||
Var[] params = new Var[1] | Var[] params = new Var[1] | ||
params[0] = actorThatEntered | params[0] = actorThatEntered | ||
relayScript.CallFunction("RegisterForSummon", | relayScript.CallFunction("RegisterForSummon", params) | ||
endIf | endIf | ||
endEvent | endEvent |