Jump to content

OBD:BINA/OBJC/PATR: Difference between revisions

m
added family to footer template call
m (notes on "move to point", "turn head ...", and unknown '20')
m (added family to footer template call)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{OBD OBJC Header | align=center | type=PATR | prev=PART | next=PWRU | name=Patrol path}}
{{OBD OBJC Header | align=center | type=PATR | prev=PART | next=PWRU | name=Patrol path | stuff=b_pp}}




[[image:bin_r_pp.gif]]
[[Image:bin_r_pp.gif]]




{{Table}}
{{Table}}
{{OBDth}}
{{OBDth}}
{{OBDtr| 0x00 | char[4]  |FF0000| 43 4A 42 4F | OBJC      | object collection }}
{{OBDtr| 0x00 | char[4]  |FF0000| 43 4A 42 4F | OBJC      | objects }}
{{OBDtr| 0x04 | int32    |FFFF00| B4 1F 00 00 | 8116      | size of the complete patrol path part from this postion in bytes }}
{{OBDtr| 0x04 | int32    |FFFF00| B4 1F 00 00 | 8116      | size of the complete patrol path part from this position in bytes }}
{{OBDtr| 0x08 | int32    |00FF00| 27 00 00 00 | 39        | object collection version }}
{{OBDtr| 0x08 | int32    |00FF00| 27 00 00 00 | 39        | object list version }}
{{OBDtr| 0x0C | int32    |00FFFF| 78 00 00 00 | 120        | size of the following element in bytes }}
{{OBDtr| 0x0C | int32    |00FFFF| 78 00 00 00 | 120        | size of the following element in bytes }}
{{OBDtrBK}}
{{OBDtrBK}}
Line 62: Line 62:
:16 - run path in a loop from block number (long) - runs the complete path once; after that it loops the path from the block number to the end (note that the block number of the first block is zero and not one)
:16 - run path in a loop from block number (long) - runs the complete path once; after that it loops the path from the block number to the end (note that the block number of the first block is zero and not one)
:17 - time + rotation (short + float) - character looks/aims around for the fixed time
:17 - time + rotation (short + float) - character looks/aims around for the fixed time
:18 - unkown (nothing follows)
:18 - force loop continuance and correctness (type 17 can cause incorrect loops and a complete break in case of 0 frames)
:19 - time + flag + rotation in degrees (short + short + float) - character moves to the flag and when reached he/she looks/aims around for the fixed time
:19 - time + flag + rotation in degrees (short + short + float) - character moves to the flag and when reached he/she looks/aims around for the fixed time
:20 - appears to be a duplicate of 21
:20 - <u>fork</u> patrolscript by id (short) - BSL function with this id is called up (f.e. id <nowiki>= 1, then called up function =</nowiki> patrolscript0001)
:21 - patrolscript id follows (short) - function with this id is called up (f.e. id <nowiki>= 1, then called up function =</nowiki> patrolscript0001)
:21 - <u>call</u> patrolscript by id (short) - BSL function with this id is called up (f.e. id <nowiki>= 1, then called up function =</nowiki> patrolscript0001), caution: bsl can interrupt the patrol path (see example below)
:22 - ignore player (byte) - 0 <nowiki>= off; 1 =</nowiki> on
:22 - ignore player (byte) - 0 <nowiki>= off; 1 =</nowiki> on
:23 - flag + time + firing spread in degrees (short + short + float) - character faces to to the flag and fires his/her weapon for the fixed time  
:23 - flag + time + firing spread in degrees (short + short + float) - character faces to to the flag and fires his/her weapon for the fixed time  
Line 81: Line 81:




;Bluebox screenshots
;Corrupting BSL code at patrolscripts
:I suspect that ''instantly'' played BSL code breaks patrol path.
:example:
::patrolscript0001 contains a sleep command and patrolscript0002 will be played.
::But if you remove the sleep command the patrol path will break.
::(This was tested in level 1 SP1 with A_t48 and his patrol_48.)


http://ssg.oni2.net/subfold/bluebox/images/300_edit_paths.png


XML code - patrolscript points:


http://ssg.oni2.net/subfold/bluebox/images/301_edit_path.png
<Points>
    <ScriptId ScriptId="1" />
    <ScriptId ScriptId="2" />
    <ScriptId ScriptId="3" />
</Points>


BSL code:
func patrolscript0001
{
dmsg "1"
chr_animate 0 KONOKOpowerup
sleep 1
}
func patrolscript0002
{
dmsg "2"
}
func patrolscript0003
{
dmsg "3"
}


http://ssg.oni2.net/subfold/bluebox/images/302_edit_path_point.png


;Tool Mode dialogs


{{OBD OBJC Footer | type=PATR | prev=PART | next=PWRU | name=Patrol path}}
[[Image:Tool dialog - Edit Paths.png]]
 
 
[[Image:Tool dialog - Edit Path.png]]
 
 
[[Image:Tool dialog - Edit Path Point.png]]
 
 
{{OBD OBJC Footer | type=PATR | prev=PART | next=PWRU | name=Patrol path | family=Level}}


{{OBD}}
{{OBD}}