Difference between revisions of "0615"
Jump to navigation
Jump to search
| Line 1: | Line 1: | ||
{{OpCode | {{OpCode | ||
| − | | | + | | games = {{Icon|SA}} |
| − | | description = | + | | command = OPEN_SEQUENCE_TASK |
| − | | | + | | description = Opens a sequence task |
| − | | | + | | syntax1 = 0615: define_AS_pack_begin [''var''] |
| + | | p1t = [''var''] | ||
| + | | p1d = Variable to store the handle of the sequence task | ||
| native = [[OPEN_SEQUENCE_TASK]] | | native = [[OPEN_SEQUENCE_TASK]] | ||
}} | }} | ||
| − | |||
| − | + | This opcode opens the beginning of a sequence task. A sequence task is a group of commands, usually tasks, between opcodes 0615 and [[0616]] that can be assigned to a character or multiple characters. The character handle for tasks within the sequence should be ''-1'' if you want your assigned character to perform the tasks in the sequence. | |
| − | This | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | ==Keywords== | + | == Example == |
| − | action, sequence, task | + | This example shows how tasks can be assigned to a character through the sequence task. After [[009A#Example|spawning a ped]], add the following code afterwards. |
| + | <syntaxhighlight lang="scm"> | ||
| + | 0615: define_AS_pack_begin 1@ | ||
| + | 05D3: AS_actor -1 goto_point 0.0 0.0 0.0 mode 6 -1 ms | ||
| + | 04EB: AS_actor -1 crouch 1 | ||
| + | 0638: AS_actor -1 stay_put 1 | ||
| + | 0616: define_AS_pack_end 1@ | ||
| + | 0618: assign_actor 0@ to_AS_pack 1@ | ||
| + | 061B: remove_references_to_AS_pack 1@ | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | == Keywords == | ||
| + | open, begin, define, action, sequence, task, pack | ||
Latest revision as of 19:51, 19 June 2016
- Description
- Opens a sequence task
- Syntax
- 0615: define_AS_pack_begin [var]
- Parameter
- [var]
- Variable to store the handle of the sequence task
- Native analog
- OPEN_SEQUENCE_TASK
This opcode opens the beginning of a sequence task. A sequence task is a group of commands, usually tasks, between opcodes 0615 and 0616 that can be assigned to a character or multiple characters. The character handle for tasks within the sequence should be -1 if you want your assigned character to perform the tasks in the sequence.
Example
This example shows how tasks can be assigned to a character through the sequence task. After spawning a ped, add the following code afterwards.
0615: define_AS_pack_begin 1@
05D3: AS_actor -1 goto_point 0.0 0.0 0.0 mode 6 -1 ms
04EB: AS_actor -1 crouch 1
0638: AS_actor -1 stay_put 1
0616: define_AS_pack_end 1@
0618: assign_actor 0@ to_AS_pack 1@
061B: remove_references_to_AS_pack 1@Keywords
open, begin, define, action, sequence, task, pack