User:EAi/Tasks: Difference between revisions
< User:EAi
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
A proposed way to expose tasks to scripts, and perhaps allow network syncing. Hasn't really been fully explored... | |||
<task name="CTaskComplexDriveToPoint" parent="CTaskComplexCarDrive"> | <task name="CTaskComplexDriveToPoint" parent="CTaskComplexCarDrive"> | ||
<constructor address="0x1234567"> | <constructor address="0x1234567"> | ||
Line 7: | Line 9: | ||
</constructor> | </constructor> | ||
<members> | <members> | ||
<variable name="target" type="vector" /> | <variable name="target" type="vector" sync="true" /> | ||
<variable name="mode" type="integer" /> | <variable name="mode" type="integer" /> | ||
<padding length="4" /> | <padding length="4" /> | ||
Line 18: | Line 20: | ||
</functions> | </functions> | ||
</task> | </task> | ||
This file would generate some interface for lua to create these tasks, set the members and call their functions. It should also let these things be mapped to gta classes (using the addresses). The order of the members and constructor params matters. The members directly lay out the order of members in the class and hence has to match exactly. | |||
Implementation is probably a 2-3 days work and if implemented well some aspects could be used to help export other game-level functions. |
Latest revision as of 22:01, 20 March 2009
A proposed way to expose tasks to scripts, and perhaps allow network syncing. Hasn't really been fully explored...
<task name="CTaskComplexDriveToPoint" parent="CTaskComplexCarDrive"> <constructor address="0x1234567"> <param name="vehicle" type="vehicle" /> <param name="target" type="vector" /> <param name="cruiseSpeed" type="float" /> ... </constructor> <members> <variable name="target" type="vector" sync="true" /> <variable name="mode" type="integer" /> <padding length="4" /> <variable name="hasAchievedTarget" type="bool" /> </members> <functions> <function name="isTargetBlocked" address="0x12345678"> <param name="ped" type="ped" /> </function> </functions> </task>
This file would generate some interface for lua to create these tasks, set the members and call their functions. It should also let these things be mapped to gta classes (using the addresses). The order of the members and constructor params matters. The members directly lay out the order of members in the class and hence has to match exactly.
Implementation is probably a 2-3 days work and if implemented well some aspects could be used to help export other game-level functions.