Difference between revisions of "0213"
(mine pickup detail) |
|||
Line 8: | Line 8: | ||
: Pickup.Create( [''var''], [''int1''], [''int2''], [''flt1''] [''flt2''] [''flt3''] ) | : Pickup.Create( [''var''], [''int1''], [''int2''], [''flt1''] [''flt2''] [''flt3''] ) | ||
'''Parameter''' | '''Parameter''' | ||
− | |||
− | |||
: [''int1''] | : [''int1''] | ||
:: Valid object model ID number as defined in the [[IDE]] file; also acceptable is model's [[DFF]] name identified by a hash character | :: Valid object model ID number as defined in the [[IDE]] file; also acceptable is model's [[DFF]] name identified by a hash character | ||
Line 20: | Line 18: | ||
: [''flt3''] | : [''flt3''] | ||
:: Z-coordinate (or ''-100.0'' for [[02CE|ground z]] + 0.5 units) | :: Z-coordinate (or ''-100.0'' for [[02CE|ground z]] + 0.5 units) | ||
+ | : [''var''] | ||
+ | :: Variable to store the handle of the pickup | ||
'''Native analog''' | '''Native analog''' | ||
: [[CREATE_PICKUP]] | : [[CREATE_PICKUP]] |
Revision as of 00:21, 20 November 2016
Description
- Creates a pickup
Syntax
- 0213: [var] = create_pickup [int1] type [int2] at [flt1] [flt2] [flt3]
- Pickup.Create( [var], [int1], [int2], [flt1] [flt2] [flt3] )
Parameter
- [int1]
- [int2]
- [flt1]
- X-coordinate
- [flt2]
- Y-coordinate
- [flt3]
- Z-coordinate (or -100.0 for ground z + 0.5 units)
- [var]
- Variable to store the handle of the pickup
Native analog
This opcode spawns a pickup at a coordinates point that can be "collected" by the player.
The maximum number of pickups that can be spawned in GTA III and Vice City is 336 and in San Andreas is 620. Passing the limit will no longer spawn anymore pickups but the game will not crash.
Example
The following example, using Sanny Builder, will spawn a type 2 adrenaline pickup close to the player character.
// set constants
const
PICKUP_MODEL = #ADRENALINE
PICKUP_HANDLE = 0@
X_POS = 1@
Y_POS = 2@
Z_POS = 3@
end
// spawn pickup
00A0: store_actor $PLAYER_ACTOR position_to X_POS Y_POS Z_POS
X_POS += 4.0
0213: PICKUP_HANDLE = create_pickup PICKUP_MODEL type 2 at X_POS Y_POS Z_POS
Pickup types
This is a list of all available types of pickups.
GTA III
Value | Enum | Type | Description |
---|---|---|---|
1 | PICKUP_ |
weapon/item pickup with cost | respawn time ~5s, see below for cost |
2 | PICKUP_ |
weapon/item pickup | respawn time ~30s, respawn distance ~15m |
3 | PICKUP_ |
weapon/item pickup | one-time pickup, does not respawn |
4 | PICKUP_ |
weapon/item pickup | one-time pickup, does not respawn, disappears in 20s |
5 | PICKUP_ |
hidden package pickup | behaves exactly like a package including stat update and money reward |
6 | PICKUP_ |
out of stock pickup | object model darkened, unpickable |
7 | PICKUP_ |
money pickup | no money actually added but money sound plays (money can be added using 032B), one-time pickup, does not respawn, disappears in 30s |
8 | PICKUP_ |
inactive mine | not interactive with anything if player is on foot, pickup type changes to 9 once the player is in any vehicle |
9 | PICKUP_ |
armed mine | any pickup spawned with this type automatically changes to type 8, this type applies only when pickup type changes from 8 to 9 — selfdestructs in ~10s, explodes upon contact with any vehicle, does not respawn |
10 | PICKUP_ |
proximity bomb | selfdestructs in ~10s, explodes upon contact with player vehicle, can float above water but weapon halo doesn't float with object, does not respawn |
11 | PICKUP_ |
proximity bomb | selfdestructs in ~10s, explodes upon contact with player vehicle, can float above water but weapon halo doesn't float with object, does not respawn |
12 | PICKUP_ |
vehicle pickup | drive through it to pick it up, can't be picked up on foot, object model sinks through ground, can only float on water, does not respawn (opcode 035B) |
13 | PICKUP_ |
vehicle pickup | drive through it to pick it up, can't be picked up on foot, can float on water, does not respawn |
14 | PICKUP_ |
weapon/item pickup | respawn time ~30s, respawn distance ~15m |
Vice City
Value | Enum | Type | Notes |
---|---|---|---|
1 | PICKUP_ |
weapon/item pickup with cost | respawn time ~5s |
2 | PICKUP_ |
weapon/item pickup | respawn time ~30s, respawn distance ~15m |
3 | PICKUP_ |
weapon/item pickup | one-time pickup, does not respawn |
4 | PICKUP_ |
weapon/item pickup | one-time pickup, does not respawn, disappears in 20s |
5 | PICKUP_ |
weapon/item pickup | one-time pickup, does not respawn, disappears in 120s |
6 | PICKUP_ |
hidden package pickup | behaves exactly like a package including stat update and money reward |
7 | PICKUP_ |
out of stock pickup | object model darkened, unpickable |
8 | PICKUP_ |
money pickup | no money actually added but money dialogue and sound plays (money can be added using 032B), one-time pickup, does not respawn, disappears in 30s |
9 | PICKUP_ |
inactive mine | not interactive with anything if player is on foot, pickup type changes to 10 once the player is in any vehicle |
10 | PICKUP_ |
armed mine | any pickup spawned with this type automatically changes to type 9, this type applies only when pickup type changes from 9 to 10 — selfdestructs in ~10s, explodes upon contact with any vehicle, does not respawn |
11 | PICKUP_ |
proximity bomb | selfdestructs in ~10s, explodes upon contact with player vehicle, can float above water but weapon halo doesn't float with object, does not respawn |
12 | PICKUP_ |
proximity bomb | selfdestructs in ~10s, explodes upon contact with player vehicle, can float above water but weapon halo doesn't float with object, does not respawn |
13 | PICKUP_ |
vehicle pickup | drive through it to pick it up, can't be picked up on foot, object model sinks through ground, can only float on water but weapon halo doesn't float with object, does not respawn |
14 | PICKUP_ |
vehicle pickup | drive through it to pick it up, can't be picked up on foot, can float on water but weapon halo doesn't float with object, does not respawn |
15 | PICKUP_ |
weapon/item pickup | respawn time ~30s, respawn distance ~15m |
16 | PICKUP_ |
property pickup | unpickable |
17 | PICKUP_ |
property pickup | unpickable |
18 | PICKUP_ |
property pickup | press the ACTION button to pick it up; if on a mission pressing ACTION will show a help box with GXT string PROP_2 and prevents you from picking it up
|
San Andreas
Value | Description |
---|---|
1 | pickups with cost, unpickable for most |
2 | item pickup, respawn time 30s, respawn distance 15m |
3 | item pickup, does not respawn. |
4 | item picked-up, does not respawn. |
5 | item pickup, does not respawn. |
6 | unpickable |
7 | unpickable |
8 | item picked-up, does not respawn. |
9 | proximity bomb?, selfdestruct when player driving in proximity 20m, explodes upon contact with vehs |
10 | proximity bomb?, selfdestruct when player driving in proximity 20m, explodes upon contact with vehs |
11 | proximity bomb?, selfdestruct when player driving in proximity 20m, explodes upon contact with vehs |
12 | proximity bomb?, selfdestruct when player in proximity 40m, explodes upon contact with vehs |
13 | item photo-op, fake pickup drops slowly down, real visible when photographed. |
14 | vehicle pickup, drive thru it to make it dissapear, does not respawn. |
15 | item pickup, respawns after time. |
16 | unpickable, (originally property) |
17 | shows cancel popup. (originally property) |
18 | paycash pickup, pay amount to make it dissapear. (originally property) |
19 | getcash pickup, get amount to make it dissapear. |
20 | snapshot pickup, photograph it to make it dissapear, adds 1 snapshot collected. |
21 | 2nd player pickup, press second controller to make it dissapear. |
22 | invisible |
23 | unpickable |
Weapons
This opcode can create weapon pickups with a set amount of ammo. To have a custom ammo count, use opcode 032B. All these values are hardcoded.
GTA III
Ammo count applies to all but types 2 and 14. For types 2 and 14, divide the ammo count by five. Cost applies to only type 1.
Pickup | Ammo | Cost |
---|---|---|
Armor | none | $3,000 |
Bat | none | $10 |
Pistol | 45 | $250 |
Uzi | 125 | $800 |
Shotgun | 25 | $1,500 |
AK47 | 150 | $3,000 |
M16 | 300 | $5,000 |
Sniper Rifle | 25 | $10,000 |
Flamethrower | 25 | $25,000 |
Molotov Cocktail | 5 | $2,000 |
Grenade | 5 | $2,000 |
Vice City
Ammo count applies to all but types 2 and 15. For types 2 and 15, divide the ammo count by two. Cost applies to only type 1.
Pickup | Ammo | Cost |
---|---|---|
Health | none | $20 |
Armor | none | $10 |
Adrenaline | none | $10 |
All melee weapons | none | $10 |
Grenade | 8 | $1,000 |
Detonator Grenade | 8 | $1,000 |
Tear Gas | 8 | $1,000 |
Molotov Cocktail | 8 | $500 |
Missile | 8 | $8,000 |
Pistol | 68 | $250 |
.357 | 24 | $400 |
Shotgun | 32 | $1,200 |
S.P.A.S. 12 | 28 | $1,250 |
Stubby Shotgun | 20 | $1,250 |
Tec 9 | 200 | $800 |
Uz-1 | 120 | $800 |
Mac | 120 | $650 |
MP | 120 | $1,200 |
M4 | 120 | $5,000 |
Kruger | 120 | $400 |
Rocket Launcher | 8 | $8,000 |
Flame Thrower | 30 | $8,000 |
M60 | 200 | $8,000 |
Minigun | 1,000 | $10,000 |
Sniper Rifle | 40 | $10,000 |
.308 Sniper | 28 | $10,000 |
Camera | 36 | $500 |
Any other pickups will display a cost of $0.
Unique objects
There are objects that have unique properties when used with this opcode. An example would be the object "bribe" that can only be picked up when the player has a wanted level. The uniqueness of the object is based mostly on the model name of the object, independent of the ID number of the object with the exception of weapons. Here is a list of all unique objects.
Vice City
By default, objects have concentric halos when used as a pickup, similar to the halos seen around weapon pickups but not around health pickups. Also by default, when an object gets picked up, it produces a sound. Some objects can have a unique sound, different from generic objects.
Model | Concentric halos? |
Unique sound? |
Other properties |
---|---|---|---|
briefcase | no | no | unique glow, shows no price when used as type 1 |
adrenaline | no | no | creates slow motion and super strength effects when picked up, shows no price when used as type 1 |
bodyarmour | yes | yes | gives the player full armor when picked up |
info | no | yes | |
health | no | yes | gives the player full health when picked up, shows no price when used as type 1 |
bonus | no | yes | |
bribe | no | yes | lowers the player's wanted level by one for most types when picked up, can usually be picked up for most types only when the player has a wanted level |
killfrenzy | no | yes | |
camerapickup | no | no | can only be picked up while driving, doesn't self destruct for types 9 to 12 |
bigdollar | no | no | |
pickupsave | no | no | |
property_locked | no | no | |
property_fsale | no | no | |
clothesp | no | no | |
barrel1 | no | no | unique glow, shows no price when used as type 1 |
barrel2 | no | no | unique glow, shows no price when used as type 1 |
package1 | no | no | unique glow, shows no price when used as type 1 |
money | no | no | unique glow, shows no price when used as type 1 |
brassknuckle | yes | no | gives the player Brass Knuckles when picked up |
screwdriver | yes | no | gives the player a Screwdriver when picked up, light teal halos |
golfclub | yes | no | gives the player a Golf Club when picked up, light teal halos |
nitestick | yes | no | gives the player a Nightstick when picked up, light teal halos |
knifecur | yes | no | gives the player a Knife when picked up, light teal halos |
bat | yes | no | gives the player a Bat when picked up, light teal halos |
hammer | yes | no | gives the player a Hammer when picked up, light teal halos |
cleaver | yes | no | gives the player a Meat Cleaver when picked up, light teal halos |
machete | yes | no | gives the player a Machete when picked up, light teal halos |
katana | yes | no | gives the player a Katana when picked up, light teal halos |
chnsaw | yes | no | gives the player a Chainsaw when picked up, light teal halos |
grenade | yes | no | gives the player Grenades when picked up, light blue halos |
teargas | yes | no | gives the player a Tear Gas when picked up, light blue halos |
molotov | yes | no | gives the player Molotov Cocktails when picked up, light blue halos |
missile | no | no | gives the player a Missile when picked up |
colt45 | yes | no | gives the player a Pistol when picked up, light green halos |
python | yes | no | gives the player a .357 when picked up, light green halos |
ruger | yes | no | gives the player a Kruger when picked up, orange halos |
chromegun | yes | no | gives the player a Shotgun when picked up, green halos |
shotgspa | yes | no | gives the player a S.P.A.S. 12 when picked up, green halos |
buddyshot | yes | no | gives the player a Stubby Shotgun when picked up, green halos |
m4 | yes | no | gives the player an M4 when picked up, orange halos |
tec9 | yes | no | gives the player a Tec 9 when picked up, yellow halos |
uzi | yes | no | gives the player an Uz-1when picked up, yellow halos |
ingramsl | yes | no | gives the player a Mac when picked up, yellow halos |
mp5lng | yes | no | gives the player an MP when picked up, yellow halos |
sniper | yes | no | gives the player a Sniper Rifle when picked up, pink halos |
laser | yes | no | gives the player a .308 Sniper when picked up, pink halos |
rocketla | yes | no | gives the player a Rocket Launcher when picked up, purple halos |
flame | yes | no | gives the player a Flame Thrower when picked up, purple halos |
m60 | yes | no | gives the player an M60 when picked up, purple halos |
minigun | yes | no | gives the player a Minigun when picked up, contains two models within one pickup (minigun and minigun2), purple halos |
bomb | yes | no | gives the player Detonator Grenades when picked up, light blue halos |
camera | yes | no | gives the player Camera when picked up |
Keywords
create, pickup, weapon
See also
- Pickup to object – a function to convert pickup's handle to an object one.
External link
- GTAForums: Generic SA SCM Documentation