Difference between revisions of "02D6"

From GTAMods Wiki
Jump to navigation Jump to search
(page rewrite)
 
Line 1: Line 1:
{{Icon|3}} {{Icon|SA}} '''IS_CHAR_SHOOTING_IN_AREA'''
+
{{OpCode
<hr />
+
| games      = {{Icon|3}} {{Icon|SA}}
'''Description'''
+
| command    = IS_CHAR_SHOOTING_IN_AREA
: Checks if the character is shooting in the area
+
| description = Checks if the character is shooting in the area
'''Syntax'''
+
| syntax1    = {{Icon|3}} 02D6: &nbsp; actor [''char handle''] shooting_in_area [''flt1''] [''flt2''] [''flt3''] [''flt4''] [''int'']
: {{Icon|3}} 02D6: &nbsp; actor [''char handle''] shooting_in_area [''flt1''] [''flt2''] [''flt3''] [''flt4''] [''int'']
+
| syntax2    = {{Icon|SA}} 02D6: &nbsp; actor [''char handle''] fires_weapon [''int''] in_rectangle_cornerA [''flt1''] [''flt2''] cornerB [''flt3''] [''flt4'']
: {{Icon|SA}} 02D6: &nbsp; actor [''char handle''] fires_weapon [''int''] in_rectangle_cornerA [''flt1''] [''flt2''] cornerB [''flt3''] [''flt4'']
+
| p1t        = [''char handle'']
'''Parameter'''
+
| p1d        = The handle of the character
: [''char handle'']
+
| p2t        = [''flt1'']
:: The handle of the character
+
| p2d        = X-coordinate of one corner of area
: [''flt1'']
+
| p3t        = [''flt2'']
:: X-coordinate of one corner of area
+
| p3d        = Y-coordinate of one corner of area
: [''flt2'']
+
| p4t        = [''flt3'']
:: Y-coordinate of one corner of area
+
| p4d        = X-coordinate of other corner of area
: [''flt3'']
+
| p5t        = [''flt4'']
:: X-coordinate of other corner of area
+
| p5d        = Y-coordinate of other corner of area
: [''flt4'']
+
| p6t        = [''int'']
:: Y-coordinate of other corner of area
+
| p6d        = Show cylindrical marker
: [''int'']
+
}}
:: Show sphere
 
  
This conditional opcode returns when the character while on foot fires a bullet, throws a projectile, or uses a flamethrower in the rectangular area. It only briefly returns true so a loop with a short wait is needed to detect this. This opcode was never called in the [[Main.scm|original script]] of GTA III.
+
This conditional opcode returns true if the character while on foot fires a bullet, throws a projectile, or uses a flamethrower in the rectangular area. It only briefly returns true so a loop with a short [[0001|wait]] is needed to detect this. Its area detection and cylindrical marker behave similarly to opcode [[0056]]. This opcode was never called in the [[Main.scm|original script]] of GTA III.
  
 
== Keywords ==
 
== Keywords ==
 
check, character, actor, shooting, fires, weapon, area, rectangle
 
check, character, actor, shooting, fires, weapon, area, rectangle
 
[[Category:OpCodes]]
 

Latest revision as of 03:28, 30 November 2016

GTA III San Andreas IS_CHAR_SHOOTING_IN_AREA


Description
Checks if the character is shooting in the area
Syntax
GTA III 02D6:   actor [char handle] shooting_in_area [flt1] [flt2] [flt3] [flt4] [int]
San Andreas 02D6:   actor [char handle] fires_weapon [int] in_rectangle_cornerA [flt1] [flt2] cornerB [flt3] [flt4]
Parameter
[char handle]
The handle of the character
[flt1]
X-coordinate of one corner of area
[flt2]
Y-coordinate of one corner of area
[flt3]
X-coordinate of other corner of area
[flt4]
Y-coordinate of other corner of area
[int]
Show cylindrical marker

This conditional opcode returns true if the character while on foot fires a bullet, throws a projectile, or uses a flamethrower in the rectangular area. It only briefly returns true so a loop with a short wait is needed to detect this. Its area detection and cylindrical marker behave similarly to opcode 0056. This opcode was never called in the original script of GTA III.

Keywords

check, character, actor, shooting, fires, weapon, area, rectangle