Difference between revisions of "02D6"

From GTAMods Wiki
Jump to navigation Jump to search
(Created page with '{{OpCode | ini = 02D6=6, actor %1d% fires_weapon %6d% in_rectangle_cornerA %2d% %3d% cornerB %4d% %5d% | description = Checks if the actor is firing a weapon in the area …')
 
(page rewrite)
Line 1: Line 1:
{{OpCode
+
{{Icon|3}} {{Icon|SA}} '''IS_CHAR_SHOOTING_IN_AREA'''
| ini        = 02D6=6, actor %1d% fires_weapon %6d% in_rectangle_cornerA %2d% %3d% cornerB %4d% %5d%
+
<hr />
| description = Checks if the actor is firing a weapon in the area designated. 
+
'''Description'''
| p1          = Actor variable
+
: Checks if the character is shooting in the area
| p2          = Weapon ID
+
'''Syntax'''
| p3          = X Coordinate of first corner
+
: {{Icon|3}} 02D6: &nbsp; actor [''char handle''] shooting_in_area [''flt1''] [''flt2''] [''flt3''] [''flt4''] [''int'']
| p4          = Y Coordinate of first corner
+
: {{Icon|SA}} 02D6: &nbsp; actor [''char handle''] fires_weapon [''int''] in_rectangle_cornerA [''flt1''] [''flt2''] cornerB [''flt3''] [''flt4'']
| p5          = X Coordinate of second corner
+
'''Parameter'''
| p6          = Y Coordinate of second corner
+
: [''char handle'']
| game        = [[San Andreas]]
+
:: The handle of the character
}}
+
: [''flt1'']
This opcode checks if the actor is firing a specific weapon inside the defined rectangle.
+
:: 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 sphere
  
== Sanny Builder example ==
+
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.
  
<source lang="scm">02D6: actor $PLAYER_ACTOR fires_weapon 0 in_rectangle_cornerA -2774.03 -1572.78 cornerB -2837.13 -1468.24</source>
+
== Keywords ==
 +
check, character, actor, shooting, fires, weapon, area, rectangle
  
==Keywords==
+
[[Category:OpCodes]]
weapons
 

Revision as of 07:09, 30 July 2015

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 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 original script of GTA III.

Keywords

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