Entity MaterialFlashInvoke

From CryWiki

Jump to: navigation, search

entity:MaterialFlashInvoke(number, number, number, string [, extra args])

Description

Invokes a flash function on a material.

Arguments

  1. ??? (Seems to be always 0)
  2. Submaterial id (0-based, so if the material layer is 1 in the editor, use 0 here)
  3. ??? (Seems to be always 0)
  4. Function name
  5. Arguments to the function


Example

Lua (example)
local ent = System.GetEntityByName("MySpecialEntity");
ent:MaterialFlashInvoke(0, 5, 0, "flashFunction", "argument", 123);


Notes

For this example you will need an entity with a submaterial on layer 6, which holds a flash animation. Image:MaterialFlashInvoke_Editor_Material.JPG

All it will do is call 'flashFunction("argument", 123)' in the flash file so you can handle it there.

Crysis is using this to show the progress of capturing a factory in powerstruggle. (On the TV's)

Personal tools