| 01-20-2009, 12:27 AM | #1 |
Like the title says, is it possible to make your own player unit event variable that actually runs an action, i have tried this and it just gives me a fatal error. JASS:library ItemEx initializer InitTrig globals playerunitevent EVENT_PLAYER_UNIT_DROP_ITEM_EX endglobals public function C2I takes code c returns integer return c return 0 endfunction private function DropItem takes nothing returns unit call BJDebugMsg("yay") return GetTriggerUnit() endfunction private function InitTrig takes nothing returns nothing set EVENT_PLAYER_UNIT_DROP_ITEM_EX = ConvertPlayerUnitEvent(C2I(function DropItem)) endfunction endlibrary I also have no idea how ConvertPlayerUnitEvent works if you can't tell already. |
| 01-20-2009, 12:30 AM | #2 |
no its totally NOT possible ... the integer parameter of the ConvertPlayerUnitEvent determines what kind of event it is ....and those are hardcoded .. |
| 01-20-2009, 12:31 AM | #3 |
You have no idea what you're doing, do you? |
| 01-20-2009, 12:35 AM | #4 | |
Quote:
Just trying out something new. |
